In 1889, Grabar was admitted to the Law Department of the Saint Petersburg University; he made living by selling short stories to magazines and soon became the editor of "Shut", "the weakest of humour magazines" that nevertheless paid well. His illustrations to books by Nikolay Gogol, signed "Igor Hrabrov", inspired the young Aleksandr Gerasimov (born 1881), but Grabar generally stayed aside from drawing. He later complained that tabloid bohemianism completely overwhelmed him. In his second year at the university, Grabar moved up to the respectable "Niva" magazine. He selected graphics for "Niva" and wrote essays on contemporary painters but did not yet have enough influence to change its policies. Law-department classes were uninspiring and Grabar spent more time attending history lectures and Pavel Chistyakov's school of painting, but he still managed to graduate in law, without delay, in April 1893.