S=sorted;print''.join(S(S(open('/dev/fd/0')),key=len))