Once upon a time there were two famous wizards—Pencil and Samodelkin. Everything that Pencil drew immediately turned into reality. And his friend, the iron little man Samodelkin, could make anything with his own hands. He could build a ship, a submarine, and even a spacecraft. But one day, two evil robbers settled in the city where Pencil and Samodelkin lived—Bul-Bul the pirate and Dirk the spy. And the moment they learned that real wizards lived nearby, the robbers lost sleep and peace. They decided—come what may—to steal Pencil so that he would draw them a real pirate ship, on which they would plunder and rob. And just when they almost succeeded, Samodelkin saved his friend Pencil from pirate captivity and sailed with him on a submarine into the ocean. That’s when the real adventures began—adventures that this fairy tale tells about.