#include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repb(i,a,b) for(int i=a;i>=b;i--)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define int long long
#define fi first
#define se second
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

string t[10]={
	"* = ****",
	"* =* ***",
	"* =** **",
	"* =*** *",
	"* =**** ",
	" *= ****",
	" *=* ***",
	" *=** **",
	" *=*** *",
	" *=**** "
};

signed main(){
	string s;
	bool f=false;
	while(cin>>s){
		if(f) cout<<endl;
		else f=true;
		string ans[6];
		while(s.size()<5) s='0'+s;
		rep(i,0,s.size()) ans[i]=t[s[i]-'0'];
		rep(i,0,8){
			rep(j,0,5){
				cout<<ans[j][i];
			}
			cout<<endl;
		}
	}
}