
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')


# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)



# slower version:

s = eval(input())



start = -1

end = 0

for i in range(len(s)):

    if s[i] == 'A' and start < 0:

        start = i

    elif s[i] == 'Z':

        end = i

print((end - start + 1))


# optimized version of the same code:

s = eval(input())



start = 0

for i in range(len(s)):

    if s[i] == 'A':

        start = i

        break



end = 0

for i in reversed(list(range(len(s)))):

    if s[i] == 'Z':

        end = i

        break

print((end - start + 1))

s = eval(input())
start = -1
end = 0
for i in range(len(s)):
    if s[i] == "A" and start < 0:
        start = i
    elif s[i] == "Z":
        end = i
print((end - start + 1))

s = eval(input())
start = 0
for i in range(len(s)):
    if s[i] == "A":
        start = i
        break
end = 0
for i in reversed(list(range(len(s)))):
    if s[i] == "Z":
        end = i
        break
print((end - start + 1))

-start = -1 +start = 0 +for i in range(len(s)): +    if s[i] == "A": +        start = i +        break -for i in range(len(s)): -    if s[i] == "A" and start < 0: -        start = i -    elif s[i] == "Z": +for i in reversed(list(range(len(s)))): +    if s[i] == "Z": +        break