// editor1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    int n, in;
    cin >> n;
    
    if(n>=1 && n<=10000)
    {
        vector <int> v;
        for(int i=0;i<n;i++)
        {
            cin >> in;
            if(in >= -10000 && in <= 10000)
            continue;
            else
            {
                v.push_back(in);
            }
        }
        
        if(v.size() != n)
        cout << "Invalid input" << endl;
        else
        {
            for(int i: v)
            {
                if(v.count(v.begin(), v.end(), i) == 1)
                cout << i << " ";
            }
        }
    }
    else
    {
        cout << "Invalid input" << endl;
    }
    return 0;
}