#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cstdlib>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,k,n) for(int i=k;i<n;i++)

using namespace std;


int main()
{
	string s;
	string soro[10] = {"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "};
	bool flag = true;
	while(cin >> s)
	{
		vector<char> c;

		rep(i,5-s.size())
		{
			c.push_back('0');
		}

		rep(i,s.size())
		{
			c.push_back(s[i]);
		}

		if(flag)
		{
			flag = false;
		}
		else
		{
			cout << endl;
		}

		rep(i,8)
		{
			rep(j,5)
			{
				cout << soro[c[j]-'0'][i];
			}
			cout << endl;
		}
	}
	return 0;
}