The hierarchy of cities according to their participation in global and European networks