NIO was the king of the OIN Kingdom.
He had

children and wanted to teach them how to count. In the OIN Kingdom, pental is used in counting, so his children can only use 0, 1, 2, 3, and 4 to represent a number.
One day, NIO asked his children to write down their favorite numbers. After that, he came out with a problem: if he concatenated these numbers into a big number, what is the smallest number he could get? However, this problem was too hard for him to solve, so can you help him?
输入描述:
The first line contains an integer
, denoting the number of NIO's children.
Then follows
lines, each line contains a string
denotes the favorite number of the
th child. The string is composed of 0, 1, 2, 3, and 4, but may have leading zeros because NIO's children hadn't fully understood how to count.

输出描述:
One integer denotes the smallest number NIO can get.
备注:
If you have designed an algorithm whose time complexity is
or so, please think twice before submitting it. Any algorithm other than linear complexity is NOT supposed to pass this problem. But of course, you can have a try. If you do so, we wish you good luck.