QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#40021#993. 100 Boxes Per Hour...AutumnKiteAC ✓131ms3688kbC++171.9kb2022-07-15 20:02:352022-07-15 20:02:38

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-07-15 20:02:38]
  • 评测
  • 测评结果:AC
  • 用时:131ms
  • 内存:3688kb
  • [2022-07-15 20:02:35]
  • 提交

answer

#include <bits/stdc++.h>

const char name[] = "RGB";

// char p[100];
// int idx;

int get() {
  char c;
  std::cin >> c;
  // c = p[--idx];
  return std::find(name, name + 3, c) - name;
}

int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);

  int T;
  std::cin >> T;
  while (T--) {
    int A, B, C;
    std::cin >> A >> B >> C;
    // idx = 0;
    // for (int i = 0; i < A; ++i) {
    //   p[idx++] = name[0];
    // }
    // for (int i = 0; i < B; ++i) {
    //   p[idx++] = name[1];
    // }
    // for (int i = 0; i < C; ++i) {
    //   p[idx++] = name[2];
    // }
    // std::shuffle(p, p + idx, std::mt19937(time(0)));
    if (100 - std::max({A, B, C}) >= 43) {
      for (int i = 0; i < 100; ++i) {
        int x = get();
        if (x) {
          std::cout << "PLACE " << x << std::endl;
        } else {
          std::cout << "DISCARD" << std::endl;
        }
      }
    } else {
      int cnt[3] = {};
      int id[3] = {0, 1, 2};
      // int size[3] = {};
      for (int i = 0; i < 100; ++i) {
        int x = get();
        if (id[x]) {
          std::cout << "PLACE " << id[x] << std::endl;
          // ++size[id[x]];
          ++cnt[x];
        } else {
          int ymin = (x + 1) % 3, ymax = (x + 2) % 3;
          if (cnt[ymin] > cnt[ymax]) {
            std::swap(ymin, ymax);
          }
          if (cnt[x] >= cnt[ymin]) {
            std::cout << "EMPTY " << id[ymin] << std::endl;
            // size[id[ymin]] = 0;
            cnt[ymin] = cnt[x] = 0;
            std::swap(id[ymin], id[x]);
            std::cout << "PLACE " << id[x] << std::endl;
            // ++size[id[x]];
            ++cnt[x];
          } else {
            std::cout << "DISCARD" << std::endl;
            ++cnt[x];
          }
        }
      }
      // std::cerr << size[1] << " " << size[2] << "\n";
    }
  }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 40ms
memory: 3536kb

input:

100
3 33 64
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
84 8 8
B
B
B
R
R
R
R
R
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #2:

score: 0
Accepted
time: 47ms
memory: 3604kb

input:

100
14 28 58
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
G
G
57 29 14
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
...

output:

PLACE 2
EMPTY 1
PLACE 1
DISCARD
EMPTY 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLAC...

result:

ok OK

Test #3:

score: 0
Accepted
time: 57ms
memory: 3508kb

input:

100
31 17 52
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
83 6 11
G
G
G
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

PLACE 1
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #4:

score: 0
Accepted
time: 56ms
memory: 3424kb

input:

100
0 34 66
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
14 84 2
R
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #5:

score: 0
Accepted
time: 80ms
memory: 3544kb

input:

100
20 77 3
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
0 43 57
B
B
B
G
B
B
B
B
B
B
G
B
B
B
B
B
B
G
G
G
B
B
G
B
B
G
G
G
B
G
B
G
G
B
G
B
G
B
B
G
...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #6:

score: 0
Accepted
time: 64ms
memory: 3424kb

input:

100
14 68 18
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
R
R
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
66 0 34
G
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLAC...

result:

ok OK

Test #7:

score: 0
Accepted
time: 33ms
memory: 3516kb

input:

100
2 93 5
B
B
B
R
R
G
G
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
31 53 16
G
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
R
G
G
R
G
...

output:

PLACE 2
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLAC...

result:

ok OK

Test #8:

score: 0
Accepted
time: 102ms
memory: 3624kb

input:

100
6 14 80
B
B
B
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
2 5 93
G
B
R
R
B
R
G
R
B
R
R
B
R
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 2
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
DISCARD
DISCARD
DISCARD
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #9:

