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: ./. .|.. /o. 5: \o/. .|.. /.. 1: .o.. /|. /.. 6: \o_. |.. .|.. 2: .... .... __\o 7: \o/. |/. .... 3: .... .... _\o 8: .... .__o /..| 4: o. .|.. /.. 9: .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 First line of the input contains an integer M (1 ≤ M ≤ 100), 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 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 correctly. Sample Input 2 171 151415 Sample Output o \o/ o /|\ |/ /|\ /\ /
o \o/ o o o \o/ /|\ | /|\ | /|\ | //////