a=input().split()

print(("A"+a[1][0]+"C"))

print(("A"+input()[8]+"C"))
a = input().split()
print(("A" + a[1][0] + "C"))

print(("A" + input()[8] + "C"))

-a = input().split() -print(("A" + a[1][0] + "C")) +print(("A" + input()[8] + "C"))