Given a linked list, find the middle element and print its value.
If the list has even number of elements, print the first of the two middle elements.
List: 1→8→3
Middle element: 8
List: 1→3→8→5
Middle element: 3
The first line contains ‘T’ denoting the number of independent test cases.
For each test case the input has two lines:
For each test case, a line containing an integer denoting the middle element of the linked list.
2
4
3 4 5 6
1
3
4
3
1 <= T <= 100
1 <= n <= 103
1 <= element <= 105