#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
char a[11][86]={
 "----|-\\-----------------------------------------------------------------------------+"
,"    |  }                                                                            |"
,"----|-/-----------------------------------------------------|----|------------------|"
,"    |/   4                                        |    |    |    |       (@) #(@)   |"
,"---/|-----------------------------------|----|----|----|----|----|--(@)--|----|-----|"
,"  / |    4                         |    |    |    |    |  (@) #(@)  |    |    |     |"
,"-{--|-\\------------------|----|----|----|----|--(@)-#(@)------------|----|----|-----|"
,"  \\_|_/        |    |    |    |    |  (@) #(@)                      |               |"
,"----|\\---------|----|----|----|--(@)------------------------------------------------+"
,"    |_}        |    |  (@) #(@)                                                      "
,"             (@) #(@)                                                                "},notes[250][5];
char note[15][4]={ "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "C2", "C2#"};
int main()
{   ifstream f("fis.in");
    int n;

    cin>>n;
    for(int k=0;k<n;k++)
        cin>>notes[k];

    for(int i=0;i<11;i++){

        for(int j=0;j<12;j++)
            cout<<a[i][j];
        for(int j=0;j<n;j++){
               int p=0;
            while(strcmp(notes[j],note[p])!=0) p++;
            //cout<<p;
            cout<<a[i][12+p*5]<<a[i][13+p*5]<<a[i][14+p*5]<<a[i][15+p*5]<<a[i][16+p*5];
            }
        for(int j=strlen(a[0])-3;j<=strlen(a[0]);j++)
            cout<<a[i][j];
        cout<<endl;
        }
    //cout << "Hello world!" << endl;
    return 0;
}