This problem is a programming version of Problem 4 from projecteuler.net
A palindromic number reads the same both ways. The smallest 6 digit palindrome made from the product of two 3-digit numbers is .
Find the largest palindrome made from the product of two 3-digit numbers which is less than .
First line contains that denotes the number of test cases. This is followed by lines, each containing an integer, .
Print the required answer for each test case in a new line.
Sample Input 0
Sample Output 0