#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp, i, x = 0, arr[100] = {0};
  map<long long, long long> inx;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> temp;
    inx[temp] = i;
  }
  for (map<long long int, long long int>::iterator it = inx.begin();
       it != inx.end(); ++it) {
    arr[it->second] = it->first;
  }
  cout << inx.size() << endl;
  for (i = 0; i < n; i++) {
    if (arr[i] != 0) cout << arr[i] << " ";
  }
  return 0;
}
