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

a = input().split()

print(*[h[0] for h in a], sep='')

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

a = input().split()
print(*[h[0] for h in a], sep="")

-print(("A" + input().split()[1][0] + "C")) +a = input().split() +print(*[h[0] for h in a], sep="")