#include <bits/stdc++.h>
using namespace std;
int main() {
  string second;
  cin >> second;
  int n = second.length();
  int r = -1, b = -1, y = -1, g = -1;
  int ar = 0, ab = 0, ay = 0, ag = 0;
  for (int i = 0; i < n; i++) {
    if (second[i] == 'R' && r == -1) {
      r = i;
    }
    if (second[i] == 'Y' && y == -1) {
      y = i;
    }
    if (second[i] == 'B' && b == -1) {
      b = i;
    }
    if (second[i] == 'G' && g == -1) {
      g = i;
    }
  }
  int i = r - 4;
  while (i >= 0) {
    if (second[i] != 'R') ar++;
    i -= 4;
  }
  i = r + 4;
  while (i < n) {
    if (second[i] != 'R') ar++;
    i += 4;
  }
  cout << ar << " ";
  i = b - 4;
  while (i >= 0) {
    if (second[i] != 'B') ab++;
    i -= 4;
  }
  i = b + 4;
  while (i < n) {
    if (second[i] != 'B') ab++;
    i += 4;
  }
  cout << ab << " ";
  i = y - 4;
  while (i >= 0) {
    if (second[i] != 'Y') ay++;
    i -= 4;
  }
  i = y + 4;
  while (i < n) {
    if (second[i] != 'Y') ay++;
    i += 4;
  }
  cout << ay << " ";
  i = g - 4;
  while (i >= 0) {
    if (second[i] != 'G') ag++;
    i -= 4;
  }
  i = g + 4;
  while (i < n) {
    if (second[i] != 'G') ag++;
    i += 4;
  }
  cout << ag << " ";
  int acc;
  cin >> acc;
  return 0;
}
