Problem:
Set Symmetric Difference

Find the symmetric difference of two sets $A = \{a_0, a_1, ..., a_{n-1}\}$ and $B = \{b_0, b_1, ..., b_{m-1}\}$.

Input

The input is given in the following format.

$n$
$a_0 \; a_1 \; ... \; a_{n-1}$
$m$
$b_0 \; b_1 \; ... \; b_{m-1}$

Elements in $A$ and $B$ are given in ascending order. There are no duplicate elements in each set.

Output

Print elements in the symmetric difference in ascending order. Print an element in a line.

Constraints

$1 \leq n, m \leq 200,000$

$0 \leq a_0 < a_1 < ... < a_{n-1} \leq 10^9$

$0 \leq b_0 < b_1 < ... < b_{m-1} \leq 10^9$

Sample Input 1

7
1 2 3 4 5 6 7
4
2 4 6 8

Sample Output 1

1
3
5
7
8

Solution in C (judge verdict: Accepted)

// AOJ ITP2_9_D Set Symmetric Difference
// 2019.3.8 bal4u

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#if 1
#define gc() getchar_unlocked()
#define pc(c) putchar_unlocked(c)
#else
#define gc() getchar()
#define pc(c) putchar(c)
#endif

int in()   // 非負整数の入力
{
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

void out(int n)    // 非負整数の表示　最後に改行あり
{
	int i;
	char ob[20];

	if (!n) pc('0');
	else {
		//		if (n < 0) pc('-'), n = -n;
		i = 0; while (n) ob[i++] = n % 10 + '0', n /= 10;
		while (i--) pc(ob[i]);
	}
	pc('\n');
}

#define INF 1000000001
int n, m;
int a[200002], b[200002];

int main()
{
	int i, j;

	n = in();
	for (i = 0; i < n; i++) a[i] = in();
	a[i] = INF;
	m = in();
	for (j = 0; j < m; j++) b[j] = in();
	b[j] = INF;
	i = j = 0; while (1) {
		while (a[i] < b[j]) out(a[i++]);
		while (b[j] < a[i]) out(b[j++]);
		if (a[i] == INF) break;
		if (a[i] == b[j]) i++, j++;
	}
	return 0;
}