#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,m;
    set <int> a,b;
    cin>>n;
    while(n--)
    {
        int x;
        cin>>x;
        a.insert(x);
    }
    cin>>m;
    while(m--)
    {
        int x;
        cin>>x;
        b.insert(x);
    }
    vector <int> c;
    set_symmetric_difference(a.begin(),a.end(),b.begin(),b.end(),back_inserter(c));
    for(int i=0;i<c.size();i++)
    {
        cout<<c[i]<<endl;
    }
    return 0;
}

