import java.io.*; import java.util.Collection; import java.util.TreeSet; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); // TreeSet集合按照大小默认升序 Collection<Integer> list = new TreeSet<>(); for (int i = 0; i < n; i++) { list.add(Integer.parseInt(br.readLine())); } list.forEach(s -> System.out.print(s + " ")); } }