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

k = int(eval(input()))

count = 1

n = 0

if k % 2 == 0 or k % 5 == 0:

    print((-1))

else:

  while 1:

      n = (n * 10 + 7) % k  

      if n == 0:

        break 

      count += 1

  print(count)

# optimized version of the same code:

def main(h):

  count = 1

  n = 0

  for i in range (k):

    n = (n * 10 + 7) % k  

    if n == 0: 

      print(count)

      return 0

    count += 1

  print((-1))

  

if __name__ == '__main__':

  k = int(eval(input()))

  main(k)
k = int(eval(input()))
count = 1
n = 0
if k % 2 == 0 or k % 5 == 0:
    print((-1))
else:
    while 1:
        n = (n * 10 + 7) % k
        if n == 0:
            break
        count += 1
    print(count)

def main(h):
    count = 1
    n = 0
    for i in range(k):
        n = (n * 10 + 7) % k
        if n == 0:
            print(count)
            return 0
        count += 1
    print((-1))


if __name__ == "__main__":
    k = int(eval(input()))
    main(k)

-k = int(eval(input())) -count = 1 -n = 0 -if k % 2 == 0 or k % 5 == 0: -    print((-1)) -else: -    while 1: +def main(h): +    count = 1 +    n = 0 +    for i in range(k): -            break +            print(count) +            return 0 -    print(count) +    print((-1)) + + +if __name__ == "__main__": +    k = int(eval(input())) +    main(k)