1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
//  main.cpp
//  Zaklocenia
//
//  Created by Wiktor Szulc on 08/12/2021.
//

#include <iostream>
using namespace std;

int iljed=0;
int main()
{
    int n;
    string as;
    cin >> n >> as;
    for(int i=0; i<n*8; i++)
    {
        iljed+=as[i]-48;
    }
    for(int j=0; j<n; j++)
    {
        if(iljed%6==0)
        {
            cout << "o";
            iljed-=6;
        }
        else if(iljed%5==0)
        {
            cout << "m";
            iljed-=5;
        }
        else if(iljed%4==0)
        {
            cout << "c";
            iljed-=4;
        }
        else if(iljed%3==0)
        {
            cout << "b";
            iljed-=3;
        }
        else cout << "NIE";
    }
    return 0;
}