Given a doubly linked list, a position p and an integer x your task is to add a new node with value x at position just after pth node in the doubly linked list .
In this function problem, the function addNode() takes three argument: Address of the head of the linked list, the position p and integer x where the node is to be added .
There are multiple test cases. For each test case, this function will be called individually.
Note: The first node is considered as node no 0.
The first line contains an integer 'T' denoting the number of test cases. Then 'T' test cases follow. Each test case consists of 3 lines. First line of each test case contains an integer N denoting the size of the linked list. Second line of each test case consists of 'N' space separated integers denoting the elements of the linked list.The third line contains two integers p and x
Prints the nodes of the linked list .
2 4 5
1 2 3 4
2 4 5 6
1 44 2 3 4
Note: The Input/Ouput format and Example given below is used for system's internal purpose, and should be used by a user for Expected Output only. As it is a function problem, hence a user should not read any input from stdin/console, and should not print anything on st stdout/console.