#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

int addColomns(int input[]){
    int sum = 0;
    for(int i = 0; i < 5; i++){
        /*switch(input[i]){
            case 0: sum += 1;
            case 1: sum += 1;
            case 2: sum += 3;
            case 3: sum += 5;
            case 4: sum += 7;
            case 5: sum += 9;
            cout <<sum<<"\n";
        }*/

        if (input[i]== 0){
            sum += 1;
        }
        else if (input[i]== 1){
            sum += 1;
        }
        else if (input[i]== 2){
            sum += 3;
        }
        else if (input[i]== 3){
            sum += 5;
        }
        else if (input[i]== 4){
            sum += 7;
        }
        else if (input[i]== 5){
            sum += 9;
        }

    }

    return sum;
}



int main(){

    ifstream in("DATA1.txt");
    ofstream out1("OUT1.txt");

    int input[5];

    for(int i = 0; i < 5; i++){
        in >>  input[i];
    }

    int num = addColomns(input);
    char out[5][num] ;
    //cout << num;

    for(int i = 0; i < 5; i++){
        for(int j = 0; j < num; j++){
            out[i][j] = '.';
        }
    }

    //
    //
    int lastInt = 0;
        for(int i = 0; i < 5; i++){
            if (input[i]== 0){
                lastInt++;
            }
            else if (input[i]== 1){
                out[4][lastInt] = 'x';
                lastInt++;
            }
            else if (input[i]== 2){
                out[4][lastInt] = 'x';
                out[4][lastInt+1] = 'x';
                out[4][lastInt+2] = 'x';
                out[3][lastInt+1] = 'x';
                lastInt+=3;
            }
            else if (input[i]== 3){
                out[4][lastInt] = 'x';
                out[4][lastInt+1] = 'x';
                out[4][lastInt+2] = 'x';
                out[4][lastInt+3] = 'x';
                out[4][lastInt+4] = 'x';

                out[3][lastInt+1] = 'x';
                out[3][lastInt+2] = 'x';
                out[3][lastInt+3] = 'x';

                out[2][lastInt+2] = 'x';
                lastInt+=5;
            }
            else if (input[i]== 4){
                out[4][lastInt] = 'x';
                out[4][lastInt+1] = 'x';
                out[4][lastInt+2] = 'x';
                out[4][lastInt+3] = 'x';
                out[4][lastInt+4] = 'x';
                out[4][lastInt+5] = 'x';
                out[4][lastInt+6] = 'x';

                out[3][lastInt+1] = 'x';
                out[3][lastInt+2] = 'x';
                out[3][lastInt+3] = 'x';
                out[3][lastInt+4] = 'x';
                out[3][lastInt+5] = 'x';

                out[2][lastInt+2] = 'x';
                out[2][lastInt+3] = 'x';
                out[2][lastInt+4] = 'x';

                out[1][lastInt+3] = 'x';
                lastInt+=7;
            }
            else if (input[i]== 5){
                out[4][lastInt] = 'x';
                out[4][lastInt+1] = 'x';
                out[4][lastInt+2] = 'x';
                out[4][lastInt+3] = 'x';
                out[4][lastInt+4] = 'x';
                out[4][lastInt+5] = 'x';
                out[4][lastInt+6] = 'x';
                out[4][lastInt+7] = 'x';
                out[4][lastInt+8] = 'x';

                out[3][lastInt+1] = 'x';
                out[3][lastInt+2] = 'x';
                out[3][lastInt+3] = 'x';
                out[3][lastInt+4] = 'x';
                out[3][lastInt+5] = 'x';
                out[3][lastInt+6] = 'x';
                out[3][lastInt+7] = 'x';

                out[2][lastInt+2] = 'x';
                out[2][lastInt+3] = 'x';
                out[2][lastInt+4] = 'x';
                out[2][lastInt+5] = 'x';
                out[2][lastInt+6] = 'x';

                out[1][lastInt+3] = 'x';
                out[1][lastInt+4] = 'x';
                out[1][lastInt+5] = 'x';

                out[0][lastInt+4] = 'x';
                lastInt+=9;
            }
        }


    for(int i = 0; i < 5; i++){
        for(int j = 0; j < num; j++){
            out1<<out[i][j];
        }
        if( i != 4 ){
            out1<<"\n";
        }
    }

    return 0;
}

