#include <iostream>
#include <string>
using namespace std;

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

int main(){
	string n;
	for(int f=0;cin>>n;f++){
		if(f)cout<<endl;
		for(;n.size()<5;n="0"+n);
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				int k=n[j]-'0';
				cout<<data[k][i];
			}
			cout<<endl;
		}
	}
	
	return 0;
}
