import java.util.*;
import java.io.*;
public class EmployeeArray
{
public static void main(String args[])throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList a = new ArrayList();
System.out.println("\nEnter number of Employee : ");
int n = Integer.parseInt(br.readLine());
System.out.println("\nEnter name : ");
for(int i = 1; i <= n; i++)
{
a.add(br.readLine());
}
TreeSet tr = new TreeSet(a);
System.out.println("Sorted name are : "+tr);
}
}