a = input().split()

x = a[1]

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

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

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