D = {"A":"T","T":"A","C":"G","G":"C"}

b = input().strip()

x = ""

for i in range(len(b)):

    x += D[b[i]]

print(x)
b = input().strip()

if b=="A":

    print("T")

elif b=="T":

    print("A")

elif b=="C":

    print("G")

else:

    print("C")
D = {"A": "T", "T": "A", "C": "G", "G": "C"}
b = input().strip()
x = ""
for i in range(len(b)):
    x += D[b[i]]
print(x)

b = input().strip()
if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
else:
    print("C")

-D = {"A": "T", "T": "A", "C": "G", "G": "C"} -x = "" -for i in range(len(b)): -    x += D[b[i]] -print(x) +if b == "A": +    print("T") +elif b == "T": +    print("A") +elif b == "C": +    print("G") +else: +    print("C")