score: 0
Accepted
time: 60ms
memory: 3624kb

input:

100
42 58 0
R
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
11 30 59
R
G
G
B
G
B
R
G
B
G
B
G
B
G
G
B
G
G
G
G
G
G
B
G
G
B
G
R
G
R
B
G
G
G
G
B
B
G
R
G...

output:

EMPTY 1
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #10:

score: 0
Accepted
time: 85ms
memory: 3612kb

input:

100
57 22 21
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
R
22 42 36
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #11:

score: 0
Accepted
time: 60ms
memory: 3616kb

input:

100
69 27 4
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
19 61 20
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #12:

score: 0
Accepted
time: 98ms
memory: 3524kb

input:

100
54 31 15
B
R
B
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
R
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
69 6 25
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
B
R
R
B
R
R
B...

output:

PLACE 2
DISCARD
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #13:

score: 0
Accepted
time: 73ms
memory: 3552kb

input:

100
66 1 33
B
B
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
34 66 0
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
...

output:

PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #14:

score: 0
Accepted
time: 56ms
memory: 3448kb

input:

100
53 21 26
R
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
30 36 34
R
G
G
B
B
B
G
B
G
G
B
R
G
B
R
G
R
R
B
G
R
B
B
G
G
G
B
G
B
R
B
R
B
G
R
B
R
B
R
...

output:

DISCARD
PLACE 1
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #15:

score: 0
Accepted
time: 47ms
memory: 3536kb

input:

100
0 8 92
G
G
G
R
R
R
R
R
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
52 34 14
R
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
...

output:

PLACE 1
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #16:

score: 0
Accepted
time: 42ms
memory: 3608kb

input:

100
30 22 48
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
G
R
G
R
G
G
R
G
R
R
54 15 31
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #17:

score: 0
Accepted
time: 41ms
memory: 3548kb

input:

100
31 17 52
B
B
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
R
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
20 20 60
G
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 2
PLACE 2
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #18:

score: 0
Accepted
time: 98ms
memory: 3540kb

input:

100
58 14 28
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
B
B
15 31 54
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLAC...

result:

ok OK

Test #19:

score: 0
Accepted
time: 131ms
memory: 3524kb

input:

100
17 39 44
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
30 53 17
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

DISCARD
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #20:

score: 0
Accepted
time: 62ms
memory: 3540kb

input:

100
74 23 3
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
22 13 65
B
B
B
R
B
B
G
B
G
B
B
R
R
G
B
B
R
B
G
B
B
B
B
G
R
G
B
B
B
R
G
B
B
G
B
G
B
G
G
B...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLAC...

result:

ok OK

Test #21:

score: 0
Accepted
time: 29ms
memory: 3612kb

input:

100
66 0 34
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
31 52 17
G
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #22:

score: 0
Accepted
time: 43ms
memory: 3588kb

input:

100
19 64 17
B
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
4 6 90
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 2
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #23:

score: 0
Accepted
time: 49ms
memory: 3548kb

input:

100
36 60 4
G
B
B
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
R
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
20 77 3
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
...

output:

PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #24:

score: 0
Accepted
time: 26ms
memory: 3444kb

input:

100
58 26 16
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
B
G
G
B
G
G
G
G
G
G
G
G
47 53 0
G
B
B
G
B
B
G
B
B
B
B
B
B
G
B
G
G
G
G
G
B
B
B
B
B
G
G
B
G
G
G
B
B
B
G
B
G
B
G
B...

output:

EMPTY 1
PLACE 1
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #25:

score: 0
Accepted
time: 42ms
memory: 3552kb

input:

100
51 18 31
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
R
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
60 20 20
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
...

output:

PLACE 2
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #26:

score: 0
Accepted
time: 52ms
memory: 3624kb

input:

100
35 56 9
B
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
R
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
0 0 100
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 2
DISCARD
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #27:

score: 0
Accepted
time: 44ms
memory: 3528kb

input:

100
52 17 31
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
B
R
R
R
R
R
10 8 82
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
G
B
G...

output:

PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISC...

result:

ok OK

Test #28:

score: 0
Accepted
time: 37ms
memory: 3544kb

