#include<bits/stdc++.h>
using namespace std;
int main() {
  
    string m[5][5] = {
        { 
            ".....",
            ".***.",
            ".***.",
            ".***.",
            "....."
        },
        { 
            "****.",
            "****.",
            "****.",
            "****.",
            "****."
        },
        { 
            ".....",
            "****.",
            ".....",
            ".****",
            "....."
        },
        {  
            ".....",
            "****.",
            ".....",
            "****.",
            "....."
        }
    };
    string n;
    cin >> n;  
    string a=0,b=0,c=0,d=0,e=0;
    for (int i = 0; i < n.size(); i++) {
        int num = n[i] - '0'; 
        a += m[num][0];
        b += m[num][1];
        c += m[num][2];
        d += m[num][3];
        e += m[num][4];
    }
    cout << a << endl;
    cout << b << endl;
    cout << c << endl;
    cout << d << endl;
    cout << e << endl;
    return 0;
}