#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int main() { int N; cin >> N; map mp; for (int i = 0; i < N; i++) { string s; cin >> s; mp[s]++; } for (int i = 0; i < N - 1; i++) { string s; cin >> s; mp[s]--; } for (auto p: mp) { if (p.second > 0) { cout << p.first << endl; return 0; } } return 0; }