#include <iostream>
#include <string>
#include <vector>
using namespace std;

string abacus[] = {
    "* = ****",
    "* =* ***",
    "* =** **",
    "* =*** *",
    "* =**** ",
    " *= ****",
    " *=* ***",
    " *=** **",
    " *=*** *",
    " *=**** "
};

void print(int n) {
    vector<string> v;
    for (int k=10000; k>=1; k/=10) {
        v.push_back(abacus[n / k]);
        n %= k;
    }
    for (int i=0; i<8; ++i) {
        for (int j=0; j<5; ++j) {
            cout << v[j][i];
        }
        cout << endl;
    }
}

int main() {
    int n;
    bool lf = false;
    while (cin >> n) {
        if (lf) cout << endl;
        print(n);
        lf = true;
    }
    return 0;
}