#include<iostream>
using namespace std;
string s[]={
	"* = ****",
	"* =* ***",
	"* =** **",
	"* =*** *",
	"* =**** ",
	" *= ****",
	" *=* ***",
	" *=** **",
	" *=*** *",
	" *=**** ",
};
int main()
{
    int cnt=0;
	string t;
	while(cin>>t)
	{
	    if(cnt++>0)cout<<endl;
	    while(t.size()<5)t="0"+t;
		for(int i=0;i<8;i++)
		{
			for(int j=0;j<t.size();j++)
			{
				cout<<s[t[j]-'0'][i];
			}
			cout<<endl;
		}
	}
}

