
# 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:

import sys



N = int(eval(input()))

a = [int(eval(input())) for _ in range(N)]



l = 1

p = a[0] - 1



if a[0] == 2:

    print(l)

    sys.exit()



while l < int(1e6):

    l += 1

    if a[p] == 2:

        print(l)

        break

    else:

        p = a[p] - 1

else:

    print((-1))

# optimized version of the same code:

import sys



N = int(eval(input()))

a = [int(eval(input())) for _ in range(N)]



l = 1

p = a[0] - 1



if a[0] == 2:

    print(l)

    sys.exit()



while l < int(2e5):

    l += 1

    if a[p] == 2:

        print(l)

        break

    else:

        p = a[p] - 1

else:

    print((-1))
import sys

N = int(eval(input()))
a = [int(eval(input())) for _ in range(N)]
l = 1
p = a[0] - 1
if a[0] == 2:
    print(l)
    sys.exit()
while l < int(1e6):
    l += 1
    if a[p] == 2:
        print(l)
        break
    else:
        p = a[p] - 1
else:
    print((-1))

import sys

N = int(eval(input()))
a = [int(eval(input())) for _ in range(N)]
l = 1
p = a[0] - 1
if a[0] == 2:
    print(l)
    sys.exit()
while l < int(2e5):
    l += 1
    if a[p] == 2:
        print(l)
        break
    else:
        p = a[p] - 1
else:
    print((-1))

-while l < int(1e6): +while l < int(2e5):