1538: Is It Easy?

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:2 通过:2

题目描述

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.