For example:
If the stele contains strings:
"n"
"ugandan"
"ganda"
"gan"
You should arrange the strings into the order:
"n"
"gan"
"ganda"
"ugandan"
Help Knuckles get out of the dungeon or he will spit on you.
Input contains several lines.
First line contains only one integer n (1<= n <= 1000)
Following n lines, each line contains one string s ( 1<= length of s <= 1000 )
The string s only contains lowercase English letters.
If it's impossible to arrange the strings in the desired order, print "NO".
If it's possible, print "YES" .
And then print n lines each line contains one string in required order.
Remember to print \n at the end of output.