Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland.

Now he has a goal to replace dead light bulbs, however he doesn't know how many light bulbs for each color are required. It is guaranteed that for each of four colors at least one light is working.

It is known that the garland contains light bulbs of four colors: red, blue, yellow and green. The garland is made as follows: if you take any four consecutive light bulbs then there will not be light bulbs with the same color among them. For example, the garland can look like "RYBGRYBGRY", "YBGRYBGRYBG", "BGRYB", but can not look like "BGRYG", "YBGRYBYGR" or "BGYBGY". Letters denote colors: 'R' — red, 'B' — blue, 'Y' — yellow, 'G' — green.

Using the information that for each color at least one light bulb still works count the number of dead light bulbs of each four colors.


-----Input-----

The first and the only line contains the string s (4 ≤ |s| ≤ 100), which describes the garland, the i-th symbol of which describes the color of the i-th light bulb in the order from the beginning of garland:   'R' — the light bulb is red,  'B' — the light bulb is blue,  'Y' — the light bulb is yellow,  'G' — the light bulb is green,  '!' — the light bulb is dead. 

The string s can not contain other symbols except those five which were described. 

It is guaranteed that in the given string at least once there is each of four letters 'R', 'B', 'Y' and 'G'. 

It is guaranteed that the string s is correct garland with some blown light bulbs, it means that for example the line "GRBY!!!B" can not be in the input data. 


-----Output-----

In the only line print four integers k_{r}, k_{b}, k_{y}, k_{g} — the number of dead light bulbs of red, blue, yellow and green colors accordingly.


-----Examples-----
Input
RYBGRYBGR

Output
0 0 0 0
Input
!RGYB

Output
0 1 0 0
Input
!!!!YGRB

Output
1 1 1 1
Input
!GB!RG!Y!

Output
2 1 1 0


-----Note-----

In the first example there are no dead light bulbs.

In the second example it is obvious that one blue bulb is blown, because it could not be light bulbs of other colors on its place according to the statements.

Difficulty: interview

Starter code:

Solutions:
s = input()
n = len(s)
t = 'RBYG'
for i in t:
	ind = s.find(i) % 4
	ans = 0
	while ind < n:
		ans += s[ind] == '!'
		ind += 4
	print(ans, end=' ')


import sys
s = input()
n = len(s)
ans = [0] * 4
a = s.index('R') % 4
for i in range(a, n, 4):
    if (s[i] != 'R'):
        ans[0] += 1
a = s.index('B') % 4
for i in range(a, n, 4):
    if (s[i] != 'B'):
        ans[1] += 1
a = s.index('Y') % 4
for i in range(a, n, 4):
    if (s[i] != 'Y'):
        ans[2] += 1
a = s.index('G') % 4
for i in range(a, n, 4):
    if (s[i] != 'G'):
        ans[3] += 1
print(*ans)
            


def main():
	s = list(input())

	ans = []
	for c in "RBYG":
		x = s.index(c)
		x %= 4
		cn = 0
		while (x < len(s)):
			if (s[x] == '!'):
				cn += 1
			x += 4
		ans.append(cn)
	print(*ans)


main()

s = list(input())

ans = {'R':0,'B':0,'Y':0,'G':0}


for i, ch in enumerate(s):
    if ch != '!':
        for j in range(i, len(s), 4):
            if s[j] == '!':
                s[j] = ch
                ans[ch] += 1
        for j in range(i, -1, -4):
            if s[j] == '!':
                s[j] = ch
                ans[ch] += 1

print(ans['R'], ans['B'], ans['Y'], ans['G'])


s = input()
r = s.index('R') % 4
b = s.index('B') % 4
y = s.index('Y') % 4
g = s.index('G') % 4
ans = [0] * 4
for i in range(0,len(s)):
	if(s[i] == '!'):
		ans[i%4] += 1
print('%d %d %d %d' % (ans[r],ans[b],ans[y],ans[g]))

s = input()
a = s.find('R') % 4
b = s.find('B') % 4
c = s.find('Y') % 4
d = s.find('G') % 4
res = [0] * 4
for i in range(len(s)):
    if s[i] == '!':
        res[i % 4] += 1
print(res[a], res[b], res[c], res[d])

s = input()
trr = [0 for i in range(4)]
prr = ['a', 'b', 'c', 'd']
for i in range(len(s)):
    if(s[i]!='!'):
        prr[i%4] = s[i]
    else:
        trr[i%4] += 1

