The short story "On Account of a Hat" by Sholom Rabinowitz, who wrote under the pen name Sholem Aleichem, begins with a short prelude in which the author interviews a stationery dealer in the town of Kasrilevka. The stationery merchant tells him what he professes to be a true story about an absent-minded person named Sholem Shachnah, whom he refers to as Sholem Shachnah Rattlebrain.
According to the stationery dealer, Sholem Shachnah is an incompetent seller of real estate who finally manages to sell one piece of land. He sends most of his earnings to his wife and makes plans to be home in Kasrilevka in time for Passover. He takes a train as far as a town called Zolodievka, where he has to change trains. However, there is a wait of several hours, and he has been traveling for two days without rest. He sits on a bench occupied by a sprawled-out sleeping official and falls fast asleep.
Soon, the porter wakes him because the train is going to pull in, so he grabs the official's hat with its red band and visor instead of his own. He rushes to buy a ticket and get on the train, and he can't understand why everyone respectfully gets out of his way and defers to him. It is, of course, because of the official hat he is wearing. When he looks in a mirror and realizes his mistake, he rushes off the train to correct the error, the train pulls out, and he misses it.
In this story, Rabinowitz uses humor to paint a vivid picture of anti-Semitism in Eastern Europe. First of all, Shachnah is unsure of whether he should sit on a part of the bench occupied by the official. He observes the snoring man and thinks that "it's not such a bad life to be a gentile, and an official one at that." The man can lie down and sleep wherever he wants, and no one will object, while Shachnah has to be very careful about where he rests. He is acutely conscious of his lower-class status and does not want to get into trouble. When he puts on the wrong hat and breaks into the line of waiting travelers, he is incredulous that anyone should make way for him or call him "Excellency." He is used to being treated poorly.
When he buys his train ticket, he automatically defaults to the third-class car: it is the only railway accommodation he has ever known. The conductor takes him to first class, and Shachnah rationalizes it by considering that it might be because of the real estate deal he pulled off. However, he then reasons, "If his own people, Jews, that is, honored him for this, it would be understandable. But gentiles!"
We see, then, that the anti-Semitism in the story is portrayed indirectly, in the thoughts of Shachnah when he considers how he is used to being treated in contrast to how he is treated when people think he is a gentile official.