#include<iostream>
#include<algorithm>
using namespace std;
const int N = 110;
int q[N];
int main()
{
int n;
cin >> n;
for(int i = 0; i < n; i++) cin >> q[i];
sort(q, q + n);
int t = unique(q, q + n) - q;
cout << t << endl;
for(int i = 0; i < t; i++) cout << q[i] << " ";
return 0;
}