Input (grade 12): In Kazan, Lobachevsky attended Kazan Gymnasium, graduating in 1807 and then Kazan University, which was founded just three years earlier in 1804.
Output (grade 9): In Kazan, Nikolai Ivanovich Lobachevsky attended Kazan Gymnasium. He graduated in 1807 and then went to Kazan University which was founded just three years earlier, in 1804.