print(('A' + input().split()[1][0] +'C'))
a,b,c = input().split()

print('A',b[0],'C',sep='')

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

a, b, c = input().split()
print("A", b[0], "C", sep="")

-print(("A" + input().split()[1][0] + "C")) +a, b, c = input().split() +print("A", b[0], "C", sep="")