AT_arc224_a [ARC224A] Attach 00

Description

Find the minimum value of a positive integer $ n $ satisfying the following two conditions. - $ n $ is a multiple of $ K $ . - In the decimal representation of $ n $ , `0` appears two or more times consecutively. $ T $ test cases are given; solve each of them.

Input Format

The input is given from Standard Input in the following format, where $ \mathrm{case}_i $ denotes the $ i $ -th test case: > $ T $ $ \mathrm{case}_1 $ $ \vdots $ $ \mathrm{case}_T $ Each test case is given in the following format: > $ K $

Output Format

Output $ T $ lines. The $ i $ -th line should contain the answer for the $ i $ -th test case.

Explanation/Hint

### Sample Explanation 1 This input contains three test cases. For the first test case, the minimum value satisfying the conditions is $ 1003\ (= 17 \times 59) $ . For the second test case, the minimum value satisfying the conditions is $ 34005\ (= 6801 \times 5) $ . Note that $ 20403\ (= 6801 \times 3) $ does not satisfy the condition. For the third test case, the minimum value satisfying the conditions is $ 16970154001\ (= 998244353 \times 17) $ . As this shows, the answer may not fit in a $ 32 $ -bit integer. ### Constraints - $ 1 \leq T \leq 10^5 $ - $ 1 \leq K \leq 10^9 $ - All input values are integers.