input:

100
17 52 31
R
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
32 1 67
G
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G...

output:

DISCARD
DISCARD
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #29:

score: 0
Accepted
time: 61ms
memory: 3428kb

input:

100
14 58 28
G
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
79 20 1
G
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R...

output:

PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #30:

score: 0
Accepted
time: 36ms
memory: 3616kb

input:

100
19 56 25
G
R
G
B
G
G
G
R
G
B
B
G
G
B
B
R
G
R
G
G
G
G
G
B
R
G
B
B
B
B
G
B
G
G
G
G
B
R
R
G
G
B
B
R
R
R
G
G
R
G
G
G
R
B
G
G
G
G
G
R
G
R
G
R
G
B
G
G
G
G
G
G
G
R
R
G
G
G
G
R
R
G
R
R
R
G
G
G
G
G
G
G
G
R
R
B
B
R
B
G
58 28 14
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
...

output:

PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
DISC...

result:

ok OK

Test #31:

score: 0
Accepted
time: 77ms
memory: 3548kb

input:

100
60 20 20
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
B
B
G
B
B
B
G
B
B
B
G
B
B
B
G
B
B
B
G
B
B
B
G
B
B
B
51 32 17
B
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #32:

score: 0
Accepted
time: 69ms
memory: 3508kb

input:

100
31 18 51
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
B
B
B
B
B
41 15 44
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

PLACE 1
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 1
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 1
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 1
PLACE 2
DISCARD
DISCARD
PLAC...

result:

ok OK

Test #33:

score: 0
Accepted
time: 31ms
memory: 3624kb

input:

100
28 58 14
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
R
B
B
20 20 60
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
...

output:

PLACE 2
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #34:

score: 0
Accepted
time: 63ms
memory: 3608kb

input:

100
13 29 58
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
15 31 54
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

PLACE 1
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #35:

score: 0
Accepted
time: 66ms
memory: 3524kb

input:

100
9 33 58
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
G
G
G
54 31 15
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLAC...

result:

ok OK

Test #36:

score: 0
Accepted
time: 105ms
memory: 3516kb

input:

100
53 31 16
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
19 20 61
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
...

output:

DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #37:

score: 0
Accepted
time: 59ms
memory: 3520kb

input:

100
52 11 37
G
G
G
G
G
R
R
G
R
G
R
G
R
R
G
B
R
B
G
G
R
B
G
R
G
R
G
R
R
G
R
R
G
R
G
R
G
G
R
G
R
B
B
G
G
G
G
G
G
R
R
R
R
B
G
R
B
G
R
R
R
B
R
R
G
G
G
G
G
R
G
B
G
R
R
R
G
G
G
G
G
B
R
G
R
G
R
R
G
R
G
G
B
G
G
G
G
G
G
G
73 18 9
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 1
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
DISCARD
PLACE 1
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 1
DISCARD
PLACE 1
PLAC...

result:

ok OK

Test #38:

score: 0
Accepted
time: 74ms
memory: 3508kb

input:

100
58 13 29
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
21 57 22
R
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #39:

score: 0
Accepted
time: 77ms
memory: 3516kb

input:

100
11 27 62
B
G
B
G
G
B
B
G
B
G
G
G
G
G
B
G
G
G
G
G
R
G
G
G
B
B
G
B
G
B
R
B
B
G
G
G
B
B
B
R
G
G
G
G
G
G
R
R
G
R
G
G
G
B
G
G
B
G
G
G
G
G
G
G
B
G
G
G
R
G
B
G
G
G
G
B
R
G
G
B
B
G
B
G
R
B
G
G
R
G
G
G
B
B
G
G
G
G
B
R
9 53 38
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B...

output:

PLACE 2
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLAC...

result:

ok OK

Test #40:

score: 0
Accepted
time: 67ms
memory: 3508kb

input:

100
17 82 1
G
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
17 53 30
G
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 1
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLAC...

result:

ok OK

Test #41:

score: 0
Accepted
time: 86ms
memory: 3588kb

input:

100
29 13 58
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
17 31 52
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

PLACE 1
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #42:

score: 0
Accepted
time: 87ms
memory: 3424kb

input:

