#include <fstream>
using namespace std;
int main()
{
    ifstream f1("xuathien1lan.inp");
    ofstream f2("xuathien1lan.out");
    int i;
    f1 >> i;
    int a[i];
    for (int j = 0; j < i; j++) f1 >> a[j];
    f1.close();
    int y = i-1;
    for (int z = 0; z < i-1; z++)
    {
        if (a[z]==a[z+1]) y = y - 1;
    }
    if (y==0) f2 << 0;
    else
    {
        for (int n = 0; n < i; n++)
        {
            for (int m = 0; m < i; m++)
            {
                if (a[n] < a[m])
                {
                    int c = a[n];
                    a[n] = a[m];
                    a[m] = c;
                }
            }
        }
        for (int x = 0; x < i; x++)
        {
            if (a[x] != a[x+1]) f2 << a[x] << " ";
        }
    }
    f2.close();
    return 0;
}
