D

Help Dexter

You know Dexter, right? He is a very talented young scientist. He has a huge lab hidden inside his building. He made all possible security arrangement to keep his naughty sister Dee Dee away from his lab. But she always finds a way into the lab. One day Dee Dee came to the lab and started her usual work, messing up Dexter's lab! Dexter was working on a very important project, so he begged to her and said, http://cdn102.iofferphoto.com/img/item/462/952/61/Dexters-Lab.gif"Please!!! Not today. I will do anything for you, but please leave this lab today!!!" Dee Dee was waiting for this chance, she said, "Ok, you do my homework I won't disturb you today." What can Dexter do? He agreed. Dee Dee said, "My teacher told me to write down 17 numbers. First one single digit number, second one two digit number, ..., nth one n digit number. They will consist of only digit 1 and 2 and the nth number should be divisible by 2n." Dexter thought, "I have very little time to finish the project. I can't waste my time for this silly problem, I have bigger problem to think!" So, he sent the modified version of this problem to you. Hurry up, Dee Dee is waiting.

Input

Input starts with an integer T (≤ 300), denoting the number of test cases.

Each case starts with two integers: p q (1 ≤ p, q ≤ 17).

Output

For each case, print the case number first. Then you have to find two integers (smallest and largest) which have p digits and is divisible by 2q. The integers should contain only 1's and 2's. If no result is found, print "impossible". If there is only one integer, then print that integer. Otherwise print both integers (first the smallest one then the largest one) separated by a single space.

Sample Input

Output for Sample Input

3
2 2
2 1
2 3
Case 1: 12
Case 2: 12 22
Case 3: impossible

Problem Setter: Md Mahbubul Hasan, Jane Alam Jan, Special Thanks: Sohel Hafiz