Given a array of n strings, find the longest common prefix among all strings present in the array.
The first line of the input contains an integer T which denotes the number of test cases to follow. Each test case contains an integer n. Next line has space separated n strings.
Print the longest common prefix as a string in the given array. If no such prefix exists print "-1"(without quotes).
geeksforgeeks geeks geek geezer
apple ape april