using System.Collections;
class OtherComparer:IComparer
public int Compare(object x, object y)
if(s1.Length > s2.Length) return 1;
else if(s1.Length < s2.Length) return -1;
else return string.Compare(s1,s2);
static void SelectionSort(string []s)
for(int i =0;i<s.Length-1;i++)
for(int j=i+1;j<s.Length;j++)
if(string.Compare(s[i],s[j])==-1)
public static void Main()
int n=int.Parse(Console.ReadLine());
string [] s=new string[n];
for(int i = 0;i<s.Length;i++)
Console.WriteLine("ime");
s[i] =Console.ReadLine();
IComparer comp=new OtherComparer();
for(int i = 0;i<s.Length;i++)
Console.Write(s[i] + " ");