Given an array of size n your goal is to find a number such that when the number is processed against each array element starting from the 0th index till the (n-1)-th index under the conditions given below, it never becomes negative.

- If the number is greater than an array element, then it is increased by difference of the number and the array element.
- If the number is smaller than an array element, then it is decreased by difference of the number and the array element.

**Input:**

First line consists of T, test cases. First line of every test case consists of N, denoting number of elements in array. Second line consists of elements of array.

**Output:**

Single line output, print the smallest possible number.

**Constraints:**

1<=T<=100

1<=N<=10^4

**Example:
Input:**

2

5

3 4 3 2 4

5

1 2 3 4 5

4

2

Ibrahim Nash | 79 |

Stark_Maverick | 77 |

Micky_Kt | 60 |

Lam Ngoc Pham | 58 |

Eduardo Feo | 58 |

Lam Ngoc Pham | 463 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 369 |

ioan | 323 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2028 |

Jasleen Kaur 2 | 2012 |

Quandray | 1965 |