100
35 36 29
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
R
G
R
G
R
R
G
R
G
R
R
G
R
G
R
R
G
R
G
R
R
G
R
G
R
R
G
G
G
G
G
G
16 31 53
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISC...

result:

ok OK

Test #43:

score: 0
Accepted
time: 23ms
memory: 3548kb

input:

100
21 22 57
B
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
R
B
B
B
B
B
28 32 40
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
...

output:

PLACE 2
DISCARD
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #44:

score: 0
Accepted
time: 45ms
memory: 3540kb

input:

100
35 56 9
R
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
R
B
B
B
21 54 25
R
R
R
G
R
R
G
R
G
G
R
G
R
R
R
B
R
G
G
R
G
R
R
R
G
G
B
B
R
B
R
R
B
G
G
R
R
G
B
B...

output:

DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #45:

score: 0
Accepted
time: 67ms
memory: 3552kb

input:

100
14 28 58
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
B
B
9 35 56
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLAC...

result:

ok OK

Test #46:

score: 0
Accepted
time: 76ms
memory: 3568kb

input:

100
28 1 71
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
11 66 23
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #47:

score: 0
Accepted
time: 34ms
memory: 3536kb

input:

100
59 16 25
R
R
R
R
R
B
G
B
B
B
B
B
R
R
R
G
R
R
R
R
R
R
R
G
B
R
R
R
R
R
R
B
R
R
R
R
G
R
B
R
R
B
R
B
B
B
G
R
G
R
R
B
R
R
R
R
G
G
R
B
B
R
R
R
G
G
B
G
B
B
R
R
R
B
G
B
R
R
G
R
R
G
B
B
R
B
G
R
G
R
R
R
R
B
R
R
R
R
R
R
30 20 50
R
B
B
B
B
G
B
R
G
G
R
B
G
G
B
G
R
R
R
R
G
B
R
R
G
R
R
B
B
R
R
R
B
R
R
R
B
R
G
...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISC...

result:

ok OK

Test #48:

score: 0
Accepted
time: 106ms
memory: 3688kb

input:

100
9 25 66
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
11 31 58
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B...

output:

PLACE 2
EMPTY 1
PLACE 1
DISCARD
EMPTY 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLAC...

result:

ok OK

Test #49:

score: 0
Accepted
time: 34ms
memory: 3560kb

input:

100
35 9 56
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
B
B
B
B
B
B
7 92 1
B
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #50:

score: 0
Accepted
time: 66ms
memory: 3544kb

input:

100
19 61 20
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
R
R
G
R
R
R
G
R
R
R
G
R
R
R
G
R
R
R
G
R
R
R
R
R
R
R
56 30 14
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

PLACE 1
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #51:

score: 0
Accepted
time: 53ms
memory: 3552kb

input:

100
22 21 57
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
R
19 61 20
B
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #52:

score: 0
Accepted
time: 47ms
memory: 3628kb

input:

100
60 20 20
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
14 58 28
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
...

output:

PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #53:

score: 0
Accepted
time: 59ms
memory: 3616kb

input:

100
64 1 35
R
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
B
B
43 31 26
R
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

EMPTY 1
PLACE 1
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #54:

score: 0
Accepted
time: 76ms
memory: 3428kb

input:

100
52 17 31
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
G
G
G
G
67 1 32
R
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #55:

score: 0
Accepted
time: 89ms
memory: 3628kb

input:

100
22 21 57
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
R
B
R
R
R
B
R
R
R
B
R
R
R
B
R
R
R
B
B
20 20 60
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
...

output:

PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLAC...

result:

ok OK

Test #56:

score: 0
Accepted
time: 71ms
memory: 3448kb

input:

100
1 1 98
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
57 29 14
G
B
G
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
...

output:

PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #57:

score: 0
Accepted
time: 86ms
memory: 3520kb

input:

100
35 9 56
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
B
B
B
B
B
B
14 18 68
G
G
G
G
G
G
G
G
R
R
G
G
G
R
G
G
G
G
B
R
B
G
G
B
G
B
G
G
G
G
G
G
G
B
G
B
B
B
R
G...

output:

DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #58:

score: 0
Accepted
time: 43ms
memory: 3540kb

input:

