# include <iostream>
# include <cstdio>
# include <algorithm>
using namespace std;
int n,t;
int a[105],vis[105];
int main()
{
freopen("random.in", "r", stdin);
freopen("random.out", "w", stdout);
scanf("%d", &n);
t = n;
for (int i=1;i<=n;++i)
scanf("%d", &a[i]);
sort(a+1,a+n+1);
for (int i=1;i<n;++i)
if (a[i]==a[i+1])
{
vis[i+1] = 1;
t--;
}
printf("%d\n", t);
for (int i=1;i<=n;++i)
if (!vis[i])
printf("%d ", a[i]);
return 0;
}