Axiomatic characterization of transit functions of hierarchies