Problem E: Exercising Emoticons

We are creating movies of an exercising stick man by combining frames. There are 10 character frames, each 4 characters wide and 3 characters high (labeled 0-9):

0: \./.    1: .o..     2: ....     3: ....     4: _o_.
   .|..       /|\.        ....        ....        .|..
   /o\.       /.\.        __\o        \_\o        /.\.

5: \o/.    6: \o_.     7: \o/.     8: ....     9: .o..
   .|..       \|..        \|/.        .__o        (.).
   /.\.       .|..        ....        /..|        /.\.

Note that dots in the frames are actually spaces, we used them here just to show that all frames are of the same size and to remove any ambiguities that may appear from the difference in shapes.

Input Format

First line of the input contains an integer M (1 ≤ M ≤ 20), the number of movies. Then follow M lines, each containing a description of a movie as a sequence of N decimal digits, containing at least one and not more than 72 digits.

Output Format

For each movie, output the corresponding sequence of frames as a single horizontal strip, with each frame separated by a single space (do not print an extra space after the last frame).

Print a blank line after each movie. To clarify: for each test case your output will have 3 lines with emoticons followed by a blank line. The number of characters on the lines containing an emoticon should be exactly 5*N-1.

Make sure to replace dots with spaces in your output - see the sample output. Backslashes also need to be escaped in order to be printed ("\\" instead of "\").

Sample Input

2
171
151415

Sample Output

 o   \o/   o  
/|\  \|/  /|\ 
/ \       / \ 

 o   \o/   o   _o_   o   \o/ 
/|\   |   /|\   |   /|\   |  
/ \  / \  / \  / \  / \  / \ 


Peter Høyer
ACPC 2013