#include <bits/stdc++.h>   using namespace std;   using ll = long long;   using vi = vector<int>;   using pi = pair<int, int>;   const int mxn = 2e5;   int n;   string ar[mxn];   void solve() {     cin >> n;     for (int i = 0; i < n; ++i) cin >> ar[i];     set<string> second;     for (int i = n - 1; i >= 0; --i) {       if (second.count(ar[i])) continue;       cout << ar[i] <<   n ;       second.insert(ar[i]);     }   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int t;     t = 1;     while (t--) solve();   }   