
# 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())

a = s.find('A')

z = s[::-1].find('Z')

ans = len(s)-a-z



print(ans)



#print(*ans, sep='\n')

# optimized version of the same code:

def solve():

  S = eval(input())

  a = S.find('A')

  z = S[::-1].find('Z')

  ans = len(S)-a-z

  return ans

print((solve()))
s = eval(input())
a = s.find("A")
z = s[::-1].find("Z")
ans = len(s) - a - z
print(ans)
# print(*ans, sep='\n')

def solve():
    S = eval(input())
    a = S.find("A")
    z = S[::-1].find("Z")
    ans = len(S) - a - z
    return ans


print((solve()))

-s = eval(input()) -a = s.find("A") -z = s[::-1].find("Z") -ans = len(s) - a - z -print(ans) -# print(*ans, sep='\n') +def solve(): +    S = eval(input()) +    a = S.find("A") +    z = S[::-1].find("Z") +    ans = len(S) - a - z +    return ans + + +print((solve()))