#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main(void)
{
    int n, m, in;
    string key;
    set<int> A;
    set<int> B;
    vector<int> result;
    cin >> n;
    rep(i, n)
    {
        cin >> in;
        A.insert(in);
    }
    cin >> m;
    rep(i, m)
    {
        cin >> in;
        B.insert(in);
    }
    set_symmetric_difference(A.begin(), A.end(), B.begin(), B.end(), inserter(result, result.end()));
    
    rep(i, result.size())
    {
        cout << result[i] << endl;
    }
}

