string1 = input()
string2 = "AC" 
string3 = string1.count(string2)
print("AC x {}".format(string3))
string4 = "WA" 
string5 = string1.count(string4)
print("WA x {}".format(string5))
string6 = "TLE" 
string7 = string1.count(string6)
print("TLE x {}".format(string7))
string8 = "RE" 
string9 = string1.count(string8)
print("RE x {}".format(string9))