Given an array **A** of size **N**. The contents of A are copied into another array **B** and numbers are shuffled. Also, one element is removed from B. The task is to find the missing element.

**Input:**

The first line of input contains an integer **T** denoting the number of test cases. Then T test cases follow. Each testcase contains **three **lines of input. The first line contains an integer **N**, where N is the size of array. The second line contains **N** space separated integers denoting elements of the array **A[ ]**. The third line contains **N-1** space separated integers denoting elements of the array **B[ ]**.

**Output:**

For each testcase, **print the missing number**.

**Constraints:**

1 <= T <= 1000

1 <= N <= 10^{7}

1 <= A, B <= 10^{10}

**Example:
Input:**

2

5

1 3 5 6 9

1 9 6 5

3

1 2 3

1 3

**Output:**

3

2

**Explanation:
Testcase1: **3 is the only element missing from B.

Author: sujnesh

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Sulagna | 117 |

RUTVIKHARIPARA | 116 |

janvidavda105190 | 93 |

harshsiddhapura105461 | 93 |

madhursengar24 | 86 |

PiyushPandey4 | 617 |

ASWATHAMA | 561 |

akhyasharma01 | 547 |

john_wick | 521 |

jagrit_07 | 448 |

blackshadows | 5362 |

Ibrahim Nash | 5242 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4598 |

Login to report an issue on this page.