100
11 27 62
B
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
B
B
B
B
R
B
B
B
B
B
B
74 24 2
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #59:

score: 0
Accepted
time: 75ms
memory: 3612kb

input:

100
33 13 54
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
R
R
R
R
R
31 54 15
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
...

output:

PLACE 2
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
DISC...

result:

ok OK

Test #60:

score: 0
Accepted
time: 37ms
memory: 3516kb

input:

100
32 10 58
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
11 84 5
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
G
G...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #61:

score: 0
Accepted
time: 75ms
memory: 3540kb

input:

100
92 0 8
B
B
B
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
B
B
51 18 31
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
...

output:

PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #62:

score: 0
Accepted
time: 45ms
memory: 3512kb

input:

100
14 28 58
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
22 59 19
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

EMPTY 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #63:

score: 0
Accepted
time: 74ms
memory: 3536kb

input:

100
52 31 17
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
G
G
G
G
2 1 97
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #64:

score: 0
Accepted
time: 57ms
memory: 3548kb

input:

100
18 31 51
R
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
35 56 9
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G...

output:

DISCARD
PLACE 1
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #65:

score: 0
Accepted
time: 51ms
memory: 3628kb

input:

100
66 33 1
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
88 8 4
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
G
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B...

output:

PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #66:

score: 0
Accepted
time: 83ms
memory: 3508kb

input:

100
53 31 16
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
G
R
R
G
R
R
G
R
G
G
G
G
18 51 31
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLAC...

result:

ok OK

Test #67:

score: 0
Accepted
time: 72ms
memory: 3524kb

input:

100
3 83 14
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
98 0 2
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #68:

score: 0
Accepted
time: 30ms
memory: 3608kb

input:

100
16 83 1
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
B
30 17 53
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G...

output:

PLACE 1
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #69:

score: 0
Accepted
time: 74ms
memory: 3548kb

input:

100
41 39 20
G
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
25 57 18
G
G
R
G
G
B
R
B
B
R
B
B
R
B
R
B
B
B
B
G
B
B
B
B
B
B
G
R
G
G
G
B
G
R
B
G
B
B
R
...

output:

PLACE 1
DISCARD
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #70:

score: 0
Accepted
time: 79ms
memory: 3508kb

input:

100
14 29 57
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
18 51 31
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISC...

result:

ok OK

Test #71:

score: 0
Accepted
time: 84ms
memory: 3548kb

input:

100
34 66 0
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
13 29 58
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G...

output:

PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #72:

score: 0
Accepted
time: 38ms
memory: 3528kb

input:

100
17 52 31
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
R
G
G
G
G
G
20 20 60
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLAC...

result:

ok OK

Test #73:

score: 0
Accepted
time: 97ms
memory: 3520kb

input:

100
88 2 10
B
G
R
R
G
R
B
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
84 1 15
B
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #74:

score: 0
Accepted
time: 56ms
memory: 3444kb

input:

100
58 29 13
G
B
G
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
66 33 1
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

PLACE 1
PLACE 2
PLACE 1
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #75:

score: 0
Accepted
time: 48ms
memory: 3548kb

input:

100
54 2 44
G
G
B
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
58 28 14
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R...

output:

PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #76:

score: 0
Accepted
time: 50ms
memory: 3684kb

input:

100
13 29 58
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
21 57 22
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
G
R
B
R
R
G
B
R
R
B
R
...

output:

PLACE 1
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #77:

score: 0
Accepted
time: 88ms
memory: 3520kb

input:

100
14 58 28
R
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
R
B
B
B
12 1 87
G
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #78:

score: 0
Accepted
time: 68ms
memory: 3508kb

input:

100
32 51 17
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
B
B
B
B
B
B
13 5 82
B
B
G
R
R
G
G
G
G
G
G
R
G
G
G
G
G
G
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B...

output:

DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #79:

score: 0
Accepted
time: 78ms
memory: 3624kb

input:

100
2 30 68
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
44 4 52
R
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #80:

score: 0
Accepted
time: 90ms
memory: 3616kb

input:

100
17 30 53
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
R
G
R
G
G
G
53 16 31
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
...

output:

PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 1
DISCARD
DISCARD
PLAC...

result:

