#t116. 打印数字

打印数字

Printing Digit Patterns

Problem Description

Little Yang designed a representation for the digits 00, 11, 22 and 33, each occupying a 5×55 \times 5 grid. The representations are as follows:

..... ****. ..... .....
.***. ****. ****. ****.
.***. ****. ..... .....
.***. ****. .**** ****.
..... ****. ..... .....

Little Yang wants you to convert a given number nn into its corresponding representation.

Input Format

The first line contains a non-negative integer nn.

Output Format

Output the corresponding representation.

Sample Input

12230

Sample Output

****.....................
****.****.****.****..***.
****.................***.
****..****.********..***.
****.....................

Sample Explanation

The input number is 1223012230, corresponding in order to the digits 11, 22, 22, 33, 00. Each digit's pattern is a 5×55 \times 5 grid of characters. When concatenating, join the patterns row by row: for row 1, take digit 1's row 1 ****., digit 2's row 1 ....., then another digit 2's row 1 ....., digit 3's row 1 ....., and digit 0's row 1 .....; concatenate them in order and drop the separating spaces to get ****...................... Repeat the same process for rows 2 to 5 to obtain the final 5-line output shown above.

Constraints

For all data, 0≤n≤1060 \le n \le 10^6, and nn consists only of the digits 00, 11, 22, 33.