#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a[4] = {0};
  int b[4] = {0};
  int c[4] = {0};
  cin >> s;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    b[i % 4]++;
    if (s[i] == 'R') {
      a[0] = i % 4;
      c[0]++;
    }
    if (s[i] == 'B') {
      a[1] = i % 4;
      c[1]++;
    }
    if (s[i] == 'Y') {
      a[2] = i % 4;
      c[2]++;
    }
    if (s[i] == 'G') {
      a[3] = i % 4;
      c[3]++;
    }
  }
  cout << b[a[0]] - c[0] << " " << b[a[1]] - c[1] << " " << b[a[2]] - c[2]
       << " " << b[a[3]] - c[3] << endl;
  return 0;
}
