import std.stdio, std.string, std.array, std.conv, std.algorithm;

void main() {
    int n = readln.chomp.to!int;
    int[] a = readln.chomp.split.to!(int[]);
    a = a.uniq.array;
    foreach (i, x; a) {
        x.write;
        if (i != a.length - 1) " ".write;
        else writeln;
    }
}
