A 18-year-old student was behind the shooting, investigators in the Russian-annexed region say.