#include <bits/stdc++.h>
using namespace std;
int main() {
  char x[105];
  scanf("%s", x);
  int len = strlen(x);
  int r = 0, b = 0, g = 0, y = 0, cy = 0, cr = 0, cg = 0, cb = 0, fr = 0,
      fb = 0, fy = 0, fg = 0;
  for (int i = 0; i < len; i++) {
    if (x[i] == 'R') {
      if (r == 0) {
        r++;
        fr = i % 4;
      }
      cr++;
    }
    if (x[i] == 'B') {
      if (b == 0) {
        b++;
        fb = i % 4;
      }
      cb++;
    }
    if (x[i] == 'G') {
      if (g == 0) {
        g++;
        fg = i % 4;
      }
      cg++;
    }
    if (x[i] == 'Y') {
      if (y == 0) {
        y++;
        fy = i % 4;
      }
      cy++;
    }
  }
  int ans = len / 4, mod = len % 4;
  cy = ans - cy;
  cr = ans - cr;
  cg = ans - cg;
  cb = ans - cb;
  if (fb < mod) {
    cb++;
  }
  if (fr < mod) {
    cr++;
  }
  if (fy < mod) {
    cy++;
  }
  if (fg < mod) {
    cg++;
  }
  cout << cr << " " << cb << " " << cy << " " << cg << " ";
  return 0;
}
