#include <bits/stdc++.h>
using namespace std;
unordered_map <int, int> hm;
int main()
{
    int n; cin >> n; int a[n];
    for(int i=0; i<n; i++)
    {
        cin >> a[i];
        hm[a[i]]++;
    }
    int *arr= new int, index=0;
    for(auto it=hm.begin(); it!=hm.end(); it++)
    {
        if(it->second==1)
        {
            arr[index++]=it->first;
        }
    }
    for(int i=index-1; i>=0; i--) cout << arr[i] << " ";
}