#include #include #include #include using namespace std; int main() { int N; cin >> N; queue Q; for (int i = 0; i < N; i++) { string S; cin >> S; Q.push(S); } for (int i = 0; i < N - 1; i++) { string S; cin >> S; if (Q.front() != S) { break; } Q.pop(); } cout << Q.front() << endl; return 0; }