#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<cstdlib>
#include<iomanip>
#include<queue>
#include<set>
#include <valarray>
#include<stack>
#include<sstream>
using namespace std;

void Solution()
{
    bool flag = false;
    
    string s;
    string ans[10] =
    {
        "* = ****",
        "* =* ***",
        "* =** **",
        "* =*** *",
        "* =**** ",
        " *= ****",
        " *=* ***",
        " *=** **",
        " *=*** *",
        " *=**** "
    };
    
    while(cin>>s)
    {
        if(flag)
        {
            cout << endl;
        }
        else
        {
            flag = true;
        }
        
        while(s.size() < 5)
        {
            s = '0' + s;
        }
        
        for(int i = 0; i < 8; i++)
        {
            for(int j = 0; j < 5; j++)
            {
                cout << ans[s[j] - '0'].at(i);
            }
            
            cout << endl;
        }
    }
}

int main()
{
    Solution();
    return 0;
}