s = eval(input())



if s[1] == 'B':

  ss = s.replace('B','R')

else:

  ss = s.replace('R','B')



print(ss)
s = eval(input())



if s == 'ABC':

  print('ARC')

else:

  print('ABC')
s = eval(input())
if s[1] == "B":
    ss = s.replace("B", "R")
else:
    ss = s.replace("R", "B")
print(ss)

s = eval(input())
if s == "ABC":
    print("ARC")
else:
    print("ABC")

-if s[1] == "B": -    ss = s.replace("B", "R") +if s == "ABC": +    print("ARC") -    ss = s.replace("R", "B") -print(ss) +    print("ABC")