#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
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;
}
