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

def judge(x,y):

    global xx,yy,xy,axby

    if min(x,y) >= 0 and x+y <= xy:

        if x+y < xy or (x+y == xy and a*x+b*y < axby):

            xy = x+y

            axby = a*x+b*y

            xx,yy = x,y

    

while 1:

    a,b,d = list(map(int,input().split()))

    if a == 0: break

    xy = axby = 10**10

    for y in range(50001):

        if (d+b*y)%a == 0: judge((d+b*y)/a,y)

        if (b*y-d)%a == 0: judge((b*y-d)/a,y)

        if (d-b*y)%a == 0: judge((d-b*y)/a,y)

    print(xx,yy)

# optimized version of the same code:

def judge(x,y):

    global xx,yy,xy,axby

    if min(x,y) >= 0 and x+y <= xy:

        if x+y < xy or (x+y == xy and a*x+b*y < axby):

            xy = x+y

            axby = a*x+b*y

            xx,yy = x,y

    

while 1:

    a,b,d = list(map(int,input().split()))

    if a == 0: break

    xy = axby = 10**10

    for y in range(30001):

        if (d+b*y)%a == 0: judge((d+b*y)/a,y)

        if (b*y-d)%a == 0: judge((b*y-d)/a,y)

        if (d-b*y)%a == 0: judge((d-b*y)/a,y)

    print(xx,yy)
def judge(x, y):
    global xx, yy, xy, axby
    if min(x, y) >= 0 and x + y <= xy:
        if x + y < xy or (x + y == xy and a * x + b * y < axby):
            xy = x + y
            axby = a * x + b * y
            xx, yy = x, y


while 1:
    a, b, d = list(map(int, input().split()))
    if a == 0:
        break
    xy = axby = 10**10
    for y in range(50001):
        if (d + b * y) % a == 0:
            judge((d + b * y) / a, y)
        if (b * y - d) % a == 0:
            judge((b * y - d) / a, y)
        if (d - b * y) % a == 0:
            judge((d - b * y) / a, y)
    print(xx, yy)

def judge(x, y):
    global xx, yy, xy, axby
    if min(x, y) >= 0 and x + y <= xy:
        if x + y < xy or (x + y == xy and a * x + b * y < axby):
            xy = x + y
            axby = a * x + b * y
            xx, yy = x, y


while 1:
    a, b, d = list(map(int, input().split()))
    if a == 0:
        break
    xy = axby = 10**10
    for y in range(30001):
        if (d + b * y) % a == 0:
            judge((d + b * y) / a, y)
        if (b * y - d) % a == 0:
            judge((b * y - d) / a, y)
        if (d - b * y) % a == 0:
            judge((d - b * y) / a, y)
    print(xx, yy)

-    for y in range(50001): +    for y in range(30001):