Sort lines

Input

Output