Hadron cascade by the method of characteristics