**Compilation/Execution Result:**

Given a sorted doubly linked list and an element **X**, your task is to complete the function **sortedInsert()**, that insert's the value in Doubly linked list in sorted way.

Example: Initial doubly linked list: Doubly Linked List after insertion of 9:

**Input:**

The function takes two arguments as input, reference pointer to the **head** of the doubly linked list and an element **X**.

There will be **T** test cases and for each test case the function will be called separately.

**Output:**

For each test print the space separated vales of the doubly linked list.

**Constraints:**

1<=T<=100

0<=N<=1000

**Example:
Input:**

2

5

1 9 16 25 78

2

3

1 2 3

5

1 2 9 16 25 78

1 2 3 5

**Note:**The **Input/Ouput** format and **Example** given are 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. The task is to complete the function specified, and not to write the full code.

rksingh | 54 |

Lam Ngoc Pham | 53 |

Shashank_Pathak | 44 |

yash46 | 37 |

Manoj Kumar 36 | 35 |

Shashank_Pathak | 628 |

surbhi_7 | 556 |

dark_knights | 554 |

Infinty | 344 |

Vasudha Gupta | 340 |

akhayrutdinov | 4156 |

sanjay05 | 3611 |

Quandray | 2811 |

Ibrahim Nash | 2475 |

Michael Riegger | 2290 |