krr = [0, 0, 0, 0]
for i in range(4):
    if(prr[i]=='R'):
        krr[0] = trr[i]
    if (prr[i] == 'B'):
        krr[1] = trr[i]
    if (prr[i] == 'Y'):
        krr[2] = trr[i]
    if (prr[i] == 'G'):
        krr[3] = trr[i]

print(krr[0], krr[1], krr[2], krr[3])

a=input()
t1=0
t2=0
t3=0
t4=0
ind1=0
ind2=0
ind3=0
ind4=0
for j in range(len(a)):
    if a[j] =='R':
        ind1=j%4
    if a[j] == 'B':
       
        ind2=j%4
    if a[j] == 'Y':
        ind3=j%4
    if a[j] == 'G':
        ind4=j%4
for j in range(len(a)):
    if a[j] == '!':
        if j%4==ind1:
            t1+=1
        elif j%4==ind2:
            t2+=1
        elif j%4==ind3:
            t3+=1
        else:
            t4+=1
print(t1,t2,t3,t4)

s = input()

a = ['*'] * 4

for i, c in enumerate(s):
    if c != '!':
        a[i % 4] = c

answ = dict(R=0, G=0, B=0, Y=0)
for i in range(len(s)):
    if s[i] == '!':
        answ[a[i % 4]] += 1

print(answ['R'], answ['B'], answ['Y'], answ['G'],)


#!/usr/bin/env python3

def main():
    from   collections import Counter
    import re

    try:
        while True:
            s = input()
            d = Counter()
            for i in range(4):
                t = s[i::4]
                d[re.search(r"[^!]", t).group()] = t.count('!')

            print(d['R'], d['B'], d['Y'], d['G'])

    except EOFError:
        pass

main()


S = input()
rda = [0]*4
for i, c in enumerate(S):
	if c != '!':
		rda[i%4] = ord(c)
gb = [0]*256
for i, c in enumerate(S):
	if c == '!':
		gb[rda[i%4]] += 1
ans = [gb[ord('R')], gb[ord('B')], gb[ord('Y')], gb[ord('G')]]
print(' '.join(map(str, ans)))


s = input()
cnt = [0]*4
ind = [0]*4
for i, ch in enumerate(s):
  if ch == "R": ind[0] = i % 4
  elif ch == "B": ind[1] = i % 4
  elif ch == "Y": ind[2] = i % 4
  elif ch == "G": ind[3] = i % 4
  else: cnt[i % 4] += 1
print(*[cnt[ind[i]] for i in range(4)])  


import itertools
import collections

x = input()

erg = -1
pos = "R B Y G".split()
for p in itertools.permutations(pos):

    t = p * 30
    t[:len(x)]

    tmp = collections.defaultdict(int)

    for i in range(len(x)):
        if x[i] == '!':
            tmp[t[i]] += 1;
            continue

        if x[i] == t[i]:
            continue
        else:
            tmp = -1
            break

    if tmp == -1:
        continue
    else:
        print("{} {} {} {}".format(tmp['R'], tmp['B'], tmp['Y'], tmp['G']))
        break



s=input()
col=['R','B','Y','G']
p=[0]*4
sootv=[0]*4
for i in range(len(s)):
    if s[i]=='!':
        p[i%4]+=1
    elif s[i] in col:
        t=col.index(s[i])
        sootv[t]=i%4
print(' '.join([str(p[sootv[i]]) for i in range(4)]))

colors = set("RGBY".split())
s = input()
r, g, b, y = 0, 0, 0, 0
R, G, B, Y = -1, -1, -1, -1

for i in range(len(s)):
    if s[i] == "R":
        R = i % 4
    elif s[i] == "G":
        G = i % 4
    elif s[i] == "B":
        B = i % 4
    else:
        Y = i % 4

for i in range(len(s)):
    if s[i] == "!":
        if i % 4 == R:
            r += 1
        elif i % 4 == G:
            g += 1
        elif i % 4 == B:
            b += 1
        else:
            y += 1
print(r, b, y, g)


s = input()
cols = ['R', 'B', 'Y', 'G']
result = dict([(c, 0) for c in cols])
num_to_cols = dict()
for c in cols:
    num_to_cols[s.find(c) % 4] = c
