Khachaturyan A.v.

It is known that the Jackal always lies, the Lion tells the truth, the Parrot simply repeats the last heard answer (and if asked first, will answer randomly), and the Giraffe gives an honest answer but to the previous question asked to him (and on the first question, answers randomly). The wise Hedgehog in the fog stumbled upon the Jackal, Lion, Parrot, and Giraffe and decided to find out in what order they stood. Asking each in turn, "Are you the Jackal?", he only figured out where the Giraffe was. Asking everyone in the same order, "Are you the Giraffe?", he was able to understand where the Jackal was, but full clarity did not come. Only after the first one answered "Yes" to the question "Are you the Parrot?", did the Hedgehog finally understand the order in which the animals stood. So, in what order did they stand?

("Randomly" means that one of the answers, "Yes" or "No," is chosen arbitrarily.)