#include <iostream>

using namespace std;

string note[252];
int n;

void r1()
{
    cout << "----|-\\-----";
    for (int i = 1; i <= n; ++i)
        cout << "-----";
    cout << "--+\n";
}

void r2()
{
    cout << "----|-/-----";
    for (int i = 1; i <= n; ++i)
        cout << "     ";
    cout << "  |\n";
}

void r3()
{
    cout << "----|-/-----";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "A" || note[i] == "A#")
            cout << "---|-";
        else
            cout << "-----";
    }
    cout << "--|\n";
}

void r4()
{
    cout << "    |/   4  ";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "G" || note[i] == "G#" || note[i] == "A" || note[i] == "A#")
            cout << "   | ";
        else
            if (note[i] == "C2")
                cout << " (@) ";
            else
                if (note[i] == "C2#")
                    cout << "#(@) ";
                else
                    cout << "     ";
    }
    cout << "  |\n";
}

void r5()
{
    cout << "---/|-------";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "F" || note[i] == "F#" || note[i] == "G" || note[i] == "G#" || note[i] == "A" || note[i] == "A#" || note[i] == "C2" || note[i] == "C2#")
            cout << "---|-";
        else
            if (note[i] == "B")
                cout << "-(@)-";
            else
                cout << "-----";
    }
    cout << "--|\n";
}

void r6()
{
    cout << "  / |    4  ";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "E" || note[i] == "F" || note[i] == "F#" || note[i] == "G" ||
            note[i] == "G#" || note[i] == "B" || note[i] == "C2" || note[i] == "C2#")
                cout << "   | ";
        else
            if (note[i] == "A")
                cout << " (@) ";
            else
                if (note[i] == "A#")
                    cout << "#(@) ";
                else
                    cout << "     ";
    }
    cout << "  |\n";
}

void r7()
{
    cout << "-{--|-\\-----";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "D" || note[i] == "D#" || note[i] == "E" || note[i] == "F" || note[i] == "F#")
            cout << "---|-";
        else
            if (note[i] == "G")
                cout << "-(@)-";
            else
                if (note[i] == "G#")
                    cout << "#(@)-";
                else
                    if (note[i] == "B" || note[i] == "C2" || note[i] == "C2#")
                        cout << "-|---";
                    else
                        cout << "-----";
    }
    cout << "--|\n";
}

void r8()
{
    cout << "  \\_|_/     ";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "C" || note[i] == "C#" || note[i] == "D" || note[i] == "D#" || note[i] == "E")
            cout << "   | ";
        else
            if (note[i] == "F")
                cout << " (@) ";
            else
                if (note[i] == "F#")
                    cout << "#(@) ";
                else
                    if (note[i] == "B")
                        cout << " |   ";
                    else
                        cout << "     ";
    }
    cout << "  |\n";
}

void r9()
{
    cout << "----|\\------";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "C" || note[i] == "C#" || note[i] == "D" || note[i] == "D#")
            cout << "---|-";
        else
            if (note[i] == "E")
                cout << "-(@)-";
            else
                cout << "-----";
    }
    cout << "--+\n";
}

void r10()
{
    cout << "    |_}     ";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "C" || note[i] == "C#")
            cout << "   | ";
        else
            if (note[i] == "D")
                cout << " (@) ";
            else
                if (note[i] == "D#")
                    cout << "#(@) ";
                else
                    cout << "     ";
    }
    cout << "   \n";
}

void r11()
{
    cout << "            ";
    for (int i = 1; i <= n; ++i)
    {
        if (note[i] == "C")
            cout << " (@) ";
        else
            if (note[i] == "C#")
                cout << "#(@) ";
            else
                cout << "     ";
    }
    cout << "   \n";
}

int main()
{
    cin >> n;

    for (int i = 1; i <= n; ++i)
        cin >> note[i];

    r1();
    r2();
    r3();
    r4();
    r5();
    r6();
    r7();
    r8();
    r9();
    r10();
    r11();

    return 0;
}