for lnum in range(len(s)):
    if s[lnum] == '!':
        result[num_to_cols[lnum % 4]] += 1
print(result['R'], result['B'], result['Y'], result['G'])

s = input()
l = ['?','?','?','?']
d = {c:0 for c in "RGBY"}
for i in range(len(s)):
    if s[i] != '!':
        l[i%4] = s[i]
for i in range(len(s)):
    if s[i] == '!':
        d[l[i%4]] += 1

print(d['R'],d['B'],d['Y'],d['G'])




s = input()

M_inv = {}

A = [0] * 4

for i in range(len(s)):
    if s[i] != '!':
        M_inv[s[i]] = i % 4

for i in range(len(s)):
    if s[i] == '!':
        A[i % 4] += 1

print((str(A[M_inv['R']]) + " " + str(A[M_inv['B']]) + " " +
      str(A[M_inv['Y']]) + " " + str(A[M_inv['G']])))



import math, sys


def main():
	l = input()
	rr=0
	br =0
	gr =0
	yr = 0
	for i in range(len(l)):
		if l[i]=='R':
			rr = i%4
		if l[i]=='B':
			br = i%4
		if l[i]=='Y':
			yr = i%4
		if l[i]=='G':
			gr = i%4
	rk=0
	bk =0
	gk =0
	yk = 0
	for i in range(len(l)):
		if l[i]=="!":
			if i%4==rr:
				rk+=1
			if i%4==br:
				bk+=1
			if i%4==yr:
				yk+=1
			if i%4==gr:
				gk+=1
	print(rk,bk,yk,gk)
			

def __starting_point():
	main()

__starting_point()

a=input()
v=['']*4
s=[0]*4
for i in range(len(a)):
	if(i%4==0):
		if(a[i]!='!'):
			v[i%4]=a[i]
	if(i%4==1):
		if(a[i]!='!'):
			v[i%4]=a[i]
	if(i%4==2):
		if(a[i]!='!'):
			v[i%4]=a[i]
	if(i%4==3):
		if(a[i]!='!'):
			v[i%4]=a[i]
for i in range(len(a)):
	if(a[i]=='!'):
		if(v[i%4]=="R"):
			s[0]+=1
		if(v[i%4]=="B"):
			s[1]+=1	
		if(v[i%4]=="Y"):
			s[2]+=1
		if(v[i%4]=="G"):
			s[3]+=1
for i in range(4):
	print(s[i],end=" ")


g = input()
c1 = g[0::4]
c2 = g[1::4]
c3 = g[2::4]
c4 = g[3::4]
colors = ['R', 'B', 'Y', 'G']
broken1 = 0
broken2 = 0
broken3 = 0
broken4 = 0
letters = []
for item in c1:
    if item == '!':
        broken1 += 1
    else:
        if item not in letters:
            letters.append(item)
for item in c2:
    if item == '!':
        broken2 += 1
    else:
        if item not in letters:
            letters.append(item)
for item in c3:
    if item == '!':
        broken3 += 1
    else:
        if item not in letters:
            letters.append(item)
for item in c4:
    if item == '!':
        broken4 += 1
    else:
        if item not in letters:
            letters.append(item)
answer = {letters[0]: broken1, letters[1]: broken2,letters[2]: broken3,letters[3]: broken4}
print(answer['R'],answer['B'],answer['Y'],answer['G'])


s = input()
col_idx = {}
counts = [0, 0, 0, 0]
for i,c in enumerate(s):
    if c == '!':
        counts[i%4] += 1
    else:
        col_idx[c] = i%4

print("%d %d %d %d" % tuple(counts[col_idx[c]] for c in 'RBYG'))


s=[x for x in input()]
n=len(s)
need=4
p={}
for i in range(n):
  if s[i]!='!':
    p[i%4]=s[i]
c={'R':0, 'B':0, 'Y':0, 'G':0}
for i in range(n):
  if s[i]=='!':
    c[p[i%4]]+=1
print(c['R'], c['B'], c['Y'], c['G'])
    
    



s=input()+'   '
d,ans,DD={},0,{"R":0,"B":0,"Y":0,"G":0}
for i in range(len(s)):
    if s[i] in "RGBY": d[i%4]=s[i]
for i in range(len(s)):
    if s[i]=="!": DD[d[i%4]]+=1
print(DD["R"],DD["B"],DD["Y"],DD["G"])