input\tt{input}input
2 1 xc 4 1 B 1 A 1 C 1 A 2 B 2 A 2 C 2 A
output\tt{output}output
AA
被 Hack 的题解:https://www.luogu.com.cn/blog/_post/117776