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

N = int(eval(input()))

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



cnt, i = 0, 0

for j in range(10 ** 6):

    cnt += 1

    if a[i] == 2:

        print(cnt)

        #break

        quit()

    else:

        i = a[i] - 1

print((-1))

# optimized version of the same code:

N = int(eval(input()))

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



cnt, i = 0, 0

for j in range(len(a)):

    cnt += 1

    if a[i] == 2:

        print(cnt)

        #break

        quit()

    else:

        i = a[i] - 1

print((-1))
N = int(eval(input()))
a = [int(eval(input())) for _ in range(N)]
cnt, i = 0, 0
for j in range(10**6):
    cnt += 1
    if a[i] == 2:
        print(cnt)
        # break
        quit()
    else:
        i = a[i] - 1
print((-1))

N = int(eval(input()))
a = [int(eval(input())) for _ in range(N)]
cnt, i = 0, 0
for j in range(len(a)):
    cnt += 1
    if a[i] == 2:
        print(cnt)
        # break
        quit()
    else:
        i = a[i] - 1
print((-1))

-for j in range(10**6): +for j in range(len(a)):