#Lutece0507. 搜索乘数

搜索乘数

Migrated from Lutece 507 搜索乘数

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

任给一个不能被55整除的奇数pp(不超过44位),求乘数ss,使p×sp\times s的每一位数字均为11

Input

有多组测试数据。输入的第一行是整数TT(1T2001\leq T\leq 200),表示随后测试数据的组数。每组测试数据占一行,由一个不超过44位的整数组成。

Output

对应每组测试数据,输出对应的乘数ss,使得p×sp\times s的每一位数字全为11。每组输出占一行。

Samples

1
43
2583979328165374677

Resources

wxiaoping