XiaoMing is A Crazy Magician(ACM). He says that he can do something other couldn't do. Now, he began to perform a magic to us. "Hello, Everybody. I have five decimal numbers named a, b, c, d, e, (0 <= a, b, c, d, e <= 9) and I rearranged them, and then combined them into a number. For example = a*10000 + b*1000 + c*100 + d*10 + e*1. You know the number of permutations is 5! = 120. So you have 120 numbers in your hands, you can pick a number N from the 120 numbers and calculate the sum S of remain 119 numbers. AHA~, If you tell me the S, I can guess the N~!"
It's easy? Okay, you can challenge this.
The first line is a number T(1<=T<=10000), stands for the number of cases.
Each line will contain an integer S.
For each case, if the N is exist.output it including the leading zeros. Otherwise print "It's impossible.". one line per case.
2
2933266
2933270
00038
It's impossible.