#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

vector<int > a;
int main() {
    int n;
    while(cin>>n){
        int b[n];
        for(int i=0;i<n;i++){
            cin>>b[i];
            a.push_back(b[i]);
        }
        sort(a.begin(), a.end());
        a.erase(unique(a.begin(),a.end()),a.end());
        for(int i=0;i<a.size();i++){
            cout<<a[i]<<" ";
        }
        cout<<endl;

    }
    return 0;
}
// 64 位输出请用 printf("%lld")