#include<iostream>
#include<string>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

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

int main(){
	string s;
	int cnt=0;
	while(cin>>s){
		if(cnt>0)cout<<endl;
		if(s.size()<5){
			while(s.size()<5){
				s='0'+s;
			}
		}
		rep(i,8){
			string temp="";
			rep(j,s.size()){
				temp+=num[s[j]-'0'][i];
			}
			cout<<temp<<endl;
		}
		cnt++;
	}
	return 0;
}