Boys and girls

Time Limit: 2000/1000 MS (Java/Others)

Memory Limit: 32768/32768 K (Java/Others)

Description

In a big party,there are N people some are boys and the others are girls.Now we will ask them how many girls can they see around the party(expect themselves).And the number will be A1,A2,A3...AN.Then can you tell the total number of girls using the information above?If the information is wrong and doesn't correspond to a unique valid situation,just output"Impossible!".

Input

The first line will contain a integer T,then T cases.
At first,there is a integer N,means N people(1<=N<10000),then N integers A1,A2...AN,indicating how many girls he/she sees(except himself/hersels).

Output

If the information correspond to a valid situation,output the number of people,otherwise output"Impossible!".

Sample Input

1 3 2 1 1

Sample Output

2

Hint

yifenfei

Source

ZJFC 2009-3 Programming Contest

提交代码