A doctor once lived in one city. He was a scientist, and there was no one in his country wiser than him. The country where Gaspar Arneri lived was ruled by Three Fat Men, voracious and cruel.
One summer in June, on a clear fine day, the doctor sets off for a walk. In the square, he suddenly catches a pandemonium, hears shots and, climbing to the tower, sees artisans chasing the Guardsmen running from the Palace of Three Fat Men. It turns out that the people, led by the armourer Prospero and gymnast Tibul rebelled against the authority of the Three Fat Men, but the uprising was defeated, and the armourer Prospero was captured. The bomb falls into the tower, from which Gaspar Arneri watches what is happening, it collapses, and the doctor loses consciousness. He woke up when evening came. Around the corpses of the dead. Returning home through Zvezda Zvezda, the doctor sees how the other leader of the uprising, the gymnast Tibul, who was free, escaping from the guards who are pursuing him, deftly walks along the narrow wire directly above the square, and then runs away through the hatch in the dome. At home, a tired doctor is about to go to bed, when suddenly a man in a green coat comes out of the fireplace. This is a gymnast Tibul. On the next day, ten blocks for the captured rebels are prepared in the square of the Court. Then an extraordinary incident occurs: the wind blows the seller of balloons along with the balloons and he falls directly into the open window of the palace confectionery and gets directly into a huge cake. To avoid punishment, confectioners decide to leave the seller in the cake, smeared it with cream and stuck with candied fruit, and serve in the hall where the ceremonial breakfast is held. Thus, the seller of balls, trembling with fear that he will be eaten, becomes a witness to what is happening in the hall. Tasting the cake is temporarily delayed. Three Fat Men want to see the captured gunsmith Prospero, and then, when, having enjoyed this spectacle, they are going to continue the feast, a twelve-year-old Tutti heir bursts into the hall with a cry and cry.
The Fat Men have no children, and they are going to transfer all their wealth and management of the country of Tutti, who is brought up in the Palace as a little prince. Fat men in every way pamper him and indulge his whims. In addition, they want the boy to have an iron heart, they do not allow him to play with other children, and his classes are held in the menagerie. Instead of a friend, an amazing doll was created for him, which is endowed with the ability to grow and develop with Tutti. The heir is extremely attached to her. And now the favorite doll is broken: the rebel guards, who crossed the side of Prospero and the rebellious people, pierced her with bayonets.
Fat men do not want Tutti's heir to be upset. The doll needs to be fixed urgently, but no one is able to do this, except for the most learned doctor Gaspard Arneri. Therefore, it was decided to send him a doll so that by the next morning she would be repaired by Tutti again. Otherwise, doctors are in serious trouble. Since Tolstyakov’s mood is spoiled, a cake with a seller of balloons is taken back to the kitchen. Cooks in exchange for balloons help the seller get out of the Palace, show him a secret passage that begins from a giant pan.
Meanwhile, at the Fourteenth Market, Three Fat Men organize festivities for the people: performances, entertainment, performances, during which artists should campaign for the Three Fat Men and distract the attention of the people from the blocks that are being erected for execution. At one such presentation, Dr. Arneri and gymnast Tibul are present, turned by the doctor for conspiracy into a black man. During the performance, the strongman Lapitupa Tibul does not stand up and drives him off the stage, revealing to the people that he is not a Negro at all, but a real Tibul. A scuffle ensues between him and the bribed circus performers. Tibul defends himself with cabbage heads, tearing them straight from the bed and throwing them at the enemy. Grabbing another head of cabbage, he suddenly discovers that it is a human head, and none other than a seller of balloons. So Tibul learns about the existence of a secret underground passage to the Palace of Fat Men.
While Tibul is fighting, doctors of Gaspard Arneri are found by the envoys of Tolstyakov and give him an order and a broken doll. Dr. Gaspard Arneri is trying to fix the doll, but by morning he is clearly not keeping up. It takes at least another two days, and the doctor with the doll goes to the Fat Men. Guardsmen guarding the Palace stop him on the road and do not let him go further. They do not believe that he really is Gaspar Arneri, and when the doctor wants to show them the doll, he discovers that she is not: dozing off, he dropped it on the road. An upset doctor is forced to turn back. Hungry, he drives into Uncle Brisak's shed. What is his surprise when he discovers here the doll of the heir to Tutti, who turns out to be not a doll at all, but a living girl named Suok, who looks like a doll with two drops of water. And then Tibula, who appeared here soon, has a plan for the liberation of Prospero.
In the morning, Dr. Arneri arrives at the Palace. The doll is not only corrected by him, but even more like a living girl than before. Suok is a good actress and is perfectly represented by a doll. The heir is thrilled. And then the doctor asks for the abolition of the execution of ten rebels. Outraged Fat Men have no choice but to agree, otherwise the doll may deteriorate again.
At night, when everyone is sleeping, Suok enters the menagerie. She is looking for Prospero, but in one of the cells she finds a monster, overgrown with hair, with long yellow claws, which hands her some kind of tablet and dies. This is the great scientist Tub, the creator of the doll for Tutti: he was imprisoned in a menagerie for not agreeing to make an iron heart to the heir. Here he spent eight years and almost lost his human appearance. Then Suok finds the cage with Prospero and frees him. With the help of the terrible panther released from the cage, Prospero and Suok break through to the same pan from where the underground passage begins, but Suok does not have time to follow Prospero and is captured by the guards.
The next day, a trial of Suok will take place. So that the heir to Tutti does not accidentally intervene and upset their plans, by order of the Tolstyaks he is temporarily put to sleep. Suok does not answer questions and generally does not react to what is happening. Angry Fat Men decide to give it to the tigers to tear. The tigers released from the cage, upon seeing the victim, first rush to it, but then suddenly turn away indifferently. It turns out that this is not Suok at all, but the very spoiled doll that the rebel guards took away from Razdvatris, the dance teacher who found her. The real Suok was hidden in a closet, replacing a doll.
Meanwhile, shots are already being fired and shells are torn, rebellious people led by the armourer Prospero and gymnast Tibul storm the Palace.
The power of the Fat Men comes to an end. And on that plate, which was given to the brave Suok by the dying creator of the doll, he revealed to her an important secret: she is Tutti's sister, who was kidnapped at the age of four by order of Tolstyakov and then separated from her brother. Tutti was left in the Palace, and the girl was given to a wandering circus in exchange for a rare-breed parrot with a long red beard.