S = input().split()

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

a, b, c = input().split()

print((a[0]+b[0]+c[0]))

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

a, b, c = input().split()
print((a[0] + b[0] + c[0]))

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