#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int arr1[1000] = { 0 };
    int arr2[1000] = { 0 };
    int arr3[1000] = { 0 };
    for (int i = 0; i < n; i++)
    {
        cin >> arr1[i];
    }
    for (int i = 0; i < n; i++)
    {
        arr2[i] = arr1[i];
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            if ((arr1[i] == arr2[j])&&(i!=j))
            {
                arr1[j] = 0;
            }
        }
    }
    int h = 0, k = 0;
    while (h < n)
    {
        if (arr1[h] != 0)
        {
            arr3[k++] = arr1[h++];
        }
        else
        {
            h++;
        }
    }
    for (int i = 0; i < k; i++)
    {
        cout << arr3[i] << " ";
    }
    return 0;
}