import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.Arrays; class Test { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] input = new String[n]; for (int i = 0; i < n; i++) { input[i] = br.readLine(); } br.close(); Arrays.sort(input); for (String str : input) { System.out.println(str); } } }