#include<iostream>
using namespace std;
int main(){
string b[] = {"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "},i;
int f=0,k,l;
while(cin>>i,!cin.eof()){
f&&cout<<endl;
f?:f=1;
while(i.size()<5)i='0'+i;
for(k=0;k<8;k++){
for(l=0;l<5;l++)cout<<b[i[l]-'0'][k];
cout<<endl;
}
}
}