ok OK

Test #81:

score: 0
Accepted
time: 98ms
memory: 3612kb

input:

100
53 17 30
G
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
R
R
G
G
G
G
G
G
G
R
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
43 33 24
R
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
...

output:

PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
PLAC...

result:

ok OK

Test #82:

score: 0
Accepted
time: 101ms
memory: 3584kb

input:

100
28 33 39
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
53 30 17
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
...

output:

PLACE 1
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #83:

score: 0
Accepted
time: 83ms
memory: 3428kb

input:

100
23 54 23
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
B
B
R
B
B
B
R
B
B
B
R
R
R
R
R
0 80 20
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #84:

score: 0
Accepted
time: 38ms
memory: 3428kb

input:

100
21 22 57
B
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
R
B
B
R
B
B
B
B
B
B
B
B
R
B
B
2 45 53
B
G
R
R
G
R
B
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R...

output:

PLACE 2
PLACE 2
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #85:

score: 0
Accepted
time: 45ms
memory: 3608kb

input:

100
21 59 20
R
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
67 1 32
G
B
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
B
B
B
B
B
B
B...

output:

EMPTY 1
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #86:

score: 0
Accepted
time: 29ms
memory: 3612kb

input:

100
1 33 66
B
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
8 21 71
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
...

output:

PLACE 2
EMPTY 1
PLACE 1
DISCARD
EMPTY 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #87:

score: 0
Accepted
time: 75ms
memory: 3604kb

input:

100
25 13 62
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
16 29 55
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLAC...

result:

ok OK

Test #88:

score: 0
Accepted
time: 45ms
memory: 3508kb

input:

100
52 31 17
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
G
G
G
G
19 74 7
R
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
R
B
B
B
B...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #89:

score: 0
Accepted
time: 49ms
memory: 3536kb

input:

100
20 20 60
B
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
20 59 21
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
...

output:

PLACE 2
PLACE 1
PLACE 1
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #90:

score: 0
Accepted
time: 64ms
memory: 3512kb

input:

100
57 21 22
B
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
0 92 8
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

PLACE 2
PLACE 1
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #91:

score: 0
Accepted
time: 81ms
memory: 3612kb

input:

100
54 31 15
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
R
R
R
30 17 53
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
...

output:

PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
DISC...

result:

ok OK

Test #92:

score: 0
Accepted
time: 91ms
memory: 3544kb

input:

100
47 8 45
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
85 1 14
B
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
...

output:

DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #93:

score: 0
Accepted
time: 107ms
memory: 3536kb

input:

100
10 31 59
B
G
R
G
B
B
G
B
G
B
G
B
G
R
R
B
B
B
G
B
B
G
G
R
G
B
G
B
B
G
B
B
G
B
B
R
R
R
B
B
R
B
R
B
B
B
G
B
B
B
G
B
G
B
G
B
B
B
B
G
B
B
B
B
B
B
B
B
G
B
B
G
G
B
B
B
B
B
G
B
B
G
B
B
B
B
G
G
B
G
G
R
G
G
G
B
B
B
G
B
10 8 82
G
R
B
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G...

output:

PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 1
PLACE 2
PLACE 1
PLACE 2
PLACE 1
DISCARD
DISCARD
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
DISCARD
DISC...

result:

ok OK

Test #94:

score: 0
Accepted
time: 43ms
memory: 3540kb

input:

100
9 35 56
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
R
B
B
B
B
B
B
B
61 23 16
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R...

output:

PLACE 2
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #95:

score: 0
Accepted
time: 50ms
memory: 3520kb

input:

100
11 0 89
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
B
B
B
B
B
B
B
B
B
B
B
63 13 24
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #96:

score: 0
Accepted
time: 88ms
memory: 3520kb

input:

100
13 58 29
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
96 0 4
R
G
G
R
G
G
R
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #97:

score: 0
Accepted
time: 28ms
memory: 3444kb

input:

100
57 1 42
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
61 20 19
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B...

output:

PLACE 1
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
DISC...

result:

ok OK

Test #98:

score: 0
Accepted
time: 61ms
memory: 3536kb

input:

