Each serial number consists of  single numbers
 single numbers 
 .
Valid serial numbers satisfy
.
Valid serial numbers satisfy 
 with
 with 
 . The
. The  is specific to and only known by the
cloister that has transcribed this book and is therefore able to check its origin.
 is specific to and only known by the
cloister that has transcribed this book and is therefore able to check its origin.
You are confronted with a pile of books that presumably have been transcribed by
a single cloister.
You are asked to write a computer program to determine that cloister, i.e. to
calculate the biggest possible  that makes the serial numbers of these books valid.
Obviously, no cloister has chosen
 that makes the serial numbers of these books valid.
Obviously, no cloister has chosen  . So if your calculations yield
. So if your calculations yield  ,
there must be something wrong.
,
there must be something wrong.
	
	Input 
Input starts with an integer  on a single line, the number of test cases (
 on a single line, the number of test cases (
 ).  Each test case starts with an integer
).  Each test case starts with an integer  on a single line,
the number of serial numbers you have to consider (
 on a single line,
the number of serial numbers you have to consider (
 ).
Each of the following
).
Each of the following  lines holds
 lines holds  integer numbers
 integer numbers
 (
 (
 ) separated by single spaces.
) separated by single spaces.
	Output 
For each test case, output a single line containing the largest possible  , so
that each given serial number for that test case is valid. If you cannot find a
, so
that each given serial number for that test case is valid. If you cannot find a
 satisfying the condition for all serial numbers or if the numbers are
valid independent of the choice of
 satisfying the condition for all serial numbers or if the numbers are
valid independent of the choice of  , output ``impossible'' (without
the quotes) on a single line.
, output ``impossible'' (without
the quotes) on a single line.
Sample Input
Sample Output