import java.util.; import java.io.; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = null; while((str = in.readLine()) != null){ int num = Integer.parseInt(str); String[] s = new String[num]; for(int i = 0;i < num;i++){ s[i] = in.readLine(); } Arrays.sort(s); for(String tem: s) System.out.println(tem); } } }