Longitudinal Distribution of π±, K±, Protons and Antiprotons Produced in 360 GeV/c π-p Interactions