#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
using namespace std;
 
int main(){
    string s;
    string soro[10] = {"* = ****",
                        "* =* ***",
                        "* =** **",
                        "* =*** *",
                        "* =**** ",
                        " *= ****",
                        " *=* ***",
                        " *=** **",
                        " *=*** *",
                        " *=**** "};
    bool flag = true;
    while(cin >> s){
        vector<char> c;
        for(int i=0;i<s.size();i++){
            c.push_back('0');
        }
        for(int i=0;i<s.size();i++){
            c.push_back(s[i]);
        }
        if(flag){
            flag = false;
        }else{
            cout << endl;
        }
 
        for(int i=0;i<8;i++){
            for(int j=0;j<5;j++){
                cout << soro[c[j]-'0'][i];
            }
            cout << endl;
        }
    }
    return 0;
}

