2 of 11 edited tags

Sort the books

School is starting soon (if it hasn't already) and so it's time to get our textbooks in alphabetical order.

Examples

Input:

 _
| |  _
|F| | |
|o|_|P|
|o|B|P|
| |a|C|
| |r|G|
|_|_|_|


Output:

   _
| |_
|F| |
_|o|P|
|B|o|P|
|a| |C|
|r| |G|
|_|_|_|


Input

The input will be a set of books which need to rearranged alphabetically. It will contain only: |, _, , and A-Za-z. The titles of the books are read vertically, top-bottom

Output

The output will need to be the same set of books organized in alphabetical order. The height of the books must stay the same and the title must have the same spacing from the top when re-arranged.