a,b,c=list(map(str,input().split()))

c=b[0]

print(('A'+c+'C'))

xs = input().split()

 

print(("A"+xs[1][0]+"C"))
a, b, c = list(map(str, input().split()))
c = b[0]
print(("A" + c + "C"))

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

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