Given two linked lists, find the node at which they intersect.
Here the linked lists A and B intersect at C1.
If the two lists do not intersect, return null.
The first line contains âTâ denoting the number of independent test cases.
For each test case, the input has five lines:
For each test case, a line with the value of the node where A and B intersect. If they do not intersect, output -1.
3
3 3
4 5 6
7 8 9
3
1 2 3
0 4
4 5 6 7
2
8 9
2 3
1 2
3 4 5
0
1
8
-1
1 <= T <= 10
0 <= L1, L2, L3 <= 104
1 <= nodeValue < = 105