#include <bits/stdc++.h>
#define int long long
#define iostream() ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
using namespace std;
const int maxn = 1e6+7;
const int MAXN = maxn / 2;
signed main()
{
iostream();
int n;
cin >> n;
string temp;
vector<string>v;
while (cin >> temp) v.push_back(temp);
while (v.size())
{
if (count(v.begin(),v.end(),v.back()) == 1)
{
cout << v.back();
return 0;
}
}
return 0;
}