Given a Linked list of size **N**, the list is in alternating ascending and descending orders, your task is to complete the function **sort()** that sorts the given linked list in non-decreasing order.

```
Example:
Input List:
```**10**->40->**53**->30->**67**->12->**89**->NULL
Output List: 10->12->30->43->53->67->89->NULL

**Input:**

The function takes a single argument as input the reference pointer to the **head** of the linked list.

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

**Output:**

For each test case function should return reference pointer to the head of the new linked list.

**Constraints:**

1<=T<=100

1<=N<=100

0<=A[]<=10^{3}

**Example:
Input:**

2

6

1 9 2 8 3 7

5

13 99 21 80 50

1 2 3 7 8 9

13 21 50 80 99

**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.

Ibrahim Nash | 103 |

Stark_Maverick | 77 |

Eduardo Feo | 66 |

Rohit Sharma 16 | 65 |

Micky_Kt | 62 |

Lam Ngoc Pham | 463 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 369 |

Ibrahim Nash | 343 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2030 |

Jasleen Kaur 2 | 2012 |

Quandray | 1969 |