Given two Linked Lists, append second Linked List to end of first Linked List and return the first list.
List 1: 1→3→4→7
List 2: 6→2→5
Result: 1→3→4→7→6→2→5
The first line contains ‘T’ denoting the number of independent test cases.
For each test case the input has three lines:
For each test case, the output has one line with space-separated integers.
2
4 3
1 3 4 7
6 2 5
1 3
3
4 5 6
1 3 4 7 6 2 5
3 4 5 6
1 <= T <= 100
1 <= n, m <= 1000
1 <= element <= 1000