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 CPP):

Solution:
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
bool ex[10][5];
void print(string s)
{
	for(int i=0;i<5;i++)
	{
		if(s[i]-'0'<=4)cout << '*';
		else cout << ' ';
	}
	cout << endl;
	for(int i=0;i<5;i++)
	{
		if(s[i]-'0'<=4)cout << ' ';
		else cout << '*';
	}
	cout << endl;
	for(int i=0;i<5;i++)cout << '=';
	cout << endl;
	for(int i=0;i<5;i++)
	{
		for(int j=0;j<5;j++)
		{
			int p=s[j]-'0';
			if(ex[p][i])cout << '*';
			else cout << ' ';
		}
		cout << endl;
	}
	return;
}
int main()
{
	memset(ex,true,sizeof(ex));
	int l=0,r=5;
	for(int i=0;i<5;i++)
	{
		ex[l][i]=false;
		ex[r][i]=false;
		l++;r++;
	}
	string s;
	bool fir=true;
	while(cin >> s)
	{
		if(fir)fir=false;
		else cout << endl;
		string base;
		int sz=s.size();
		for(int i=0;i<5-sz;i++)base+='0';
		base+=s;
		print(base);
	}
	return 0;
}