100
19 61 20
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
G
G
R
G
G
G
R
G
G
G
R
G
G
G
R
G
G
G
R
G
G
G
G
G
G
G
66 1 33
R
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
B
B
B
B
B
B...

output:

EMPTY 1
PLACE 1
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #99:

score: 0
Accepted
time: 67ms
memory: 3604kb

input:

100
57 29 14
R
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
39 40 21
G
R
G
B
G
G
R
B
R
G
B
G
R
R
G
R
R
G
G
R
G
G
R
G
B
R
R
R
R
G
B
R
B
G
G
R
G
R
G
...

output:

DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #100:

score: 0
Accepted
time: 69ms
memory: 3544kb

input:

100
0 98 2
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
18 11 71
R
R
R
R
R
B
R
R
R
B
R
R
B
R
G
B
G
G
R
R
G
R
R
R
R
G
B
G
R
R
B
G
B
R
G
R
R
R
R
G
...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #101:

score: 0
Accepted
time: 38ms
memory: 3532kb

input:

100
14 23 63
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
R
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
65 32 3
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #102:

score: 0
Accepted
time: 26ms
memory: 3544kb

input:

100
25 8 67
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
20 69 11
B
B
G
R
R
R
R
R
R
R
R
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
R
B
B...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #103:

score: 0
Accepted
time: 73ms
memory: 3540kb

input:

100
17 31 52
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
G
R
R
R
R
R
2 9 89
B
B
B
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
G
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
...

output:

PLACE 2
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
DISC...

result:

ok OK

Test #104:

score: 0
Accepted
time: 85ms
memory: 3552kb

input:

100
49 2 49
G
B
R
R
B
R
G
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
R
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
61 19 20
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G...

output:

PLACE 1
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
PLACE 1
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISCARD
PLACE 2
DISCARD
DISC...

result:

ok OK

Test #105:

score: 0
Accepted
time: 67ms
memory: 3516kb

input:

100
66 0 34
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
17 30 53
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G...

output:

PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #106:

score: 0
Accepted
time: 68ms
memory: 3516kb

input:

100
28 58 14
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
B
B
35 56 9
B
B
G
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLAC...

result:

ok OK

Test #107:

score: 0
Accepted
time: 34ms
memory: 3552kb

input:

100
62 33 5
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
B
B
G
G
79 19 2
G
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #108:

score: 0
Accepted
time: 27ms
memory: 3588kb

input:

100
97 2 1
R
B
G
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
35 51 14
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

EMPTY 1
PLACE 1
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #109:

score: 0
Accepted
time: 93ms
memory: 3612kb

input:

100
20 60 20
G
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
33 64 3
B
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
B
B
B
B...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #110:

score: 0
Accepted
time: 41ms
memory: 3608kb

input:

100
14 24 62
R
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
17 32 51
G
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
R
G
G
G
G
G
G
R
G
G
G
G
G
R
G
G
...

output:

EMPTY 1
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #111:

score: 0
Accepted
time: 115ms
memory: 3588kb

input:

100
15 54 31
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
R
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
3 63 34
R
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G...

output:

PLACE 1
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #112:

score: 0
Accepted
time: 46ms
memory: 3520kb

input:

100
7 35 58
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
R
R
R
R
R
66 7 27
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
B
...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #113:

score: 0
Accepted
time: 65ms
memory: 3444kb

input:

100
10 81 9
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
R
G
G
G
B
B
B
B
B
B
B
B
B
7 87 6
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #114:

score: 0
Accepted
time: 80ms
memory: 3504kb

input:

100
3 59 38
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
R
G
R
G
G
G
G
G
G
G
G
29 13 58
B
G
B
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
PLAC...

result:

ok OK

Test #115:

score: 0
Accepted
time: 62ms
memory: 3448kb

input:

100
20 19 61
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
R
R
B
R
R
R
B
R
R
R
B
R
R
R
B
R
R
R
B
R
R
R
R
R
R
R
23 22 55
B
B
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 2
DISCARD
PLACE 1
PLACE 1
EMPTY 2
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLAC...

result:

ok OK

Test #116:

score: 0
Accepted
time: 69ms
memory: 3428kb

input:

100
26 66 8
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
54 19 27
G
B
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
R...

output:

EMPTY 1
PLACE 1
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLAC...

