s=input().split();print((''.join([i[0] for i in s])))
print(f'A{input()[8]}C')
s = input().split()
print(("".join([i[0] for i in s])))

print(f"A{input()[8]}C")

-s = input().split() -print(("".join([i[0] for i in s]))) +print(f"A{input()[8]}C")