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.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.*;

class Main
{
    public static char [][] transpose(char [][] p)  // p: m(rows) x n(columns)
    {
	int m = p.length;
	int n = p[0].length;
	char [][] q = new char [8][5];
	
	for (int i=0; i<5; i++){
	    for (int j=0; j<8; j++){
		q[j][i]=p[i][j];
	    }
	}

	return q;
    }

    public static char [][] conv(int n)
    {
	char [][] a = {    // char[9][8] a; 
	    {'*',' ','=',' ','*','*','*','*'}, 
	    {'*',' ','=','*',' ','*','*','*'}, 
	    {'*',' ','=','*','*',' ','*','*'}, 
	    {'*',' ','=','*','*','*',' ','*'}, 
	    {'*',' ','=','*','*','*','*',' '}, 
	    {' ','*','=',' ','*','*','*','*'}, 
	    {' ','*','=','*',' ','*','*','*'}, 
	    {' ','*','=','*','*',' ','*','*'}, 
	    {' ','*','=','*','*','*',' ','*'}, 
	    {' ','*','=','*','*','*','*',' '} };
	int[] p = new int[5];
	String s = String.format("%05d", n);
	for (int i=0; i<5; i++){
	    p[i]=Integer.parseInt(s.substring(i,i+1));
	}
	char [][] m = new char [5][8];
	for (int i=0; i<5; i++){
	    for (int j=0; j<8; j++){
		m[i][j] = a[p[i]][j];
	    }
	}
	
	return transpose(m);
    }

    public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 
	/*
	  if true then
	  fh=STDIN
	  else
	  fh=open("in1_0128.txt")
	  end
	*/
	String line=null;
        boolean first = true;
	List<String> glyph = new ArrayList<String>();
	while ((line=br.readLine()) != null) {
	    int n=Integer.parseInt(line);
	    char [][] q = conv(n);
	    if (!first)
		System.out.println("");
	    for (int i=0; i<8; i++){
		System.out.println(q[i]);
	    }
	    first = false;
	}

	for  (int i=0; i<glyph.size()-1; i++){
	    System.out.println(glyph.get(i));
	    if (i != glyph.size()-1)
		System.out.println();
	}
    }

}