#include using namespace std; int main(void) { int int01; string str01, str02, result; cin >> int01; for (int i = 0; i < int01; i++) { cin >> str01; result += str01; } for (int i = 0; i < int01 - 1; i++) { cin >> str02; int pos = result.find(str02); int len = str02.length(); result = result.replace(pos, len, ""); } cout << result << endl; return 0; }