#include <bits/stdc++.h>
using namespace std;
int main(void) {
   set<int> st1;
   set<int> st2;
   set<int> result;
   int n,a,m,b;
   cin >> n;
   for (int i=0;i<n;i++) {
       cin >> a;
       st1.emplace(a);
   }
   cin >> m;
   for (int j=0;j<m;j++) {
       cin >> b;
       st2.emplace(b);
   }
   set_symmetric_difference(st1.begin(),st1.end(),st2.begin(),st2.end(),inserter(result,result.end()));
   auto itr1 = result.begin();
   auto itr2 = result.end();
   for (itr1;itr1!=itr2;++itr1) {
       cout << *itr1 << endl;
   }
}