result:

ok OK

Test #117:

score: 0
Accepted
time: 94ms
memory: 3552kb

input:

100
10 78 12
R
B
B
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
34 61 5
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

EMPTY 1
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #118:

score: 0
Accepted
time: 48ms
memory: 3536kb

input:

100
28 14 58
B
B
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
R
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
18 51 31
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
...

output:

PLACE 2
PLACE 2
PLACE 1
DISCARD
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #119:

score: 0
Accepted
time: 95ms
memory: 3448kb

input:

100
58 29 13
G
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
0 99 1
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
...

output:

PLACE 1
EMPTY 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #120:

score: 0
Accepted
time: 43ms
memory: 3532kb

input:

100
14 29 57
B
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
R
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
64 2 34
G
G
B
G
B
G
G
G
B
G
G
G
G
G
G
G
G
B
G
G
B
B
B
B
G
G
G
G
G
B
G
B
B
B
G
B
B
G
B
G...

output:

PLACE 2
PLACE 1
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #121:

score: 0
Accepted
time: 59ms
memory: 3532kb

input:

100
2 50 48
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
42 13 45
G
B
B
B
B
R
G
G
G
G
B
B
G
B
R
B
G
G
G
G
B
R
G
B
G
G
B
B
B
B
B
G
R
R
B
G
G
B
B
G...

output:

PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISC...

result:

ok OK

Test #122:

score: 0
Accepted
time: 70ms
memory: 3548kb

input:

100
74 24 2
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
R
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
30 53 17
R
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #123:

score: 0
Accepted
time: 97ms
memory: 3612kb

input:

100
14 71 15
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
32 67 1
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G...

output:

EMPTY 1
PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLACE 2
PLACE 1
PLACE 1
PLACE 2
PLACE 1
DISCARD
PLACE 1
PLACE 2
PLACE 1
PLACE 1
DISCARD
PLAC...

result:

ok OK

Test #124:

score: 0
Accepted
time: 85ms
memory: 3548kb

input:

100
29 13 58
B
B
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
R
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
60 20 20
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
B
R
G
R
R
B
G
R
R
G
R
...

output:

PLACE 2
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
DISCARD
DISCARD
DISCARD
EMPTY 2
PLACE 2
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #125:

score: 0
Accepted
time: 48ms
memory: 3624kb

input:

100
57 21 22
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
G
B
R
B
G
B
B
R
G
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
B
B
B
R
R
17 30 53
R
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
DISCARD
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #126:

score: 0
Accepted
time: 71ms
memory: 3540kb

input:

100
17 30 53
B
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
89 6 5
B
R
G
G
R
G
B
G
R
G
G
B
R
G
G
R
G
B
G
R
G
G
B
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
...

output:

PLACE 2
PLACE 1
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #127:

score: 0
Accepted
time: 93ms
memory: 3688kb

input:

100
4 33 63
G
R
B
B
R
B
G
B
R
B
B
G
R
B
B
R
B
G
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
B
R
B
R
38 52 10
G
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

PLACE 1
EMPTY 2
PLACE 2
DISCARD
EMPTY 2
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 2
PLACE 1
DISCARD
PLACE 2
PLACE 2
EMPTY 1
PLACE 1
PLACE 2
DISCARD
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLACE 1
PLACE 2
PLACE 2
PLAC...

result:

ok OK

Test #128:

score: 0
Accepted
time: 17ms
memory: 3608kb

input:

100
0 54 46
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
G
G
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
72 7 21
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
R
G
B
G
G
R
B
G
G
B
G
G
...

output:

DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLACE 1
PLACE 1
DISCARD
PLAC...

result:

ok OK

Test #129:

score: 0
Accepted
time: 86ms
memory: 3540kb

input:

100
19 20 61
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
100 0 0
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R...

output:

EMPTY 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK

Test #130:

score: 0
Accepted
time: 45ms
memory: 3524kb

input:

100
31 54 15
R
G
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
G
G
G
G
G
G
G
G
G
G
R
G
G
G
G
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
14 29 57
R
B
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

output:

DISCARD
PLACE 1
PLACE 2
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
DISCARD
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLACE 1
PLAC...

result:

ok OK