#include <iostream>
#include <cstdio>

using namespace std;

const string abacus[] = {"* = ****",
                         "* =* ***",
                         "* =** **",
                         "* =*** *",
                         "* =**** ",
                         " *= ****",
                         " *=* ***",
                         " *=** **",
                         " *=*** *",
                         " *=**** "};
const int height = 8;

int main()
{
    string s;
    bool flag = false;
    int index;

    while (cin >> s) {
        if (flag)
            putchar('\n');

        while (s.size() < 5)
            s = '0' + s;

        for (int i = 0; i < height; i++) {
            for (int j = 0; j < s.size(); j++) {
                index = (int)(s[j] - '0');
                putchar(abacus[index][i]);
            }
            putchar('\n');
        }
        flag = true;
    }

    return 0;
}