
# 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 numpy as np

n = int(eval(input()))

s = list(eval(input()))

j = []

now = 0

unclosen = 0

opened = 0

for i in s:

    if i == ")":

        now -= 1

        if opened:

            opened -= 1

        else:

            unclosen += 1

    else:

        now += 1

        opened += 1

j = np.array(j)

print(("(" * unclosen + "".join(s) + ")" * opened))

# optimized version of the same code:

n = int(eval(input()))

s = list(eval(input()))

now = 0

unclosen = 0

opened = 0

for i in s:

    if i == ")":

        now -= 1

        if opened:

            opened -= 1

        else:

            unclosen += 1

    else:

        now += 1

        opened += 1

print(("(" * unclosen + "".join(s) + ")" * opened))
import numpy as np

n = int(eval(input()))
s = list(eval(input()))
j = []
now = 0
unclosen = 0
opened = 0
for i in s:
    if i == ")":
        now -= 1
        if opened:
            opened -= 1
        else:
            unclosen += 1
    else:
        now += 1
        opened += 1
j = np.array(j)
print(("(" * unclosen + "".join(s) + ")" * opened))

n = int(eval(input()))
s = list(eval(input()))
now = 0
unclosen = 0
opened = 0
for i in s:
    if i == ")":
        now -= 1
        if opened:
            opened -= 1
        else:
            unclosen += 1
    else:
        now += 1
        opened += 1
print(("(" * unclosen + "".join(s) + ")" * opened))

-import numpy as np - -j = [] -j = np.array(j)