l=list(map(str,input().split())) print (' '.join(map(str,sorted(massiv,key=lambda x: x[1]))))