Problem: <image>


At the request of a friend who started learning abacus, you decided to create a program to display the abacus beads. Create a program that takes a certain number as input and outputs a row of abacus beads. However, the number of digits of the abacus to be displayed is 5 digits, and the arrangement of beads from 0 to 9 is as follows using'*' (half-width asterisk),''(half-width blank), and'=' (half-width equal). It shall be expressed as.

<image>



Input

Multiple test cases are given. Up to 5 digits (integer) are given on one line for each test case.

The number of test cases does not exceed 1024.

Output

Output the abacus bead arrangement for each test case. Insert a blank line between the test cases.

Example

Input

2006
1111


Output

****
    *
=====
 *  *
****
* ***
*****
*****

*****

=====
 ****
*
*****
*****
*****

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
 
public class Main {
	private	static	BufferedReader	br = null;
	private	static	int[]			at = { 0x0000004F, 0x00000057, 0x0000005B, 0x0000005D, 0x0000005E, 0x0000002F, 0x00000037, 0x0000003B, 0x0000003D, 0x0000003E };

	static {
		br = new BufferedReader(new InputStreamReader(System.in));
	}
 
    /**
     * @param args
     */
	public static void main(String[] args) {
		String  stdin = null;
		boolean	first = true;
		int[]	map   = new int[5];

		while ((stdin = parseStdin()) != null) {
//			int		i = 0;
			int	l = stdin.length();

			Arrays.fill(map, at[0]);
			for (int i = 0; i < l; i++) {
				map[4-i] = at[stdin.codePointAt(l-i-1)-'0'];
			}

			if (!first) {
				System.out.println("");
			} else {
				first = false;
			}

			for (int i = 6; i >= 5; i--) {
				int		b = 1 << i;
				String	o = "";
				for (int j = 0; j < 5; j++) {
					o += ((map[j] & b) > 0) ? "*" : " "; 
				}
				System.out.println(o);
			}

			System.out.println("=====");

			for (int i = 4; i >= 0; i--) {
				int		b = 1 << i;
				String	o = "";
				for (int j = 0; j < 5; j++) {
					o += ((map[j] & b) > 0) ? "*" : " "; 
				}
				System.out.println(o);
			}
		}
	}

	private static String parseStdin() {
		String  stdin = null;

		try {
			String  tmp = br.readLine();
			if (tmp != null) {
				if (!tmp.isEmpty()) stdin = tmp;
			}
		}
		catch (IOException e) {}

		return stdin;
	}
}