Canadian Computing Competition: 2002 Stage 1, Junior #1
_ _ _ _ _ _ _ _
| | | _| _| |_| |_ |_ | |_| |_|
|_| | |_ _| | _| |_| | |_| _|
Most digital devices show numbers using a seven segment display. The seven segments are arranged as shown:
* * *
* *
* *
* *
* * *
* *
* *
* *
* * *
For this problem, each segment is represented by three asterisks in a line as shown above.
Any digit from 0 - 9 can be shown by illuminating the appropriate segments. For example, the digit 1 may be displayed using the two segments on the right side:
*
*
*
*
*
*
The digit 4 needs four segments to display it properly:
* *
* *
* *
* * *
*
*
*
Input Specification
The first line contains a single integer,
.
On the next lines, the
line will contain a non-empty string of digits
. It is possible for
to start with the digit 0.
The total length of all will not exceed
digits.
Output Specification
For each , display the digits using a seven segment display. Separate each digit with a single whitespace. None of your lines should contain any trailing whitespace.
Outputs for different are separated by a blank line.
Sample Input
3
01
1
39
Sample Output
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
*
*
*
*
*
*
* * * * * *
* * *
* * *
* * *
* * * * * *
* *
* *
* *
* * * * * *
Comments