s = input() r, g, b =0, 0, 0 for c in s: if c=='R': r += 1 elif c=='G': g += 1 elif c=='B': b += 1 print(f'({r},{g},{b})')