#include<set>
#include<algorithm>
#include<iostream>
using namespace std;
int main() {
    int n;
    cin >> n;
    set<int> s1, s2, s;
    for (int i = 0; i < n ;i++) {
        int t;cin >> t;
        s1.insert(t);
    }
    cin >> n;
    for (int i = 0;i < n; i++) {
        int t;cin >> t;
        s2.insert(t);
    }
    set_symmetric_difference(s1.begin(), s1.end(), s2.begin(), s2.end(), inserter(s, s.begin()));
    for(auto it : s) {
        cout << it << endl;
    }
    return 0;
}
