import java.util.HashSet;
    import java.util.Scanner;
    import java.util.Set;

    public class Main {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] ant = new int[n];
    for (int i = 0; i < n; i++) {
        ant[i] = sc.nextInt();
    }
    Set<Integer> set = new HashSet<>();
    for (int i = 0; i < ant.length; i++) {
        if (!set.contains(ant[i])) {
            System.out.print(ant[i]);
            if (i != n - 1) {
                System.out.print(" ");
            }
            set.add(ant[i]);
        }
    }
  }
}