#37120: python 紀錄


BensonDC (python戰士)

學校 : 不指定學校
編號 : 240921
來源 : [1.175.217.87]
最後登入時間 :
2024-03-27 12:33:26
g275. 1. 七言對聯 -- 2021年9月APCS | From: [36.238.105.93] | 發表日期 : 2023-08-21 20:04

n=int(input())
for i in range(1,n+1):
    Q=[]
    a=[int(x) for x in input().split()]
    b=[int(x) for x in input().split()]
    if not (a[1]!=a[3] and a[1]==a[5] and b[1]!=b[3] and b[1]==b[5]):
        Q.append("A")
    if not (a[6]==1 and b[6]==0):
        Q.append("B")
    if not (a[1]!=b[1] and a[3]!=b[3] and a[5]!=b[5]): 
        Q.append("C")
    if not bool(Q):
        print("None")
    else:
        print(*Q,sep="")

 
ZeroJudge Forum