#include <bits/stdc++.h>

using namespace std;

int main()
{
    int N;
    vector<int> A, B, Ans;
    
    cin >> N;
    A.resize(N);
    for(int i = 0; i < N; ++i)
      cin >> A[i];
    
    cin >> N;
    B.resize(N);
    for(int i = 0; i < N; ++i)
      cin >> B[i];
      
      
    set_symmetric_difference(A.begin(), A.end(), B.begin(), B.end(), inserter(Ans, Ans.end()));
    
    for(auto x : Ans)
      cout << x << endl;
    
    return 0;
}
