Polycarp loves ciphers. He has invented his own cipher called repeating.

Repeating cipher is used for strings. To encrypt the string $s=s_{1}s_{2} \dots s_{m}$ ($1 \le m \le 10$), Polycarp uses the following algorithm:

  he writes down $s_1$ ones,  he writes down $s_2$ twice,  he writes down $s_3$ three times,  ...  he writes down $s_m$ $m$ times. 

For example, if $s$="bab" the process is: "b" $\to$ "baa" $\to$ "baabbb". So the encrypted $s$="bab" is "baabbb".

Given string $t$ — the result of encryption of some string $s$. Your task is to decrypt it, i. e. find the string $s$.


-----Input-----

The first line contains integer $n$ ($1 \le n \le 55$) — the length of the encrypted string. The second line of the input contains $t$ — the result of encryption of some string $s$. It contains only lowercase Latin letters. The length of $t$ is exactly $n$.

It is guaranteed that the answer to the test exists.


-----Output-----

Print such string $s$ that after encryption it equals $t$.


-----Examples-----
Input
6
baabbb

Output
bab
Input
10
ooopppssss

Output
oops
Input
1
z

Output
z

Source: codeforces | Difficulty: EASY
Tags: Implementation


Solutions:
n = int(input())
s = input()
i = 0
ans = ''
count = 1
while i < n:
	ans += s[i]
	i = i + count
	count += 1
print(ans)


s = list(input())
if len(s) % 2:
	s += '.'
new = ''
while s:
	new += s[(len(s) - 1) // 2]
	del s[(len(s) - 1) // 2]
print(new.replace('.', ''))


t = int(input())
s = input()
n = 1
r = ''
for i in range(t):
	if i + 1 == n * (n + 1) // 2:
		r += s[i]
		n += 1
print(r)


n = int(input())
t = input()
s = ''
i = 0
x = 0
while i < n:
	s += t[i]
	i += x + 1
	x += 1
print(s)


x = int(input())
y = input()
z = ''
k = 0
for i in range(x + 2):
	k += i - 1
	if len(y) > k >= 0:
		z += y[k]
print(z)


s = input()
n = len(s)
x = len(s) // 2
if n % 2 == 0:
	i = n // 2 - 1
else:
	i = n // 2
x = i
y = i
if n == 1:
	print(s[0])
	exit()
print(s[i], end='')
while 1:
	if n > 1:
		if x < n - 1:
			x = x + 1
			print(s[x], end='')
		if y > 0:
			y = y - 1
			print(s[y], end='')
		if y == 0 and x == n - 1:
			break


from sys import stdin
n = int(stdin.readline())
a = stdin.readline()
i = 1
b = 1
fake = ''
while b <= n:
	fake = fake + a[b - 1]
	i += 1
	b = int(i * (i + 1) / 2)
print(fake)


l = [char for char in input()]
l2 = []
i = 0
j = len(l) - 1
if len(l) % 2 == 0:
	while i <= len(l) / 2 and j >= len(l) / 2:
		l2.insert(0, l[j])
		l2.insert(0, l[i])
		i += 1
		j -= 1
else:
	while i <= len(l) / 2 and j >= len(l) / 2:
		l2.insert(0, l[i])
		l2.insert(0, l[j])
		i += 1
		j -= 1
	l2.insert(0, l[len(l) // 2])
for x in l2:
	print(x, end='')
print()


s = input()
ans = ''
if len(s) % 2 == 0:
	st = len(s) - 1
else:
	st = 0
for i in range(len(s) // 2):
	ans += s[st] + s[len(s) - st - 1]
	if st > len(s) / 2:
		st -= 1
	else:
		st += 1
if len(s) % 2 == 1:
	ans += s[len(s) // 2]
	print(ans[::-1])
else:
	print(ans[::-1])


input()
s = input()
ans = ''
(i, step) = (0, 0)
while i < len(s):
	ans += s[i]
	step += 1
	i += step
print(ans)


n = int(input())
x = input()
i = 1
ans = ''
while x:
	ans += x[0]
	x = x[i:]
	i += 1
print(ans)


s = input()
n = ''
i = 0
if len(s) % 2 == 0:
	while s:
		n = s[-1] + n
		s = s[:-1]
		if not s:
			break
		n = s[0] + n
		s = s[1:]
else:
	while s:
		n = s[0] + n
		s = s[1:]
		if not s:
			break
		n = s[-1] + n
		s = s[:-1]
print(n)


n = int(input())
s = input()
z = 0
t = 1
l = []
for i in s:
	l.append(s[z])
	z = z + t
	if z >= len(s):
		break
	t += 1
print(''.join(l))


n = int(input())
s = input()
j = 0
i = 2
g = ''
while j < n:
	g += s[j]
	j += i
	i += 1
print(g)


import sys
from itertools import zip_longest
from math import ceil

def main():
	s = sys.stdin.read().strip()
	t = int(ceil(len(s) / 2))
	return ''.join((i + j for (i, j) in zip_longest(s[:t][::-1], s[t:], fillvalue='')))
print(main())


a = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
n = int(input())
s = list(input())
for i in range(len(a)):
	if a[i] == n:
		c = i
		break
l = []
for i in range(c):
	l.append(s[a[i]])
print(''.join(l))


n = int(input())
word = input()
string = ''
i = 0
k = 1
while i < n:
	string = string + word[i]
	for j in range(k):
		i += 1
	k += 1
print(string)


s = [i for i in input()]
if len(s) % 2 == 0:
	Is = True
else:
	Is = False
if Is:
	A = s[len(s) // 2:]
	B = s[:len(s) // 2][::-1]
	s = [(B[i], A[i]) for i in range(len(s) // 2)]
else:
	t = s[len(s) // 2]
	A = s[(len(s) + 1) // 2:]
	B = s[:len(s) // 2][::-1]
	s = [(A[i], B[i]) for i in range(len(s) // 2)]
	s.insert(0, t)
print(''.join((''.join((j for j in i)) for i in s)))


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
(amount, phrase) = (int(f_input()), f_input())
for i in range(1, amount + 1):
	if len(phrase) <= 0:
		break
	f_print(phrase[0])
	phrase = phrase[i:]


s = input()
ss = ''
if len(s) % 2 == 0:
	while len(s) != 0:
		ss += s[len(s) - 1]
		s = s[:len(s) - 1]
		if len(s) == 0:
			break
		ss += s[0]
		s = s[1:]
else:
	while len(s) != 0:
		ss += s[0]
		s = s[1:]
		if len(s) == 0:
			break
		ss += s[len(s) - 1]
		s = s[:len(s) - 1]
ss = ss[::-1]
print(ss)


l = int(input())
str1 = input().strip()
l_str = [c for c in str1]
j = 0
i = 1
str2 = list()
while j < l:
	str2.append(l_str[j])
	j = j + i
	i += 1
str3 = ''.join((c for c in str2))
print(str3)


inp = input
li = list
iinp = lambda : int(inp())
ent = lambda : map(int, inp().split())
lient = lambda : [int(i) for i in inp().split()]
li0 = lambda x: [0 for i in range(x)]
n = iinp()
s = inp()
res = ''
cont = 0
i = 0
while cont < n:
	res += s[cont]
	i += 1
	cont += i
print(res)


s = list(input())
n = len(s)
d = ''
prev = -1
if n % 2 == 0:
	d += s.pop(n - 1)
while s != []:
	if prev == -1:
		d += s.pop(0)
		prev = 0
	else:
		d += s.pop(len(s) - 1)
		prev = -1
print(d[::-1])


n = int(input())
t = input()
s = ''
m = 1
i = 0
while i < n:
	s += t[i]
	i += m
	m += 1
print(s)


n = int(input())
s = input()
i = 0
t = 0
r = ''
while i < n:
	r += s[i]
	t += 1
	i += t
print(r)


s = input()
l = len(s)
t = ''
if l % 2 == 0:
	for i in range(l):
		if i % 2 == 0:
			t += s[-(i // 2) - 1]
		else:
			t += s[i // 2]
else:
	for i in range(l):
		if i % 2 == 0:
			t += s[i // 2]
		else:
			t += s[-(i // 2) - 1]
print(t[::-1])


n = int(input())
s = input()
a = ''
i = b = 0
while b < n:
	a += s[b]
	i += 1
	b += i
print(a)


from math import sqrt, ceil
n = int(input())
t = input()
x = ''
start = 0
for i in range(int(sqrt(2 * n))):
	x += t[start + i]
	start += i
print(x)


t = int(input())
s = input()
s1 = ''
s1 += s[0]
k = 2
p = 3
while p <= t:
	s1 += s[p - 1]
	k += 1
	p = k * (k + 1) // 2
print(s1)


n = int(input())
s = input()
my_list_of_ints = [x * (x + 1) // 2 for x in range(100) if x * (x + 1) // 2 < n]
my_list_of_chars = [s[i] for i in my_list_of_ints]
print(''.join(my_list_of_chars))


n = int(input())
t = input()
s = []
aux = 1
for i in range(n):
	if i == 0:
		s.append(t[i])
		aux = 1
	elif t[i] != t[i - 1]:
		s.append(t[i])
		aux = 1
	elif t[i] == t[i - 1] and aux == len(s) + 1:
		s.append(t[i])
		aux = 1
	else:
		aux += 1
s = ''.join(s)
print(s)


def shifr(s):
	n = len(s)
	(l, r, flag, result) = (0, n - 1, 0, '')
	if n % 2 == 0:
		flag = 0
	else:
		flag = 1
	while r >= l:
		if flag == 0:
			result += s[r]
			r -= 1
		else:
			result += s[l]
			l += 1
		flag = 1 - flag
	return result[::-1]
print(shifr(input()))


n = int(input())
s = input()
news = ''
index = 0
r = 1
while index < n:
	news += s[index]
	index += r
	r += 1
print(news)


n = int(input())
s = input()
t = ''
j = 0
i = 1
while j < n:
	t += s[j]
	j += i
	i += 1
print(t)


cantidad = input()
cadena = input()
lista = list(cadena)
lista_nueva = []
lista_nueva.append(lista[0])
del lista[0]
i = 2
for x in lista:
	lista_nueva.append(lista[0])
	del lista[0:i]
	i += 1
desencriptado = ''.join(lista_nueva)
print(desencriptado)


n = int(input())
l = input()
i = 0
j = 0
while i < n:
	print(l[i], end='')
	j += 1
	i = i + j


n = int(input())
s = input()
j = 1
cnt = j
for i in range(n):
	j -= 1
	if j == 0:
		print(s[i], end='')
		j = cnt + 1
		cnt = j


s = input()
res = ''
b = len(s) % 2
if len(s) == 1:
	print(s)
	exit()
if b:
	for i in range(len(s)):
		res += s[0]
		s = s[1:]
		if s == '':
			break
		res += s[-1]
		s = s[:-1]
		if s == '':
			break
	print(''.join(list(reversed(res))))
else:
	for i in range(len(s)):
		res += s[-1]
		s = s[:-1]
		if s == '':
			break
		res += s[0]
		s = s[1:]
		if s == '':
			break
	print(''.join(list(reversed(res))))


n = input()
n = int(n)
string = input()
c = 0
b = 1
t = ''
while c < n:
	t = t + string[c]
	c = b * (b + 1) // 2
	b = b + 1
print(t)


w = int(input())
b = input()
s = 0
q = ''
if len(b) == 1:
	print(b)
else:
	for i in range(56):
		w -= i + 1
		if w <= 1:
			break
	n = i + 1
	e = 0
	for i in range(0, n):
		if i + s >= len(b) - 1:
			break
		q += b[i + s]
		s += e
		e += 1
	print(q)


from math import ceil
stroka = input()
s = ''
a1 = ceil(len(stroka) / 2) - 1
s += stroka[a1]
n = 1
while True:
	try:
		s += stroka[a1 + n]
		s += stroka[a1 - n]
	except:
		if len(stroka) != len(s):
			print(s[0:-1])
		else:
			print(s)
		exit()
	n += 1


l = list(input())
r = ''
if len(l) % 2 == 0:
	count = len(l) // 2 - 1
else:
	count = len(l) // 2
for i in range(1, len(l) + 1):
	r += l[count]
	if i % 2 != 0:
		count += i
	else:
		count -= i
print(r)


s = input()
l = len(s)
a = ''
if l % 2 == 0:
	for i in range(l):
		if i % 2 == 0:
			a += s[-i // 2 - 1]
		else:
			a += s[i // 2]
else:
	for i in range(l):
		if i % 2 == 0:
			a += s[i // 2]
		else:
			a += s[-(i // 2) - 1]
for i in range(l):
	print(a[-i - 1], end='')


n = int(input())
p = input()
k = 0
s = 0
a = []
while (1 + k) * k / 2 < n:
	s += k
	k += 1
	a.append(p[s])
print(''.join((str(x) for x in a)))


s = input()
n = len(s)
if n % 2 == 1:
	x = n // 2
	for i in range(x + 1):
		if s[x + i] != '!':
			print(s[x + i], end='')
		if i != 0:
			if s[x - i] != '!':
				print(s[x - i], end='')
else:
	s = s[:n // 2] + '!' + s[n // 2:]
	x = n // 2
	for i in range(x + 1):
		if s[x - i] != '!':
			print(s[x - i], end='')
		if i != 0:
			if s[x + i] != '!':
				print(s[x + i], end='')


s = str(input())
l = int(len(s) // 2)
if len(s) % 2 == 0:
	l = l - 1
ans = s[l]
x = l + 1
y = l - 1
while len(ans) < len(s) - 1:
	ans = ans + s[x]
	ans = ans + s[y]
	x = x + 1
	y = y - 1
if len(s) % 2 == 0:
	print(ans + s[-1])
else:
	print(ans)


s = input()
n = len(s)
i = 0
if n & 1:
	k = 0
else:
	k = n - 1
a = ''
while i < n:
	a += s[k]
	if n & 1:
		if k < n // 2:
			k = n - k - 1
		else:
			k = n - k
	elif k < n // 2:
		k = n - k - 2
	else:
		k = n - k - 1
	i += 1
print(a[::-1])


s = input()
s1 = ''
if len(s) % 2 == 1:
	for i in range(len(s) // 2):
		s1 = s[len(s) - i - 1] + s[i] + s1
	s1 = s[len(s) // 2] + s1
	print(s1)
	exit()
for i in range(len(s) // 2):
	s1 = s[i] + s[len(s) - i - 1] + s1
print(s1)


s = input()
ans = ''
if len(s) % 2 == 0:
	while len(s) > 0:
		ans += s[-1]
		s = s[:-1]
		ans += s[0]
		s = s[1:]
	print(ans[::-1])
else:
	while len(s) > 1:
		ans += s[0]
		s = s[1:]
		ans += s[-1]
		s = s[:-1]
	ans += s[0]
	print(ans[::-1])


n = int(input())
a = input()
c = 0
i = 1
ans = ' '
while c < n:
	ans = ans + a[c]
	i = i + 1
	c = c + i
print(ans)


n = int(input())
s = input()
X = 0
d = 1
ans = ''
while X < n:
	ans += s[X]
	X += d
	d += 1
print(ans)


import string
n = int(input())
s = input()
c = ''
b = []
i = 0
k = 0
while k < n:
	b.append(s[k])
	i = i + 1
	k = k + i

def convert(b):
	a = ''
	return a.join(b)
print(convert(b))


l = input()
goo = list(l)
n = len(l)
i = n // 2
t = ''
if n % 2 == 0:
	for i in range(n):
		if i % 2 == 0:
			t += goo[-1]
			goo.pop(-1)
		else:
			t += goo[0]
			goo.pop(0)
else:
	for i in range(n):
		if i % 2 == 1:
			t += goo[-1]
			goo.pop(-1)
		else:
			t += goo[0]
			goo.pop(0)
print(t[::-1])


import math as m
n = int(input())
s = input()
for i in range(1, (int(m.sqrt(8 * n + 1)) + 1) // 2):
	print(s[i * (i + 1) // 2 - 1], end='')


n = int(input())
str = input()
i = 0
j = 0
s = ''
while i < n:
	s += str[i]
	j += 1
	i += j
print(s)


n = int(input())
s = input()
a = [int(i * (i + 1) / 2) for i in range(len(s) + 1)]
length = a.index(len(s))
for i in range(length):
	print(s[a[i]], end='')


def decrypt(x, s):
	if s == '':
		return ''
	return s[0] + decrypt(x + 1, s[x:])
a = input()
print(decrypt(1, input()))


from sys import stdin
stdin.readline()
str = stdin.readline().rstrip()
cur = 0
r = ''
f = 2
while cur < len(str):
	r += str[cur]
	cur += f
	f += 1
print(r)


Str = input()
Res = Str[(len(Str) - 1) // 2]
(Part1, Part2) = (Str[:(len(Str) - 1) // 2], Str[(len(Str) - 1) // 2 + 1:])
for i in range(1, len(Str)):
	if i % 2 == 0:
		Res += Part1[i // 2 * -1]
	else:
		Res += Part2[(i - 1) // 2]
print(Res)


n = int(input())
s = input()
s1 = ''
i = 0
x = 1
while i < n:
	s1 += s[i]
	i += x
	x += 1
	if i >= n:
		break
print(s1)


length = int(input())
cipher = input()
text = ''
n = 0
for i in range(0, length // 3 + 1):
	n += i
	if n >= length:
		break
	text += cipher[n]
print(text)


n = int(input())
s = input()
c = []
b = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45]
for i in b:
	if i < n:
		c.append(s[i])
str1 = ''.join((str(e) for e in c))
print(str1)


s = input()

def cipher(s):
	start = s[0]
	for i in range(1, len(s)):
		if i % 2:
			start = start + s[i]
		else:
			start = s[i] + start
	return start
to = cipher(s)
while cipher(to) != s:
	to = cipher(to)
print(to)


(s, letters, a, b) = (input(), [], None, None)
mid = (len(s) - 1) // 2
if len(s) % 2 == 0:
	letters = [s[mid], s[mid + 1]]
	a = iter(reversed(s[:mid]))
	b = iter(s[mid + 2:])
else:
	letters = [s[mid]]
	a = iter(s[mid + 1:])
	b = iter(reversed(s[:mid]))
for _ in range((len(s) - 1) // 2):
	letters.extend([next(a), next(b)])
print(''.join(letters))


n = int(input())
s = input()
A = list()
j = 1
i = 0
while i < len(s):
	A.append(s[i])
	j += 1
	i += j
print(''.join(map(str, A)))


t = str(input())
s = ''
if len(t) % 2 == 0:
	k = 0
else:
	k = 1
for i in range(len(t)):
	if i % 2 == k:
		s += t[-1 - i // 2]
	else:
		s += t[i // 2]
print(s[::-1])


import sys
from collections import defaultdict
n = int(input())
st = input()
cur = 1
res = ''
while len(st):
	res += st[0]
	st = st[cur:]
	cur += 1
print(res)


n = int(input())
s = input()
t = 0
i = 1
while True:
	print(s[t], end='')
	t += i
	i += 1
	if t >= n:
		break


n = int(input())
s = input()
c = int(0)
i = int(0)
string = []
while i < n:
	string.append(s[i])
	i = i + c + 1
	c += 1
print(''.join(string))


S = input()
an = []
if len(S) % 2 == 1:
	(l, r) = (len(S) // 2, len(S) // 2 + 1)
else:
	(l, r) = (len(S) // 2 - 1, len(S) // 2)
for i in range(len(S)):
	if i % 2 == 0:
		an += [S[l]]
		l -= 1
	else:
		an += [S[r]]
		r += 1
print(''.join(an))


n = int(input())
string = input()
currentIndex = 1
output = ''
for i in range(1, 1000):
	if currentIndex > n:
		break
	output += string[currentIndex - 1]
	currentIndex += i
print(output)


n = int(input())
t = input()
i = 0
k = 1
s = ''
while i <= n:
	k += 1
	s += t[i]
	i += k
print(s)


n = int(input())
s = input()
res = []
count = 1
i = 0
while i < n:
	res.append(s[i])
	i += count
	count += 1
print(''.join(res))


t = input()
s = ''
while len(t) > 0:
	if len(t) % 2 == 0:
		s = t[-1] + s
		t = t[:len(t) - 1]
	else:
		s = t[0] + s
		t = t[1:]
print(s)


s = input()
s1 = []
if len(s) % 2 == 0:
	j = len(s) // 2 - 2
	s1.append(s[len(s) // 2 - 1])
	for i in range(len(s) // 2, len(s)):
		s1.append(s[i])
		if len(s) - 1 == i:
			break
		s1.append(s[j])
		j -= 1
	for i in range(len(s)):
		print(s1[i], end='')
else:
	s1.append(s[len(s) // 2])
	j = len(s) // 2 - 1
	for i in range(len(s) // 2 + 1, len(s)):
		s1.append(s[i])
		s1.append(s[j])
		j -= 1
	for i in range(len(s)):
		print(s1[i], end='')


from math import sqrt
x = int(input())
a = int((1 + sqrt(1 + 8 * x)) / 2)
s = '0' + input()
ans = ''
ptr = 1
for i in range(1, a):
	ele = s[ptr]
	ans += ele
	ptr += i
print(ans)


input()
t = input()
s = ''
i = 0
c = 1
while i < len(t):
	s += t[i]
	i += c
	c += 1
print(s)


t = int(input())
n = input()
n = list(n)
l = []
c = 2
l.append(n[0])
i = 1
while i < t:
	l.append(n[i])
	i = i + c
	c = c + 1
for i in range(len(l)):
	print(l[i], end='')


s = list(input())
res = ''
l = 0
r = len(s) - 1
for i in range(len(s)):
	if i % 2 == (len(s) - 1) % 2:
		res += s[l]
		l += 1
	else:
		res += s[r]
		r -= 1
print(res[::-1])


t = input()
s = ['a'] * len(t)
s[::2] = t[(len(t) - 1) // 2::-1]
s[1::2] = t[(len(t) + 1) // 2:]
print(''.join(s))


lens = int(input())
strs = input()
done = 0
gap = 1
ans = ''
while done < lens:
	ans += strs[done]
	done += gap
	gap += 1
print(ans)


s = str(input())
if len(s) % 2 == 1:
	n = len(s) // 2
else:
	n = len(s) // 2 - 1
p = n - 1
k = n + 1
ss = s[n]
while len(ss) != len(s):
	if k < len(s):
		ss += s[k]
		k += 1
	if p >= 0:
		ss += s[p]
		p -= 1
print(ss)


(n, s, i, c, v) = (int(input()), input(), 0, 1, '')
while i < n:
	(i, c, v) = (i + c, c + 1, v + s[i])
print(v)


s = input()
s1 = ''
if len(s) % 2 == 0:
	for i in range(len(s) - 1, len(s) // 2 - 1, -1):
		s1 = s1 + s[i] + s[len(s) - 1 - i]
else:
	for i in range(len(s) // 2):
		s1 = s1 + s[i] + s[len(s) - 1 - i]
	s1 = s1 + s[len(s) // 2]
s1 = s1[::-1]
print(s1)


def cipher():
	ctext = ''
	ptext = ''
	n = int(input())
	ctext = input()
	i = 1
	x = 0
	if len(ctext) >= 1 and len(ctext) <= 55:
		if n == len(ctext):
			while x < n:
				ptext += ctext[x]
				x += i
				i += 1
	print(ptext)
cipher()


n = int(input())
t = input()
ans = ''
k = 0
while len(t[k:]) != 0:
	t = t[k:]
	ans += t[0]
	k += 1
print(ans)


def decrypt(s):
	ans = ''
	k = 1
	i = 0
	while i < len(s):
		ans += s[i]
		k += 1
		i += k
	return ans
n = int(input())
s = input()
print(decrypt(s))


n = int(input())
encrypted = input()

def _get_positions():
	positions = [1, 2]
	for i in range(2, 11):
		new_pos = positions[-1] + i
		positions.append(new_pos)
	return positions
positions = _get_positions()
result = ''.join((encrypted[i - 1] for i in positions if i <= n))
print(result)


n = int(input())
s = input()
l = list(s)
i = 0
k = 0
ans = ''
while i < n:
	ans += l[i]
	k += 1
	i += k
print(ans)


import math
n = int(input())
s = input()
ress = ''
i = j = 0
while i < n:
	ress = ress + s[i]
	j = j + 1
	i = i + j
print(ress)


def f():
	n = int(input())
	s = input()
	(t, i) = (0, 1)
	g = ''
	while t < n:
		g = g + s[t]
		t = t + i
		i = i + 1
	print(g)
f()


n = int(input())
text = input()
decrypt = ''
counter = 1
i = 0
while i < n:
	decrypt += text[i]
	i += counter
	counter += 1
print(decrypt)


n = int(input())
s = input()
res = str()
k = 1
tmp = 0
for i in range(len(s)):
	if i == k + tmp - 1:
		res += s[i]
		tmp += k
		k += 1
print(res)


s = input()
mid = int(len(s) / 2)
if len(s) % 2 == 0:
	mid -= 1
ans = s[mid]
i = 1
for x in range(len(s) - 1):
	if x % 2 == 0:
		ans += s[mid + i]
	elif x % 2 == 1:
		ans += s[mid - i]
		i += 1
print(ans)


def main():
	ls = [l for l in input()]
	lenght = len(ls)
	if lenght % 2 == 1:
		sign = {0: 0, 1: -1}
	else:
		sign = {0: -1, 1: 0}
	res = [ls.pop(sign[i % 2]) for i in range(lenght)]
	print(''.join(res[::-1]))
main()


import math

def main():
	t = input()
	if len(t) % 2 == 0:
		center = int(len(t) / 2 - 1)
	else:
		center = math.ceil(len(t) / 2 - 1)
	if len(t) < 2:
		print(t)
		return
	s = t[center]
	n = 0
	d1 = 1
	d2 = 1
	for i in range(len(t) - 1):
		if n % 2 == 0:
			s += t[center + d1]
			d1 += 1
		else:
			s += t[center - d2]
			d2 += 1
		n += 1
	print(s)
main()


n = int(input())
code = list(input())
tnumbers = [1]
for i in range(2, 55):
	tnumbers.append(tnumbers[-1] + i)
answer = []
i = 0
while tnumbers[i] <= n:
	answer.append(code[tnumbers[i] - 1])
	i += 1
word = ''.join(answer)
print(word)


n = int(input())
s = input()
o = []
i = 0
j = 1
while i < len(s):
	o.append(s[i])
	i += j
	j += 1
print(''.join(o))


n = int(input())
s = input()
s1 = ''
count = 1
while s:
	s1 += s[0]
	s = s[count:]
	count += 1
print(s1)


b = int(input())
a = str(input())
i = 0
z = ''
while i < b:
	z += a[0:1]
	a = a[i:]
	i += 1
if b == 1:
	print(a)
else:
	print(z[1:])


n = int(input())
t = input()
a = 0
c = 1
b = ''
while a < n:
	b += t[a]
	a += c
	c += 1
print(b)


n = int(input())
if n % 2 == 0:
	s = int(n / 2)
elif n % 2 == 1:
	s = int((n + 1) / 2)
m = []
w = []
x = input()
count = 0
m.append(count)
for i in range(2, s + 1):
	count = count + i
	if count < n:
		m.append(count)
for j in range(len(m)):
	s = m[j]
	w.append(x[s])
for d in range(len(w)):
	print(w[d], end='')


n = int(input())
t = list(input())
(i, z) = (0, 1)
while i < n:
	print(t[i], end='')
	i = i + z
	z = z + 1


def max1(a):
	p = a[0]
	for x in a:
		if x > p:
			p = x
	return p

def preobr(x):
	if x % 2 == 1:
		return x + 1
	else:
		return x - 1

def prlist(a):
	for x in a:
		print(x, end=' ')

def dlin(n):
	k = 0
	while n > 0:
		n -= k
		k += 1
	return k - 1
n = int(input())
a = input()
b = ''
k = 1
p = 0
t = dlin(n)
while k <= t:
	for i in range(k):
		if i == 0:
			b += a[p]
		p += 1
	k += 1
print(b)


t = input()
index = len(t) // 2
if len(t) % 2 == 0:
	count = 2
	index1 = len(t) // 2 - 1
	s = t[index1] + t[index]
	while count != len(t):
		if count % 2 == 0:
			index1 -= 1
			s += t[index1]
		else:
			index += 1
			s += t[index]
		count += 1
	print(s)
else:
	index1 = index
	count = 1
	s = t[index]
	while count != len(t):
		if count % 2 == 0:
			index1 -= 1
			s += t[index1]
		else:
			index += 1
			s += t[index]
		count += 1
	print(s)


n = int(input())
s = input()
i = 1
while s != '':
	print(s[i - 1], end='')
	s = s[i:]
	i += 1


n = int(input())
s = input()
d = 0
i = 0
j = 1
while i < n:
	print(s[i], end='')
	i += j
	j = j + 1


(n, s) = (int(input()), input())
for i in range(1, n + 1):
	try:
		print(s[i * (i - 1) // 2], end='')
	except:
		break


s = input()
n = len(s)
i = (n - 1) // 2
ans = [s[i]]
for j in range(1, n // 2 + 1):
	if i + j < n:
		ans.append(s[i + j])
	if i - j > -1:
		ans.append(s[i - j])
print(''.join(ans))


num = int(input())
s = str(input())
k = ''
l = 0
p = 2
while l < num:
	k += s[l]
	l += p
	p = p + 1
print(k)


import math
n = int(input())
t = str(input())
s = ''
k = 1
i = 0
while i < len(t):
	s = s + t[i]
	k = k + 1
	i = i + k
print(s)


n = int(input())
s = input()
a = 1
i = 0
while i != n:
	print(s[i], end='')
	i += a
	a += 1


n = int(input())
a = input()
ans = ''
k = 0
i = 0
while k < n:
	i += 1
	k += i
	ans += a[k - 1]
print(ans)


n = int(input())
s = input()
c = 1
sol = ''
i = 0
while i < n:
	sol += s[i]
	i += c
	c += 1
print(sol)


n = int(input())
s = input()
ans = ''
i = 0
k = 1
while i < n:
	ans += s[i]
	i += k
	k += 1
print(ans)


def encrypt():
	a = int(input())
	b = input()
	i = 1
	position = 0
	output = ''
	if a == 1:
		print(b)
	else:
		while position < a - 1:
			output += b[position]
			position += i
			i += 1
		print(output)
encrypt()


n = int(input())
t = input()
i = 1
k = 0
while k < n:
	print(t[k], end='')
	k = k + i
	i = i + 1


n = int(input())
s = input()
res_s = s[0]
i = 1
count = 1
while i < n:
	res_s += s[i]
	count += 1
	i += count
print(res_s)


length = int(input())
s = input()
ans = s[0]
i = 1
j = 1
while j < len(s):
	ans = ans + s[j]
	i = i + 1
	j = j + i
print(ans)


n = int(input())
s = input()
a = ''
j = 0
for i in range(1, 11):
	b = i * (i + 1) // 2
	if b <= n:
		p = list(s[j:b])
		a = a + p[0]
		j = b
	else:
		break
print(a)


def f(n):
	return int(1 / 2 * n * n + 1 / 2 * n - 1)
len = int(input())
s = input()
n = 1
result = ''
while f(n) <= len:
	i = f(n)
	result += s[i]
	n += 1
print(result)


t = input()
mid = (len(t) - 1) // 2
s = ''
(i, j) = (mid, mid + 1)
while i >= 0 or j < len(t):
	if i >= 0:
		s += t[i]
		i -= 1
	if j < len(t):
		s += t[j]
		j += 1
print(s)


n = int(input())
s = input()
i = 0
q = 1
ans = []
while i < n:
	ans.append(s[i])
	i += q
	q += 1
print(*ans, sep='')


import math
n = int(input())
i = 1
finstring = ''
k = (math.sqrt(8 * n + 1) - 1) // 2
k = int(k)
string = str(input())
while i <= k:
	finstring = finstring + string[i * (i + 1) // 2 - 1]
	i = i + 1
print(finstring)


n = int(input())
s = input()
ans = ''
(c, k) = (0, 1)
while c < n:
	ans += s[c]
	c = c + k
	k += 1
print(ans)


n = int(input(''))
s = str(input(''))
out = ''
i = 0
while n > 0:
	i += 1
	n -= i
itr = []
o = 1
for j in range(i):
	o = o + j
	itr.append(o)
for i in itr:
	out += s[i - 1]
print(out)


(n, t, c, x) = (int(input()), input(), 0, 1)
while c < n:
	print(t[c], end='')
	c += x
	x += 1


n = int(input())
s = list(input())
x = []
i = 0
j = 0
while i < len(s):
	x.append(s[i])
	j += 1
	i += j
for i in range(len(x)):
	print(x[i], end='')


n = int(input())
t = str(input())
c = 0
i = 1
s = ' '
while c < n:
	s += t[c]
	c += i
	i += 1
print(s)


s = input('')
k = ''
g = len(s)
if len(s) % 2 == 1:
	for i in range(g):
		if i % 2 == 0:
			k = s[0] + k
			s = s[1:]
		else:
			k = s[len(s) - 1] + k
			s = s[:len(s) - 1]
else:
	for i in range(g):
		if i % 2 == 1:
			k = s[0] + k
			s = s[1:]
		else:
			k = s[len(s) - 1] + k
			s = s[:len(s) - 1]
print(k)


n = int(input())
s = input()
(i, k) = (0, 0)
while k + i < n:
	print(s[i], end='')
	k += 1
	i += k


import sys

def inpt():
	return sys.stdin.readline().strip()
n = int(inpt())
s = inpt()
t = ''
k = 0
i = 0
while k < n:
	i += 1
	t += s[k]
	k += i
print(t)


n = int(input())
s = input()
i = 0
to_add = 1
while i < n:
	print(s[i], end='')
	i += to_add
	to_add += 1


s = list(input())
l = len(s)
pos = l // 2 - (0 if l % 2 else 1)
print(s[pos], end='')
i = 1
while i < pos + 2:
	if pos + i < l:
		print(s[pos + i], end='')
	if pos - i > -1:
		print(s[pos - i], end='')
	i += 1


_ = input()
s = list(input())
i = 0
j = 1
t = ''
while i < len(s):
	t += s[i]
	i += j
	j += 1
print(t)


n = int(input())
es = input()
c = []
sum = 0
for i in range(n):
	if sum < n:
		c.append(es[sum])
		sum += i
	else:
		break
s = ''
for i in range(len(c)):
	s += c[i]
if n > 1:
	print(s[1:])
else:
	print(es)


a = int(input())
s = input()
lista = list(s)
b = 1
i = 2
while b <= a:
	print(lista[b - 1], end='')
	b += i
	i += 1


nn = int(input())
n = input()
i = 0
z = 1
while i < nn:
	print(n[i], end='')
	i += z
	z += 1


n = int(input())
str = input()
index = 0
counter = 0
while True:
	print(str[counter], end='')
	index += 1
	counter += index
	if counter >= n:
		break


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
num = int(z())
for _ in range(1):
	s = ''
	l = z()
	i = 0
	j = 0
	for _ in range(num):
		s += l[i]
		j += 1
		i += j
		if i >= num:
			break
	print(s)


n = int(input())
s = input()
S = list(s)
a = 1
try:
	while a * (a + 1) / 2 < n:
		b = int(a * (a + 1) / 2)
		print(S[b - 1], end='')
		a = a + 1
	print(S[b])
except NameError:
	print(s)


def main():
	n = int(input())
	s = input()
	final = ''
	(cnt, val) = (1, 1)
	while val <= len(s):
		final += s[val - 1]
		val += cnt + 1
		cnt += 1
	print(final)
main()


n = input()
n = int(n)
s = input()
k = 1
t = s[0]
for i in range(2, n):
	if k < len(s):
		t = t + s[k]
		k = k + i
	else:
		break
print(t)


t = input()
t1 = []
if len(t) % 2 == 0:
	t = t[::-1]
for i in range(len(t)):
	t1.append(t[0])
	t = t[1:]
	t = t[::-1]
print(*t1[::-1], sep='')


s = input()
l = []
m = len(s) // 2
if len(s) % 2 == 0:
	for i in range(m - 1, -1, -1):
		l.append(s[i])
		l.append(s[len(s) - i - 1])
elif len(s) == 1:
	l.append(s[0])
else:
	l.append(s[m])
	for i in range(m - 1, -1, -1):
		l.append(s[len(s) - i - 1])
		l.append(s[i])
print(''.join(l))


n = int(input())
string = input()
if n == 1:
	print(string)
else:
	for k in range(2, n):
		if k * (k + 1) == 2 * n:
			flag = k - 1
	string = string[::-1]
	ch = string[0]
	i = flag + 1
	ch += string[i]
	while flag != 1:
		ch += string[flag + i]
		i = flag + i
		flag -= 1
	print(ch[::-1])


u = int(input())
s = str(input())
oss = ''
c = 0
j = 0
while c < u:
	oss += s[c]
	j = j + 1
	c = c + j
print(oss)


n = int(input())
st = input()
i = 1
ind = 1
k = ''
while ind <= len(st):
	k = k + st[ind - 1]
	i = i + 1
	ind = ind + i
print(k)


n = int(input())
a = input()
s = ''
k = 0
p = 0
while k <= n - 1:
	s += a[k]
	p += 1
	k += p
print(s)


n = int(input())
s = input()
i = 0
c = ''
j = 1
while i < n:
	c += s[i]
	i += j
	j += 1
print(c)


(n, encrypted, decrypted) = (int(input()), list(input()), '')
for i in range(int((n * 2) ** 0.5)):
	decrypted += encrypted[i * (i + 1) // 2]
print(decrypted)


n = int(input())
a = input()
s = []
for i in a:
	s.append(i)
a = ''
j = i = 0
while j < n:
	a += s[j]
	i += 1
	j = j + i + 1
print(a)


n = int(input())
if 1 <= n and n <= 55:
	l = []
	L = input()
	s = ''
	c = int(-1 + pow(1 + 8 * n, 1 / 2)) // 2
	c1 = 0
	for i in range(1, c + 1):
		c1 += i
		s += L[c1 - 1]
	print(s)


ish = input()
res = ''
if len(ish) % 2 == 0:
	while len(ish) != 0:
		res += ish[-1]
		res += ish[0]
		ish = ish[1:-1]
else:
	while len(ish) != 0:
		res += ish[0]
		res += ish[-1]
		ish = ish[1:-1]
	res = res[:-1]
print(res[::-1])


n = int(input())
z = input()
count = 0
i = 1
while count < n:
	print(z[count], end='')
	count += i
	i += 1
print()


t = input()
l = list(t)
l1 = []
l2 = []
if len(t) == 1 or len(t) == 2:
	print(t)
else:
	if len(t) % 2 == 0:
		x = len(t) // 2 - 1
	else:
		x = len(t) // 2
	for i in range(x + 1, len(t)):
		l1.append(t[i])
	for i in range(0, x):
		l2.append(t[i])
	print(t[x], end='')
	k = x - 1
	m = x + 1
	while k >= 0 and m < len(t):
		print('{}{}'.format(t[m], t[k]), end='')
		m += 1
		k -= 1
	if len(t) % 2 == 0:
		print(t[len(t) - 1], end='')


n = int(input())
s = input()
out = ''
cnt = 1
while s != '':
	out += s[0]
	s = s[cnt:]
	cnt += 1
print(out)


n = int(input())
cipher = list(input())
message = []
increment = 0
index = 0
while index < n:
	message.append(cipher[index])
	increment += 1
	index += increment
print(''.join(message))


import sys
length1 = int(sys.stdin.readline())
stringinput = sys.stdin.readline()
compare_char = ''
index = 2
counter = 0
output_string = ''
try:
	for i in range(0, length1):
		if i == 0:
			output_string = stringinput[0]
			compare_char = stringinput[1]
			continue
		if compare_char == stringinput[i]:
			counter = counter + 1
			if counter == index:
				output_string = output_string + compare_char
				compare_char = stringinput[i + 1]
				counter = 0
				index = index + 1
except:
	pass
print(output_string)


a = input()

def mm(s, ans):
	if len(s) == 1:
		return s + ans
	if len(s) % 2 == 0:
		ans = s[-1] + ans
		return mm(s[:-1], ans)
	else:
		ans = s[0] + ans
		return mm(s[1:], ans)
print(mm(a, ''))


s = input()
l = len(s)
res = ''
i = l
j = 0
while l > 0:
	if l % 2 == 0:
		res = res + s[i - 1]
		l -= 1
		i -= 1
	else:
		res = res + s[j]
		j += 1
		l -= 1
print(res[::-1])


def ans(arr, n):
	i = len(arr) - 1
	s = ''
	D = 1 + 8 * n
	xx = -1 + D ** 0.5
	xx = xx // 2
	i = n - 1
	while i >= 0:
		s += arr[i]
		i -= int(xx)
		xx -= 1
	return s[::-1]
n = int(input())
t = list(input())
print(ans(t, n))


n = int(input())
input_string = input()
i = 0
index = 0
output_string = str()
while True:
	if index < n:
		output_string += input_string[index]
		i += 1
		index += i
	else:
		break
print(output_string)


n = int(input())
t = input()
risu = ''
somma = 1
i = 1
while somma <= n:
	risu += t[somma - 1]
	i += 1
	somma += i
print(risu)


n = int(input())
s = input()
ans = ''
s = list(s)
i = 1
while len(s) != 0:
	ans += s[0]
	for j in range(i):
		s.pop(0)
	i += 1
print(ans)


l = int(input())
s = input()
new = ''
a = 0
h = 0
while a < l:
	new = new + s[a]
	h = h + 1
	a = a + h
print(new)


Str = input()
if len(Str) == 1:
	print(Str)
else:
	if len(Str) % 2 == 0:
		k = len(Str) // 2 - 1
	else:
		k = len(Str) // 2
	S = Str[k]
	i = 1
	while k + i != len(Str):
		S += Str[k + i] + Str[k - i]
		i += 1
	if len(Str) % 2 == 0:
		print(S[:len(S) - 1])
	else:
		print(S)


lh = int(input())
s = input()
i = 0
index = 0
res = ''
while index < lh:
	res += s[index]
	i += 1
	index += i
print(res)


n = int(input().strip())
s = str(input().strip())
c = 1
i = 0
while i < n:
	print(s[i], end='')
	i += c
	c += 1


s = input()
s1 = ''
while len(s) >= 2:
	if len(s) % 2 == 1:
		n = len(s) // 2
	else:
		n = len(s) // 2 - 1
	s1 += s[n:n + 2]
	s = s[0:n] + s[n + 2:]
if s != '':
	s1 += s
print(s1)


t = int(input())
encrypt = input()
j = 0
decrypt = list()
for i in range(0, t):
	j = i + j
	if j < t:
		decrypt = decrypt + [encrypt[j]]
	else:
		break
for i in decrypt:
	print(i, end='')


import sys
n = int(sys.stdin.readline().strip())
enc = sys.stdin.readline().strip()
dec = []
i = 1
index = 0
while index < n:
	dec.append(enc[index])
	index += i
	i += 1
print(''.join(dec))


f = int(input())
h = input()
x = list(h)
a = 1
s = ''
count = 0
while count < f:
	c = 0
	while c < a:
		if c == 0:
			s += str(x[count])
			c += 1
		else:
			c += 1
	count += a
	a += 1
print(s)


def pro(n, s):
	result = []
	i = step = 0
	while i < n:
		result.append(s[i])
		step += 1
		i += step
	return ''.join(result)
n = int(input())
s = input()
print(pro(n, s))


n = int(input())
s = input()
i = 1
while True:
	if i * (i + 1) // 2 <= n:
		print(s[i * (i + 1) // 2 - 1], end='')
	else:
		break
	i += 1


n = int(input())
string = input()
i = 1
cnt = 0
while cnt < n:
	print(string[cnt], end='')
	cnt += i
	i += 1


x = input()
par = False
if len(x) % 2 == 0:
	par = True
res = ''
if par:
	for i in range(len(x)):
		if i > len(x) - 1 - i:
			break
		res = x[len(x) - 1 - i] + res
		if i == len(x) - 1 - i:
			break
		res = x[i] + res
else:
	for i in range(len(x)):
		if i > len(x) - 1 - i:
			break
		res = x[i] + res
		if i == len(x) - 1 - i:
			break
		res = x[len(x) - 1 - i] + res
print(str(res))


n = int(input())
s = input()
name = ''
i = 0
z = 2
while i < n:
	name += s[i]
	i += z
	z += 1
print(name)


n = int(input())
s = input()
ans = ''
c = 1
cur = 0
for i in range(n):
	cur += 1
	if cur == c:
		ans += s[i]
		cur = 1
		c += 1
print(ans)


n = input()
s = ''
if len(n) % 2 == 0:
	y = len(n) - 1
	x = 0
	while x <= y:
		s = s + n[y]
		s = s + n[x]
		y -= 1
		x += 1
	print(s[::-1])
else:
	y = len(n) - 1
	x = 0
	while x < y:
		s = s + n[x]
		s = s + n[y]
		y -= 1
		x += 1
	print(n[x] + s[::-1])


n = int(input())
a = input()
i = 0
c = 1
s = ''
while i < n:
	s += a[i]
	i += c
	c += 1
print(s)


def main():
	s = input()
	length = len(s)
	left = length // 2 - 1 if length % 2 == 0 else length // 2
	right = left + 1
	plain_text = ''
	while left > -1 and right < length:
		plain_text += s[left]
		plain_text += s[right]
		left -= 1
		right += 1
	if left > -1:
		plain_text += s[left]
	print(plain_text)
main()


n = int(input())
s = input()
k = 0
p = 1
l = ''
while k != n:
	l += s[k]
	k += p
	p += 1
print(l)


n = input()
s = input()
c = 0
cc = 1
ss = ''
while c < len(s):
	ss += s[c]
	c += cc
	cc += 1
print(ss)


n = int(input().strip(' '))
t = input().strip(' ')
if n <= 1:
	print(t)
else:
	s = t[0]
	(i, j) = (1, 1)
	while i < len(t):
		s += t[i]
		j += 1
		i = i + j
	print(s)


n = int(input())
a = input()
d = 0
g = ''
i = 1
while d < n:
	g += a[d]
	d += i
	i += 1
print(g)


n = int(input())
s = input()
ans = []
cnt = 0
for i in range(n):
	if cnt >= n:
		break
	ans.append(s[cnt])
	cnt += i + 1
print(''.join(ans))


enc = input()
n = len(enc)
s = n - (n % 2 == 0)
a = list(range(s, 0, -2)) + list(range(2, n + 1, 2))
dec = [' '] * n
for (i, c) in zip(a, enc):
	dec[i - 1] = c
print(*dec, sep='')


import math
n = int(input())
a = input()
b = ''
i = math.sqrt(1 + 8 * n)
c = int((i - 1) / 2)
for i in range(1, c + 1):
	k = i * (i + 1) / 2
	k = int(k - 1)
	b = b + a[k]
print(b)


import math
l = int(input())
s = input()
n = int((-1 + math.sqrt(8 * l + 1)) / 2)
for i in range(n):
	print(s[i * (i + 1) // 2], end='')


n = int(input())
s = input()
index = 0
i = 0
a = ''
while True:
	index = index + i
	i += 1
	a += s[index]
	if index + i == len(s):
		break
print(a)


n = int(input())
s = input()
res = ''
i = 0
step = 1
while i < len(s):
	res += s[i]
	i += step
	step += 1
print(res)


n = int(input())
s = input()
i = 0
j = 1
res = ''
while i < n:
	res += s[i]
	i += j
	j += 1
print(res)


q = int(input())
s = input()
result = ''
i = 1
while s:
	result += s[0]
	s = s[i:]
	i += 1
print(result)


seq = input()
if len(seq) % 2:
	part1 = seq[:len(seq) // 2 + 1]
	part2 = seq[len(seq) // 2 + 1:]
	ans = ''.join(list(map(lambda x: ''.join(x), zip(part1[::-1], part2)))) + seq[0]
else:
	part1 = seq[:len(seq) // 2]
	part2 = seq[len(seq) // 2:]
	ans = ''.join(list(map(lambda x: ''.join(x), zip(part1[::-1], part2))))
print(ans)


def f(t):
	tp = 1 + 4 * t
	return int(abs(min((-1 + tp ** 0.5) / 2, (-1 - tp ** 0.5) / 2)))
d = int(input())
s = input()
n = f(2 * d) - 1
ans = ''
for i in range(n, 0, -1):
	d -= i
	l1 = s[d:]
	ans += l1[0]
	s = s[0:d]
print(ans[::-1])


n = int(input())
s = input()
cur = 0
aa = [0]
for i in range(1, 1000):
	aa.append(aa[-1] + i)
try:
	for i in aa:
		print(s[i], end='')
except:
	pass


s = input()
i = len(s) // 2 - 1 if len(s) % 2 == 0 else len(s) // 2
ans = ''
n = 0
while i - n >= 0:
	if i == n and len(s) % 2 == 1:
		ans += s[i - n]
	else:
		ans += s[i - n] + s[i + 1 + n]
	n += 1
print(ans)


n = int(input())
s = input()
tt = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
i = 0
while n > tt[i]:
	i += 1
res = ''
for j in range(i):
	res += s[tt[j]]
print(res)


from math import *
from itertools import product
s = input()
s1 = ''
if len(s) == 1:
	print(s)
elif len(s) % 2 == 0:
	s1 += s[len(s) // 2 - 1]
	cnt = len(s) // 2 - 2
	for i in range(len(s) // 2, len(s) - 1):
		s1 += s[i]
		s1 += s[cnt]
		cnt -= 1
	s1 += s[len(s) - 1]
else:
	s1 += s[len(s) // 2]
	cnt = len(s) // 2 - 1
	for i in range(len(s) // 2 + 1, len(s)):
		s1 += s[i]
		s1 += s[cnt]
		cnt -= 1
print(s1)


a = list(input())
r = len(a)
if len(a) % 2 == 0:
	t = int(r / 2) - 1
	s = a[int(r / 2) - 1]
else:
	s = a[int(r / 2)]
	t = int(r / 2)
m = 1
for i in range(1, r):
	if i % 2 == 1:
		s = s + a[t + m]
	else:
		s = s + a[t - m]
		m += 1
print(s)


number = int(input(''))
code = input('')
pos = 0
inc = 1
decr = ''
while pos < number:
	letter = code[pos:pos + 1]
	pos += inc
	inc += 1
	decr += letter
print(decr)


t = int(input())
h = str(input())
k = list(h)
i = 0
while h != '':
	print(h[i], end='')
	i += 1
	h = h[i:]


n = input()
s = input()
a = 1
ans = ''
I = 0
while I < len(s):
	ans += s[I]
	I += a
	a += 1
print(ans)


t = input()
s_arr = ['0'] * len(t)
if len(t) % 2 == 0:
	for i_t in range(2, len(t) + 1, 2):
		s_arr[-i_t] = t[int((i_t - 2) / 2)]
	for i_t in range(1, len(t), 2):
		s_arr[i_t] = t[int((i_t - 1) / 2 + len(t) / 2)]
else:
	for i_t in range(1, len(t) + 1, 2):
		s_arr[-i_t] = t[int((i_t - 1) / 2)]
	for i_t in range(1, len(t), 2):
		s_arr[i_t] = t[int((i_t - 1) / 2 + (len(t) + 1) / 2)]
s = ''.join(s_arr)
print(s)


s = list(input())
ans = []
if len(s) % 2 == 0:
	for i in range(len(s) // 2):
		ans.append(s[-i - 1])
		ans.append(s[i])
	ans.reverse()
	z = ''.join(ans)
	print(z)
else:
	for i in range(len(s) // 2):
		ans.append(s[i])
		ans.append(s[-i - 1])
	ans.append(s[len(s) // 2])
	ans.reverse()
	z = ''.join(ans)
	print(z)


f = int(input())
s = input()
l = []
l1 = []
ans = ''
n = 1
while n < f:
	for i in range(0, f):
		m = i + n
		if m < f:
			l.append(m)
		n = m
for i in l:
	l1.append(i - 1)
if len(l1) == 0:
	print(s)
else:
	for i in l1:
		print(s[i], end='')


n = int(input())
s = input()
ans = ''
i = j = 0
while j < n:
	ans += s[j]
	i += 1
	j += i
print(ans)


a = input()
l = len(a)
a1 = a[:int(l / 2) - int((l + 1) % 2)][::-1]
a2 = a[int(l / 2) - int((l + 1) % 2):]
s = str(a2[0])
a2 = a2[1:]
for i in range(len(a2)):
	if i < len(a1):
		s += str(a2[i]) + str(a1[i])
	else:
		s += str(a2[i])
print(s)


t = input()
n = len(t)
(mid, s) = ((n - 1) // 2, [0] * n)
(s[::2], s[1::2]) = (t[mid::-1], t[mid + 1:])
print(''.join(s))


from collections import defaultdict
from functools import reduce
mi = lambda : [int(i) for i in input().split()]
flat = lambda l: reduce(lambda a, b: a + b, l)
input()
s = input()
r = ''
i = 1
while s:
	i += 1
	r += s[0]
	s = s[i:]
print(r)


s = input()
c = ''
if len(s) % 2 == 0:
	for j in s:
		c += s[-1]
		s = s[:len(s) - 1][::-1]
else:
	for i in s:
		c += s[0]
		s = s[1:len(s)][::-1]
print(c[::-1])


s = input()
if len(s) & 1 == 1:
	s = s + ' '
res = ''
for i in range(len(s) // 2):
	res = s[i] + s[-i - 1] + res
res = res.replace(' ', '')
print(res)


n = int(input())
s = input()
ans = ''
c = 0
l = 0
while l < n:
	ans += s[l]
	c += 1
	l += c
print(ans)


n = int(input())
s = input()
rs = ''
i = Count = 0
while i < n:
	rs += s[i]
	Count += 1
	i += Count
print(rs)


import math
import sys
import re
s = input()
n = len(s)
if n % 2 == 0:
	m = n // 2 - 1
else:
	m = n // 2
s1 = s[m]
x = 1
while len(s1) != len(s):
	s1 = s1 + s[m + x]
	if len(s1) == len(s):
		break
	else:
		s1 = s1 + s[m - x]
	x = x + 1
print(s1)


a = input()
x = ''
n = len(a) - 1
s = 0
s1 = 0
e = 0
if len(a) % 2 != 0:
	e = 1
for i in range(len(a)):
	if (i + e) % 2 == 0:
		x = a[n - s] + x
		s += 1
	else:
		x = a[s1] + x
		s1 += 1
print(x)


s = input()
l = len(s)
a = [' ' for i in range(l)]
i = 0
j = 0
if l % 2 == 0:
	i = l // 2 - 1
	a[j] = s[i]
	a[j + 1] = s[i + 1]
	i += 2
	j += 2
	while i < l and j < l - 1:
		a[j + 1] = s[i]
		a[j] = s[l - 1 - i]
		i += 1
		j += 2
else:
	i = l // 2
	a[j] = s[i]
	i += 1
	j += 1
	while i < l and j < l - 1:
		a[j] = s[i]
		a[j + 1] = s[l - 1 - i]
		i += 1
		j += 2
print(''.join(a))


n = int(input())
string = input()
str1 = ''
str1 += string[0]
k = 2
p = 3
while p <= n:
	str1 += string[p - 1]
	k += 1
	p = k * (k + 1) // 2
print(str1)


input()
line = input()
sm = 0
res = ''
for i in range(1, 12):
	if sm >= len(line):
		break
	res += line[sm]
	sm += i
print(res)


n = int(input())
s = input()
i = 0
sa = ''
nd = 1
while i < n:
	sa = sa + s[i]
	i = i + nd
	nd += 1
print(sa)


h = int(input())
a = input()
i = 0
c = 1
s = ''
while i < h:
	s += a[i]
	i += c
	c += 1
print(s)


a = input()
ans = ''
if len(a) % 2 == 0:
	l = len(a) // 2 - 1
	ans += a[l]
	for i in range(1, l + 1):
		ans += a[l + i]
		ans += a[l - i]
	ans += a[len(a) - 1]
else:
	l = len(a) // 2
	ans += a[l]
	for i in range(1, l + 1):
		ans += a[l + i]
		ans += a[l - i]
print(ans)


input()
l = list(input())
i = 0
j = 0
while j <= len(l) - 1:
	i += 1
	print(l[j], end='')
	j += i


s = input()
i = len(s) // 2 - (len(s) % 2 == 0)
cur = 0
result = s[i]
for _ in range(len(s) // 2):
	cur += 1
	result += s[i + cur] + s[i - cur]
print(result if len(s) % 2 != 0 else result[:-1])


n = int(input())
s = input()
d = {}
for y in range(1, 56):
	d[sum([x for x in range(1, y + 1)])] = y
length_r = d[n]
r = ''
for i in range(1, length_r + 1):
	for k in range(i):
		if k == 0:
			r = r + s[i - 1]
			s = s[i - 1:]
			break
print(r)


n = int(input())
s = input()
i = 0
cnt = 1
li = []
while i < n:
	li.append(s[i])
	i += cnt
	cnt += 1
print(''.join([str(_) for _ in li]))


n = int(input())
s = input()
a = 0
b = 1
while 1:
	if a < len(s):
		print(s[a], end='')
		a += b
		b += 1
	else:
		break


from math import ceil as c
l = list(input())
l1 = []
for i in range(c(len(l) / 2)):
	if len(l) % 2:
		if i == c(len(l) / 2) - 1:
			l1.append(l[i])
		else:
			l1.append(l[i])
			l1.append(l[len(l) - 1 - i])
	else:
		l1.append(l[len(l) - 1 - i])
		l1.append(l[i])
print(''.join(l1[::-1]))


t = input()
s = [c for c in t]
l = len(t)
d = (l >> 1) + (l & 1)
k = -1
for i in range(l):
	d += k * i
	s[i] = t[d - 1]
	k = -k
print(''.join(s))


n = int(input())
x = input()
positionat = 0
space = 1
while positionat < n:
	print(x[positionat], end='')
	positionat = positionat + space
	space = space + 1


arr = list(input())
fl = True
if len(arr) & 1:
	fl = False
out = ''
while len(arr):
	if fl:
		out = arr[-1] + out
		arr.pop(len(arr) - 1)
	else:
		out = arr[0] + out
		arr.pop(0)
	fl = not fl
print(out)


n = int(input())
s = input()
res = ''
d = 1
while s:
	res += s[0]
	s = s[d:]
	d += 1
print(res)


n = int(input())
a = input()
i = 1
while i * (i + 1) / 2 <= n:
	print(a[int(i * (i + 1) / 2 - 1)], end='')
	i += 1


n = eval(input())
cipher = input()
res = ''
cursor = 0
jump = 1
while cursor < n:
	res += cipher[cursor]
	cursor += jump
	jump += 1
print(res)


def read_nums():
	return [int(x) for x in input().split()]

def main():
	(n,) = read_nums()
	cipher = input()
	i = 0
	d = 1
	res = ''
	while i < n:
		res += cipher[i]
		i += d
		d += 1
	print(res)

def __starting_point():
	main()
__starting_point()


n = int(input())
s = input()
e = []
p = 1
j = 0
while j < n:
	e.append(s[j])
	j += p
	p += 1
st = ''.join(e)
print(st)


n = int(input())
s = input()
k = 0
i = 1
c = ''
while k < len(s):
	c += s[k]
	k += i
	i += 1
print(c)


from collections import deque

def main():
	s = deque(input())
	res = []
	for i in range(len(s) - 1, -1, -1):
		if i % 2 == 1:
			res.append(s.pop())
		else:
			res.append(s.popleft())
	print(''.join(res[::-1]))
main()


n = int(input())
s = input()
a = len(s)
i = 1
t = 0
p = ''
while t < a:
	p = p + s[t]
	t = t + i
	i = i + 1
print(p)


str_len = int(input())
str = input()
step = 0
i = 0
new_str = ''
while i < str_len:
	step += 1
	i += step
	new_str += str[i - 1]
print(new_str)


n = int(input())
s = input()
c = 1
res = str()
while len(s):
	res += s[0]
	s = s[c:]
	c += 1
print(res)


b = int(input())
s = input()
pos = 0
add = 1
result = ''
while pos < len(s):
	result += s[pos]
	pos += add
	add += 1
print(result)


s = input()
l = len(s)
le = int(l / 2)
k = ''
k = str(k)
if l % 2 == 0:
	for i in range(le):
		k = s[i] + s[l - i - 1] + k
else:
	for i in range(le):
		k = s[l - i - 1] + s[i] + k
	k = s[le] + k
print(k)


a = input()
n = len(a)
str = ''
for i in range(n - 1, -1, -1):
	change = int((n - 1 - i) / 2)
	if i % 2:
		str = a[-1 - change] + str
	else:
		str = a[0 + change] + str
print(str)


from math import ceil
s = list(input())
l = ''
if len(s) % 2 != 0:
	a = 0
	b = len(s) - 1
	i = 0
	while 1:
		if i % 2 == 0:
			l = s[a] + l
			a += 1
		else:
			l = s[b] + l
			b -= 1
		if a > b:
			break
		i += 1
else:
	a = 0
	b = len(s) - 1
	i = 0
	while 1:
		if i % 2 == 0:
			l = s[b] + l
			b -= 1
		else:
			l = s[a] + l
			a += 1
		if b < a:
			break
		i += 1
print(l)


s = input()
l = len(s)
if l % 2:
	s = list(reversed(s))
res = []
for i in range(l // 2):
	res.append(s[l - i - 1])
	res.append(s[i])
if l % 2:
	res.append(s[l // 2])
print(*reversed(res), sep='')


s = input()
decoded = ''
x = (len(s) - 1) // 2
y = x - 1
decoded += s[x]
x += 1
for i in range(x, len(s)):
	decoded += s[i]
	if y > -1:
		decoded += s[y]
		y -= 1
print(decoded)


x = input()
y = list(x)
z = []
i = int(len(y) / 2 - 1)
j = i + 1
if len(y) % 2 == 0:
	while i >= 0:
		z.append(x[i])
		z.append(x[j])
		i = i - 1
		j = j + 1
else:
	i = int(len(y) / 2)
	j = i
	while i >= 0:
		if i == j:
			z.append(x[i])
			i = i - 1
			j = j + 1
		else:
			z.append(x[j])
			z.append(x[i])
			i = i - 1
			j = j + 1
g = ''.join(z)
print(g)


input()
s = input()
ans = ''
for i in [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]:
	if i < len(s):
		ans += s[i]
print(ans)


from sys import stdin, stdout
inp = stdin.readline
out = stdout.write
n = int(inp().strip())
s = inp().strip()
res = ''
res += s[0]
i = 0
while i + len(res) < n:
	res += s[i + len(res)]
	i = i + len(res)
print(res)


n = int(input())
s = input()
k = 0
z = str()
for i in range(1, n + 1):
	k = k + i
	if k <= len(s):
		z = z + s[k - 1]
print(z)


n = int(input())
t = input()
i = 0
p = ''
l = 2
while i <= n:
	p += t[i]
	i = i + l
	l += 1
print(p)


n = int(input())
s = str(input())
i = 0
k = 0
ls = []
count = 1
while i < n:
	if k == 0:
		ls.append(s[i])
	k += 1
	if k == count:
		k = 0
		count += 1
	i += 1
for x in ls:
	print(x, end='')


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

class PriorityQueue:

	def __init__(self, l=[]):
		self.q = l
		heapq.heapify(self.q)
		return

	def push(self, n):
		heapq.heappush(self.q, n)
		return

	def pop(self):
		return heapq.heappop(self.q)

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def main():
	T = Scanner.int()
	S = Scanner.string()
	n = 0
	i = 1
	ans = ''
	while n < T:
		ans += S[n]
		n += i
		i += 1
	print(ans)
main()


def index(i, m):
	l = []
	for k in range(0, m):
		l.append(k)
	if i == 0:
		return 0
	else:
		return index(i - 1, m) + l[i]
n = int(input(''))
s = input('')
l = []
output = ''
for i in range(0, n):
	j = index(i, n)
	l.append(j)
for k in range(0, n):
	if l[k] < n:
		p = s[l[k]]
	else:
		break
	output = output + p
print(output)


j = ''.join
a = input()
d = 0 - -len(a) // 2
a += ' '
print(j(map(j, zip(a[d - 1::-1], a[d:]))))


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N,) = getIntList()
s = input()
k = 0
r = ''
for i in range(1, 100000):
	if k >= N:
		break
	r += s[k]
	k += i
print(r)


n = int(input())
mass = [i + 1 for i in range(n)]
s = input()
for i in range(1, n + 1):
	if sum(mass[:i]) > n:
		break
	else:
		print(s[sum(mass[:i]) - 1], end='')


a = int(input())
string = input()
pos = 0
count = 1
while pos < a:
	print(string[pos], end='')
	pos += count
	count = count + 1


n = int(input())
tt = input()
s = ''
i = j = 0
while i < n:
	s += tt[i]
	j += 1
	i += j
print(s)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	s = S()
	i = -1
	c = 1
	ans = ''
	while True:
		i += c
		c += 1
		if i > n:
			return ans
		ans += s[i]
print(main())


t = int(input())
s = input()
if t == 1:
	print(s)
elif t == 3:
	print(s[0] + s[1], sep='')
elif t == 6:
	print(s[0] + s[1] + s[3], sep='')
elif t == 10:
	print(s[0] + s[1] + s[3] + s[6], sep='')
elif t == 15:
	print(s[0] + s[1] + s[3] + s[6] + s[10], sep='')
elif t == 21:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15], sep='')
elif t == 28:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21], sep='')
elif t == 36:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21] + s[28], sep='')
elif t == 45:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21] + s[28] + s[36], sep='')
elif t == 55:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21] + s[28] + s[36] + s[45], sep='')


L = int(input())
string = input()
decrypted_string = ''
i = 2
while sum(range(i)) <= L:
	decrypted_string += string[sum(range(i)) - 1]
	i += 1
print(decrypted_string)


n = int(input())
s = input()
s = list(s)
i = 0
d = 2
while i < n:
	print(s[i], end='')
	i += d
	d += 1


import sys
n = int(sys.stdin.readline().strip())
t = sys.stdin.readline().strip()
i = 0
j = 1
s = ''
while i < n:
	s = s + t[i]
	i = i + j
	j = j + 1
print(s)


x = int(input())
y = input()
a = 0
b = 0
c = 0
z = []
while x > 0:
	a += 1
	x -= a
for i in range(a):
	z.append(c)
	b += 1
	c += b
for i in z:
	print(y[i], end='')


import sys

def solve(io):
	N = io.read_int()
	S = io.read_line()
	p = 0
	step = 1
	sb = []
	while p < N:
		sb.append(S[p])
		p += step
		step += 1
	io.println(''.join(sb))

class IO:
	in_stream = None
	out_stream = None
	raw = ''
	buf = []
	pos = 0

	def __init__(self, input_stream, output_stream):
		self.in_stream = input_stream
		self.out_stream = output_stream

	def read_to_buffer(self):
		self.raw = self.in_stream.readline().rstrip('\n')
		self.buf = self.raw.split()
		self.pos = 0

	def read_string(self):
		while self.pos == len(self.buf):
			self.read_to_buffer()
		ans = self.buf[self.pos]
		self.pos += 1
		return ans

	def read_int(self):
		return int(self.read_string())

	def read_float(self):
		return float(self.read_string())

	def read_string_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_string())
		return arr

	def read_int_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_int())
		return arr

	def read_float_array(self, N, offset=0):
		arr = [None] * offset
		for _ in range(0, N):
			arr.append(self.read_float())
		return arr

	def read_line(self):
		while self.pos == len(self.buf):
			self.read_to_buffer()
		if self.pos > 0:
			raise ValueError('Cannot call read_line in the middle of a line.')
		self.pos = len(self.buf)
		return self.raw

	def print(self, *args):
		self.out_stream.write(' '.join([str(x) for x in args]))

	def println(self, *args):
		self.print(*args)
		self.print('\n')

	def println_array(self, arr, sep=' '):
		self.println(sep.join((str(x) for x in arr)))

	def flush_output(self):
		self.out_stream.flush()
pythonIO = IO(sys.stdin, sys.stdout)
solve(pythonIO)
pythonIO.flush_output()


n = input()
flag = 1
ans = ''
if len(n) % 2 == 0:
	while n:
		if flag == 1:
			ans = n[-1] + ans
			n = n[:-1]
			flag = 0
		else:
			ans = n[0] + ans
			n = n[1:]
			flag = 1
else:
	flag = 0
	while n:
		if flag == 1:
			ans = n[-1] + ans
			n = n[:-1]
			flag = 0
		else:
			ans = n[0] + ans
			n = n[1:]
			flag = 1
print(ans)


n = int(input())
st = input()
(l, ll) = ([], [])
s = 0
for i in range(n):
	s = s + i
	if s > n - 1:
		break
	l.append(st[s])
lst = ''.join(map(str, l))
print(lst)


n = int(input())
t = input()
list_n = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
word = []
c = list_n.index(n) + 1
for i in range(c):
	index = list_n[i] - 1
	word.append(t[index])
print(''.join(word))


n = int(input())
str = input()
newList = []
j = 1
k = 0
newList.append(str[0])
for i in range(0, n):
	k = k + j
	if k >= n:
		break
	newList.append(str[k])
	j = j + 1
newStr = ''.join(newList)
print(newStr)


n = int(input())
s = list(map(str, input().split()))
a = []
for i in range(len(s)):
	j = 0
	count = 0
	while j < len(s[i]):
		a.append(s[i][j])
		count += 1
		j += count
print(''.join(map(str, a)))


l = int(input())
s = input()
j = 0
i = 1
f = ''
while j < l:
	f += s[j]
	j += i
	i += 1
print(f)


a = input()
lenn = len(a)
res = ''
if lenn % 2 != 0:
	i = 0
	while len(res) < lenn:
		if i % 2 == 0:
			res += a[i // 2]
		else:
			res += a[lenn - 1 - i // 2]
		i += 1
	res = res[::-1]
	print(res)
else:
	i = 0
	while len(res) < lenn:
		if i % 2 == 0:
			res += a[lenn - 1 - i // 2]
		else:
			res += a[i // 2]
		i += 1
	res = res[::-1]
	print(res)


from sys import stdout
input()
s = 0
l = []
for i in range(1, 11):
	s += i
	l.append(s - 1)
s = input()
for i in l:
	if len(s) <= i:
		break
	stdout.write(s[i])
print()


n = int(input())
s = input()
index = 0
ans = []
for i in range(1, n + 1):
	if index < n:
		ans.append(s[index])
		index += i
print(*ans, sep='')


n = int(input())
ch = input()
a = ''
i = 0
j = 1
while i < len(ch):
	a += ch[i]
	i += j
	j += 1
print(a)


t = input()
num = len(t)
a = ''
for i in range(num):
	if not num % 2:
		a = t[-1] + a
		t = t[0:-1]
	else:
		a = t[0] + a
		t = t[1:]
	num -= 1
print(a)


len = int(input())
l = list(input())
j = 0
i = 0
st = ''
while len:
	if i < len:
		st = st + l[i]
	j = j + 1
	i = i + j
	len -= 1
print(st)


s = input()
str = len(s)
if str % 2 == 0:
	s1 = s[str // 2 - 1::-1]
	s2 = s[str // 2:]
else:
	s1 = s[str // 2::-1]
	s2 = s[str // 2 + 1:]
res = ''
for i in range(str // 2):
	res += s1[i] + s2[i]
if str % 2 != 0:
	res += s1[str // 2:]
print(res)


a = int(input())
b = input()
(c, d) = (1, 1)
st = ''
while c <= a:
	st += b[c - 1]
	c += d
	d += 1
print(st)


n = int(input())
counter = 1
co = 1
s = input()
ss = ''
for i in s:
	if co == counter:
		ss += i
		co = 1
		counter += 1
	else:
		co += 1
print(ss)


n = int(input())
s = input()
l = len(s)
j = 1
i = 0
while i < n:
	print(s[i], end='')
	i = i + j
	j += 1


from math import ceil
t = input()
n = ceil(len(t) / 2) - 1
s = ''
for i in range(1, len(t) + 1):
	s += t[i // 2 * (-1) ** i + n]
print(s)


cipher = input()
c = len(cipher)
piv = 0
piv2 = c - 1
txt = ''
if c % 2 == 0:
	while piv < piv2:
		txt = cipher[piv] + cipher[piv2] + txt
		piv += 1
		piv2 -= 1
else:
	while piv < piv2:
		txt = cipher[piv2] + cipher[piv] + txt
		piv += 1
		piv2 -= 1
	txt = cipher[piv] + txt
print(txt)


n = int(input())
s = input()
a = ''
c = 1
i = 1
while c <= len(s):
	a += s[c - 1]
	i += 1
	c = i * (i + 1) // 2
print(a)


s = input()
res = ''
if len(s) % 2 == 0:
	l = len(s) // 2
	res += s[l - 1]
	j = l - 2
else:
	l = len(s) // 2 + 1
	res += s[l - 1]
	j = l - 2
for i in range(len(s) // 2):
	res += s[l]
	l += 1
	if j == -1:
		break
	res += s[j]
	j -= 1
	if l == len(s):
		break
print(res)


def right_left(mystr):
	lm = list(mystr)
	mid = len(lm) // 2
	if len(lm) % 2 == 0:
		mid = mid - 1
		print(lm[mid], end='')
		(i, j) = (mid - 1, mid + 1)
		c = 0
		while c < mid:
			print(lm[j], end='')
			print(lm[i], end='')
			i -= 1
			j += 1
			c += 1
		print(lm[j], end='')
	else:
		print(lm[mid], end='')
		(i, j) = (mid - 1, mid + 1)
		c = 0
		while c < mid:
			print(lm[j], end='')
			print(lm[i], end='')
			i -= 1
			j += 1
			c += 1
right_left(str(input()))


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
n = ii()
s = input().strip()
r = []
c = 0
for i in range(10 ** 9):
	c += i
	if c >= len(s):
		break
	r.append(s[c])
print(''.join(r))


n = int(input())
s = input()
s1 = ''
i = 0
j = 1
while n > i:
	s1 += s[i]
	i += j
	j += 1
print(s1)


n = int(input())
s = input()
i = 0
j = 2
while i < n:
	print(s[i], end='')
	i += j
	j += 1


t = int(input())
s = input()
lst = list()
our_list = list()
for i in range(t):
	lst.append(s[i])
for j in range(t // 2 + 1):
	our_list.append(lst[0])
	del lst[:j + 1]
	if lst == []:
		break
string = ''.join(our_list)
print(string)


a = int(input())
list1 = list(input())
j = 1
i = 0
list2 = []
while True:
	list2.append(list1[0])
	i = i + 1
	if len(list1) == i:
		break
	else:
		list1 = list1[i:]
s = ''.join(list2)
print(s)


n = int(input())
s = input()
root = 1
for i in range(0, n):
	if i * (i + 1) == 2 * n:
		root = i
		break
result = ''
index = 0
adding = 1
for i in range(0, root):
	result += s[index]
	index += adding
	adding += 1
print(result)


t = input()
l = len(t)
arr = {a: [(l + 1) // 2 - a // 2 - 1, (l + 1) // 2 + a // 2][a % 2] for a in range(l)}
print(''.join(map(lambda a: t[arr[a]], range(l))))


n = int(input())
s = input()
a = -0.5 + (1 + 8 * n) ** 0.5 / 2
b = int(a)
m = ''
for i in range(b):
	q = int(i * (i + 1) / 2)
	m += s[q]
print(m)


l = int(input())
s = input()
w = ''
c = 1
p = 0
while p < l:
	w += s[p]
	c += 1
	p += c
print(w)


import math
n = int(input())
st = input()
val = st[0]
mul = 1
k = 1
n = n - 1
while n > 1:
	n = n - (k + 1)
	mul = mul + (k + 1)
	val += st[mul - 1]
	k += 1
print(val)


g = 1
a = 2
n = int(input())
t = input()
s = ''
while g <= n:
	s += t[g - 1]
	g += a
	a += 1
print(s)


n = input()
a = '0' * len(n)
b = len(n) // 2 + len(n) % 2
k = 0
for i in range(len(n)):
	a = list(a)
	if i % 2 == 0:
		a[i] = n[b - k - 1]
		k += 1
	else:
		a[i] = n[b + k - 1]
a = ''.join(a)
print(a)


s = input()
n = len(s)
k = 1
a = ''
if n % 2 == 0:
	while s != '':
		if k % 2 == 1:
			a += s[-1]
			s = s[:-1]
		else:
			a += s[0]
			s = s[1:]
		k += 1
else:
	while s != '':
		if k % 2 == 0:
			a += s[-1]
			s = s[:-1]
		else:
			a += s[0]
			s = s[1:]
		k += 1
for i in range(n - 1, -1, -1):
	print(a[i], end='')


n = int(input())
a = input()
(ans, t) = ('', 0)
for i in range(1, 11):
	b = i * (i + 1) // 2
	ans += a[t:b][0]
	t = b
	if b >= n:
		break
print(ans)


n = int(input())
k = input()
a = []
i = 0
j = 1
while i < n:
	a.append(k[i])
	i += j
	j += 1
for i in a:
	print(i, end='')


import math
n = int(input())
s = input()
l = int((-1 + math.sqrt(1 + 8 * n)) / 2)
res = ''
pos = 0
for i in range(l):
	pos += i
	res += s[pos]
print(res)


n = int(input())
a = input()
k = 1
r = 1
while k <= n:
	print(a[k - 1], end='')
	k += r
	r += 1


v = int(input())
df = input()
(i, d) = (0, 1)
s = ''
while i < v:
	s = s + df[i]
	i = i + d
	d = d + 1
print(s)


def func(a):
	if len(a) % 2 == 0:
		x = a[len(a) - 1]
		del a[len(a) - 1]
		return x
	else:
		x = a[0]
		del a[0]
		return x
x = list(input())
z = []
for i in range(len(x)):
	z.append(func(x))
z.reverse()
for i in z:
	print(i, end='')


n = int(input())
input = input()
output = ''
i = 0
index = 0
while index < n:
	output += input[index]
	i += 1
	index += i
print(output)


size = int(input())
t = input()
s = ''
j = 0
i = 1
while i + j <= size:
	s += t[j]
	j += i
	i += 1
print(s)


s = input()
l = len(s) - 1
c = l // 2
t = s[c]
for i in range(1, l // 2 + 1):
	t += s[c + i]
	t += s[c - i]
if l % 2 == 1:
	t += s[-1]
print(t)


def RepaetCipher(x, y):
	s = ''
	i = 1
	j = 1
	while i <= y:
		s += x[i - 1]
		i = i + j
		j += 1
	return s
y = int(input())
x = input()
print(RepaetCipher(x, y))


a = int(input())
b = str(input())
k = 1
c = []
i = 0
while i < a:
	i = i + k
	k = k + 1
	c.append(b[i - 1])
print(*c, sep='')


l = int(input())
t = input()
ptr = 0
st = ''
counter = 0
while ptr < l:
	st += t[ptr]
	counter += 1
	ptr = counter + ptr
print(st)


n = int(input())
s = input()
inc = 0
i = 1
ans = []
while inc < n:
	ans.append(s[inc:inc + i])
	inc = i + inc
	i += 1
str = ''
for i in ans:
	str += i[0]
print(str)


n = int(input())
s = input()
ss = ''
x = 1
cnt = 2
while x <= n:
	ss += s[x - 1]
	x += cnt
	cnt += 1
print(ss)


__author__ = '#miner'
(a, b, i, sum) = (int(input()), input(), 0, 0)
while sum < len(b):
	print(b[sum], end='')
	i += 1
	sum += i


n = int(input().strip())
s = input()
counter = 0
index = 2
while counter < n:
	print(s[counter], end='')
	counter += index
	index += 1


n = int(input())
s = input()
t = ''
ls = 0
ts = 0
for c in s:
	if ts == 0:
		t += c
		ts = ls + 1
		ls += 1
	else:
		ts -= 1
print(t)


def decipher(num, word):
	deciphered = ''
	real_index = 0
	while real_index < num:
		deciphered += word[real_index]
		real_index += len(deciphered)
	return deciphered
print(decipher(int(input()), input()))


n = int(input())
s = input()
res = []
i = 0
ctr = 0
while i < n:
	res.append(s[i])
	ctr += 1
	i += ctr
sr = ''
for i in range(len(res)):
	sr += res[i]
print(sr)


N = int(input())
str = input()
result = []
idx = 0
cur = 0
while cur < N:
	result.append(str[cur])
	idx += 1
	cur += idx
print(*result, sep='')


n = int(input())
s = input()
ans = ''
i = 0
diff = 1
while i < n:
	ans += s[i]
	i += diff
	diff = diff + 1
print(ans)


s = input()
L = len(s)
ans = ''
if L % 2 == 1:
	s = s[::-1]
for i in range(len(s) // 2):
	ans += f'{s[L - i - 1]}{s[i]}'
if L % 2 == 1:
	ans += s[L // 2]
print(ans[::-1])


n = int(input())
t = input()
i = 0
j = 1
while i < n:
	print(t[i], end='')
	i += j
	j += 1


a = list(input())
res = []
if len(a) % 2 == 0:
	check = False
	x = len(a) - 1
	k = 0
	k1 = len(a) - 1
	for i in range(len(a)):
		if check == True:
			x = k
			k += 1
			check = False
		else:
			x = k1
			k1 -= 1
			check = True
		res.append(a[x])
	res.reverse()
	print(''.join(res))
else:
	check = False
	k = len(a) - 1
	x = -1
	x1 = -1
	for i in range(len(a)):
		if check == True:
			x = k
			k -= 1
			check = False
		else:
			x = x1 + 1
			x1 += 1
			check = True
		res.append(a[x])
	res.reverse()
	print(''.join(res))


x = int(input())
s = input()
s1 = ''
k = 0
for i in range(0, x):
	if k + i >= x:
		break
	else:
		k = k + i
		s1 = s1 + s[k]
print(s1)


N = input()
S = input()
res = ''
i = 0
x = 1
while i < len(S):
	res += S[i]
	i += x
	x += 1
print(res)


n = int(input())
string = input()
start = 0
end = 1
i = 1
li = []
while end <= n:
	li.append(string[start])
	i = i + 1
	start = end
	end += i
print(''.join(li))


n = int(input())
st = input()
s = 0
i = 0
t = 0
while t <= n - 1:
	i += 1
	t = t + i
	print(st[t - 1], end='')


n = int(input())
s = input()
m = ''
i = 0
k = 1
while True:
	if i == n:
		break
	else:
		m = m + s[i]
	i = i + k
	k = k + 1
print(m)


def solve(s):
	ans = ''
	i = 1
	while s:
		ans += s[0:i][0]
		s = s[i + 1:]
		i += 1
	return ans

def main():
	n = int(input())
	s = input()
	print(solve(s))
main()


import time

def decryptCipher(cipherStr, lenStr):
	decodedStr = ''
	pos = 0
	for inx in range(0, lenStr):
		if inx + pos < lenStr:
			pos += inx
			decodedStr += cipherStr[pos]
	return decodedStr

def solve():
	lenStr = int(input())
	cipherStr = input()
	print(decryptCipher(cipherStr, lenStr))
solve()


_ = input()
s = input()
res = ''
k = 0
i = 0
while k < len(s):
	res += s[k]
	i += 1
	k += i
print(res)


t = int(input())
r = input()
index = 0
string = ''
n = (pow(1 + 8 * t, 0.5) - 1) // 2
n = int(n)
for i in range(1, n + 1):
	string += r[index]
	index += i
print(string)


n = int(input())
s = input()
i = 0
k = 2
res = ''
while i <= n:
	res += s[i]
	i += k
	k += 1
print(res)


from collections import deque
import math

def main():
	n = int(input())
	t = input().strip()
	s_list = deque()
	for i in range(round(math.sqrt(2 * n + 1 / 4) - 1 / 2)):
		s_list.append(t[i * (i + 1) // 2])
	print(''.join(s_list))
main()


x = int(input())
y = list(map(str, input()))
i = 0
a = 1
while i < x:
	print(y[i], end='')
	i = i + a
	a += 1


n = int(input())
s = input()
(index, steps) = (0, 1)
while index < n:
	print(s[index], end='')
	steps += 1
	index += steps


n = int(input())
s = input()
ans = []
for k in range(1, n + 1):
	t = (k - 1) * k // 2
	if t <= n - 1:
		ans.append(s[t])
	else:
		break
for i in range(len(ans)):
	print(ans[i], end='')
print()


k = int(input())
p = input()
i = 0
a = 1
s = ''
while i < len(p):
	s += p[i]
	i += a
	a += 1
print(s)


from math import ceil
t = input()
a = str('')
if len(t) % 2 == 0:
	while t != '':
		a = a + t[ceil(len(t) / 2) - 1]
		t = t[:ceil(len(t) / 2) - 1] + t[ceil(len(t) / 2):]
	print(a)
if len(t) % 2 != 0:
	while t != '':
		a = a + t[int(len(t) / 2)]
		t = t[:int(len(t) / 2)] + t[int(len(t) / 2) + 1:]
	print(a)


s = input()
n = len(s)
if n > 2:
	mid = (n - 1) // 2
	print(s[mid], end='')
	r = mid + 1
	l = mid - 1
	c = 1
	while l >= 0 or r < n:
		c += 1
		if c % 2 == 0:
			print(s[r], end='')
			r += 1
		else:
			print(s[l], end='')
			l -= 1
else:
	print(s)


s = str(input())
sn = ''
l = len(s)
if l % 2:
	sn = s[0] + sn
	for i in range(1, l // 2 + 1):
		sn = s[-i] + sn
		sn = s[i] + sn
else:
	for i in range(l // 2):
		sn = s[-i - 1] + sn
		sn = s[i] + sn
print(sn)


n = int(input())
a = input()
b = ''
i = 1
while i <= n:
	if i == 1 or i == 3 or i == 6 or (i == 10) or (i == 15) or (i == 21) or (i == 28) or (i == 36) or (i == 45) or (i == 55):
		b = b + a[i - 1]
	i += 1
print(b)


def decript(sums, n, s):
	if len(s) != 0:
		return s[0] + decript(sums + 1, n, s[sums:])
	else:
		return ''
n = input()
s = input()
print(decript(1, n, s))


t = int(input())
s = input()
h = list(map(str, s))
j = 1
k = 0
while k < t:
	print(h[k], end='')
	k = k + j
	j = j + 1


def clipher(s):
	res = [s[0]]
	for (i, e) in enumerate(s[1:]):
		if i % 2 == 0:
			res.append(e)
		else:
			res.insert(0, e)
	return res

def unclipher(s):
	res = [None] * len(s)
	indexes = clipher(list(range(len(s))))
	for (i, e) in enumerate(indexes):
		res[e] = s[i]
	return ''.join(res)

def test(s):
	assert unclipher(''.join(clipher(s))) == s
print(unclipher(input()))


n = int(input())
l = list(input())
i = 0
k = 0
while i <= len(l) - 1:
	k = k + 1
	print(l[i], end='')
	i = i + k


n = int(input())
ciphertext = input().strip()
res = []
i = 0
num_increments = 1
while i < n:
	res.append(ciphertext[i])
	i += num_increments
	num_increments += 1
print(''.join(res))


n = int(input())
s = input()
t = ''
i = 0
d = 1
while i < len(s):
	t += s[i]
	i += d
	d += 1
print(t)


s = input()
n = len(s)
if n % 2 == 1:
	k = n // 2
else:
	k = n // 2 - 1
t = s[k]
i = k + 1
j = k - 1
while len(t) < n:
	if i < n:
		t += s[i]
		i += 1
	if j >= 0:
		t += s[j]
		j -= 1
print(t)


def decode(t):
	m = (len(t) + 1) // 2
	m -= 1
	s = t[m]
	l = m - 1
	r = m + 1
	i = 0
	while i < len(t) - 1:
		if i % 2 == 0:
			s += t[r]
			r += 1
		else:
			s += t[l]
			l -= 1
		i += 1
	return s
t = input()
print(decode(t))


n = int(input())
s = input()
ans = ''
d = 1
i = 0
while i < n:
	ans += s[i]
	i += d
	d += 1
print(ans)


def solve():
	n = input()
	s = input()
	print(s[0], end='')
	i = 1
	c = 2
	while i < len(s):
		print(s[i], end='')
		i += c
		c += 1
solve()


inp1 = int(input())
inp2 = list(input())
num = 1
matrix = []
for x in range(inp1):
	num = num + x
	if num <= inp1:
		matrix.append(inp2[num - 1])
print(''.join(matrix))


n = int(input())
t = list(input())
i = 0
d = 0
ret = []
while i < len(t):
	if i == d:
		ret.append(t[i])
		d += len(ret)
	i += 1
print(''.join(ret))


s = str(input())
p = ''
if len(s) % 2 == 1:
	p = s[len(s) // 2]
	for i in range(1, len(s) // 2 + 1):
		p += s[len(s) // 2 + i] + s[len(s) // 2 - i]
else:
	p = s[len(s) // 2 - 1]
	for i in range(1, len(s) // 2):
		p += s[len(s) // 2 - 1 + i] + s[len(s) // 2 - 1 - i]
	p += s[len(s) - 1]
print(p)


shifr = input()
(c, i) = ((len(shifr) - 1) // 2, 0)
unshifr = shifr[c]
while True:
	if i > 0:
		i = -i
		if c + i < 0:
			break
	else:
		i = -i + 1
		if c + i == len(shifr):
			break
	unshifr += shifr[c + i]
print(unshifr)


n = int(input())
s = input()
s = ' ' + s
i = 1
p = 1
ans = ''
while i < n + 1:
	ans += s[i]
	i += p
	p += 1
print(ans)


s = input()
answ1 = []
answ2 = []
for i in range(len(s) // 2 + len(s) % 2):
	answ1.append(s[i])
for i in range(len(s) - 1, len(s) // 2 - (len(s) % 2 ^ 1), -1):
	answ2.append(s[i])
answ1.reverse()
answ2.reverse()
for i in range(len(s) // 2):
	print(answ1[i], answ2[i], sep='', end='')
if len(s) % 2:
	print(answ1[len(s) // 2])


n = int(input())
s = input()
l = []
i = 0
k = 2
while i < n:
	l.append(s[i])
	i = i + k
	k = k + 1
print(''.join(l))


n = int(input())
s = input()
i = 0
k = 2
rez = ''
while i < n:
	rez += s[i]
	i += k
	k += 1
print(rez)


import os
import sys
leng = int(input())
st = str(input())
res = ''
curr = 1
c = 1
while True:
	if curr == leng:
		break
	res = res + st[curr - 1]
	c = c + 1
	curr = curr + c
res = res + st[len(st) - 1]
print(res)


n = int(input())
s = input()
ans = ''
i = 0
sum = 1
while i < n:
	ans += s[i]
	i += sum
	sum += 1
print(ans)


a = int(input())
b = input()
c = ''
for i in range(a):
	if i == 0 or i == 1 or i == 3 or (i == 6) or (i == 10) or (i == 15) or (i == 21) or (i == 28) or (i == 36) or (i == 45):
		c += b[i]
print(c)


n = int(input())
inpStr = input()
ln = 0
kx = 0
while ln < len(inpStr):
	print(inpStr[ln + kx], sep='', end='')
	kx += 1
	ln += kx
print()


a = input()
if len(a) % 2 == 0:
	c = len(a) // 2 - 1
else:
	c = len(a) // 2
b = a[c]
t = 1
f = 1
for i in range(len(a) - 1):
	if (i + 1) % 2 == 0:
		b += a[c - t]
		t += 1
	else:
		b += a[c + f]
		f += 1
print(b)


n = int(input())
t = input()
i = 0
x = 1
suml = ''
while i < n:
	suml = suml + t[i]
	x = x + 1
	i = i + x
print(suml)


s = list(input())
if len(s) == 1:
	ans = s[0]
else:
	ans = ''
	s0 = len(s) // 2
	a = s[:s0 + 1 if len(s) % 2 == 1 else s0]
	a.reverse()
	b = s[s0 + 1 if len(s) % 2 == 1 else s0:]
	for i in range(len(s)):
		ans += a[i // 2] if i % 2 == 0 else b[i // 2]
print(ans)


def main():
	n = int(input())
	s = input()
	(i, j) = (0, 0)
	ss = ''
	while i < n:
		ss += s[i]
		j += 1
		i += j
	print(ss)
main()


n = int(input())
s = input()
i = 0
gap = 1
while i < n:
	print(s[i], end='')
	gap = gap + 1
	i = i + gap


n = int(input())
string = input()
i = 0
adder = 1
answer = ''
while i != n:
	answer += string[i]
	i += adder
	adder += 1
print(answer)


v = int(input())
q = list(input())
d = len(q)
w = 0
e = 1
while w != d:
	print(q[w], end='')
	w += e
	e += 1


a = input()
r = len(a)
if len(a) % 2 == 0:
	t = int(r / 2) - 1
	s = a[int(r / 2) - 1]
else:
	s = a[int(r / 2)]
	t = int(r / 2)
k = 1
l = 1
for i in range(r):
	if i == 0:
		continue
	elif i % 2 == 1:
		s = s + a[t + l]
	else:
		s = s + a[t - l]
		l = l + 1
print(s)


s = list(input())
t = ''
i = len(s) + 1
while len(s) != 0:
	t += s.pop(i % 2 * (len(s) - 1))
	i -= 1
print(t[::-1])


s = input()
ans = ''
first = (len(s) - 1) // 2
ans += s[first]
k = 1
for i in range((len(s) - 1) // 2):
	ans += s[first + k]
	ans += s[first - k]
	k += 1
if (len(s) - 1) % 2 == 1:
	ans += s[len(s) - 1]
print(ans)


n = int(input())
s = input()
o = str()
st = 0
for i in range(1, n + 1):
	o = o + s[st]
	st = st + i
	if st == n:
		break
print(o)


a = int(input())
m = input()
k = 0
i = -1
while k != a:
	i += 1
	print(m[k], end='')
	k += i + 1


s = input()
ans = ''
if len(s) % 2 == 0:
	h = len(s) // 2 - 1
	ans = s[h]
	x = h + 1
	y = h - 1
else:
	h = len(s) // 2
	ans = s[h]
	x = h + 1
	y = h - 1
for i in range(0, len(s) - 1):
	if i % 2 == 0:
		ans += s[x]
		x += 1
	else:
		ans += s[y]
		y -= 1
print(ans)


def mi():
	return map(int, input().split(' '))
input()
s = input()
ans = ''
count = 1
i = 0
while i < len(s):
	ans += s[i]
	i += count
	count += 1
print(ans)


n = int(input())
row = input()
result = ''
i = 0
for j in range(1, n + 1):
	slice_ = row[i:i + j]
	i = i + j
	if slice_:
		result += slice_[0]
print(result)


n = int(input())
stok = input()
z = 0
q = 1
otv = stok[0]
while n != 0:
	n -= q
	q += 1
	z += 1
k = 3
m = 2
for x in range(z - 1):
	otv += stok[k - 1]
	m += 1
	k += m
print(otv)


t = int(input())
s = input()
result = ''
count = 1
index = 0
while index < t:
	index += count
	result += s[index - 1]
	count += 1
print(result)


t = input()
res = ''
if len(t) % 2 == 0:
	e = len(t) - 1
	b = 0
	for i in range(len(t)):
		if i % 2 == 0:
			res = t[e] + res
			e -= 1
		else:
			res = t[b] + res
			b += 1
else:
	e = len(t) - 1
	b = 0
	for i in range(len(t)):
		if i % 2 == 1:
			res = t[e] + res
			e -= 1
		else:
			res = t[b] + res
			b += 1
print(res)


t = input()
n = len(t)
x = (n - 1) // 2
s = t[x]
for i in range(1, 2 + x):
	try:
		s += t[x + i]
	except BaseException:
		s += ''
	try:
		if x - i >= 0:
			s += t[x - i]
	except BaseException:
		s += ''
print(s)


n = int(input())
s = input()
step = 1
ind = 0
while ind < len(s):
	print(s[ind], end='')
	ind += step
	step += 1


n = input()
enc = input()
i = 0
k = 0
dec = ''
while i < len(enc):
	dec += enc[i]
	k += 1
	i += k
print(dec)


n = int(input())
a = list()
st = input()
s = 0
i = 1
while s < n:
	a.append(st[s])
	s += i
	i += 1
print(''.join(a))


n = int(input())
s = input()
ns = ''
k = 0
for i in range(0, len(s)):
	k += i
	if k >= len(s):
		break
	else:
		ns += s[k]
print(ns)


n = int(input())
s = input()
ans = ''
i = 1
while len(s) > 0:
	ans += s[0]
	s = s[i:]
	i += 1
print(ans)


n = int(input())
s = input()
pos = 0
step = 0
ans = ''
while pos < n:
	ans += s[pos]
	step += 1
	pos += step
print(ans)


s = input()
n = len(s)
if n % 2 == 0:
	st = n // 2 - 1
else:
	st = n // 2
otv = s[st]
for i in range(1, st + 1):
	otv += s[st + i]
	otv += s[st - i]
if (n - 1) % 2 != 0:
	otv += s[n - 1]
print(otv)


n = int(input())
code = input()
word = '' + code[0]
c = 1
step = 1
while c < n:
	word += code[c]
	step += 1
	c += step
print(word)


n = int(input())
a = input()
ans = ''
now = 0
dop = 1
while now <= n:
	ans += a[now]
	dop += 1
	now += dop
print(ans)


n = int(input())
s = input()
(i, p) = (0, 1)
while i <= n:
	print(s[i], end='')
	p = p + 1
	i = i + p


a = int(input())
s = input()
i = 0
k = ''
b = 1
while i < a:
	k += s[i]
	i = i + b
	b = b + 1
print(k)


n = int(input().strip())
t = input().strip()
i = 1
j = 0
res = []
while j < n:
	res += t[j]
	j += i
	i += 1
print(''.join(res))


s = list(input())
if len(s) < 3:
	print(*s, sep='')
else:
	if len(s) % 2 == 0:
		mid = len(s) // 2
	else:
		mid = len(s) // 2 + 1
	l1 = []
	l1.append(s[mid - 1])
	l2 = s[:mid - 1]
	l3 = s[mid:]
	a = 0
	for i in range(1, len(s) // 2):
		l1.append(l3[i - 1])
		l1.append(l2[-i])
		a += 1
	if a != len(l3):
		l1.append(l3[-1])
	if a != len(l2):
		l1.append(l2[0])
	print(*l1, sep='')


s = input()
n = len(s)
l = []
if n % 2 == 1:
	l.append(s[0])
	s = s[1:]
for i in range(n // 2):
	l.append(s[-i - 1])
	l.append(s[i])
print(''.join(l[::-1]))


n = int(input())
s = input()
i = 0
a = 1
while i < len(s):
	if i == 0:
		print(s[i], end='')
		i += a
		a += 1
		continue
	print(s[i], end='')
	i += a
	a += 1


y = int(input())
x = input('')
sum = 0
i = 0
for i in range(y):
	sum = sum + i
	if sum < y:
		print(x[sum], end='')
	else:
		break


def rval(typ=int):
	return typ(input().strip())

def solve():
	n = rval()
	s = rval(str)
	k = [0]
	a = ((1 + 8 * n) ** 0.5 - 1) / 2
	a = int(a)
	for j in range(1, a):
		k.append(j + k[j - 1])
	ans = ''
	for i in k:
		ans += s[i]
	print(ans)
solve()


length = int(input())
text = input()
i = 0
count = 0
s = ''
while i < length:
	s += text[i]
	count += 1
	i += count
print(s)


t = input()
n = len(t)

def solve_even(s):
	k = int(len(s) / 2)
	suma = ''
	for i in range(k):
		suma = s[0] + s[-1] + suma
		s = s[1:-1]
	return suma

def solve_odd(s):
	return solve_even(s[1:]) + s[0]
if n % 2 == 0:
	ans = solve_even(t)
else:
	ans = solve_odd(t)
print(ans)


n = int(input())
b = input()
s = ''
count = 1
for i in range(len(b)):
	if i == count - 1:
		s = s + b[i]
		count = count + len(s)
print(s)


n = int(input())
s = input()
l = []
c = 0
i = 1
h = ''
p = 0
while c < n:
	h += s[c]
	c += i
	i += 1
print(h)


(n, s) = (int(input()), list(input()))
(i, c) = (0, 1)
ans = ''
while i < n:
	ans += s[i]
	i += c
	c += 1
print(ans)


n = int(input())
str = input()
lst = []
(i, z) = (0, 1)
while i < n:
	lst.append(str[i])
	i += z
	z += 1
for j in lst:
	print(j, end='')


x = input()
i = 0
if len(x) < 3:
	exit(print(x))
a = x[(len(x) - 1) // 2:(len(x) - 1) // 2 + 2]
p = (len(x) - 1) // 2 - 1
q = (len(x) - 1) // 2 + 2
while 1 == 1:
	i += 1
	a = a + x[p]
	if i == len(x) - 2:
		break
	i += 1
	p -= 1
	a = a + x[q]
	q += 1
	if i == len(x) - 2:
		break
print(a)


n = int(input())
s = input()
l = []
k = 0
i = 0
if n == 1:
	print(s)
else:
	while k < n:
		print(s[k], end='')
		i += 1
		k = k + i


import math
a = int(input())
ciphered_string = input()
n = (-1 + math.sqrt(1 + 8 * a)) // 2
step = 1
deciphered_string = ''
while step <= n:
	deciphered_string += ciphered_string[step * (step + 1) // 2 - 1]
	step += 1
print(deciphered_string)


(j, n, a) = (0, int(input()), input())
for i in range(n):
	j += i
	if j < n:
		print(a[j], end='')


x = int(input())
l = [k for k in input()]
resultat = ''
i = 0
j = 1
while i < x:
	resultat = resultat + l[i]
	i = i + j
	j += 1
print(resultat)


n = int(input())
a = str(input())
s = ''
b = [0, 2, 5, 9, 14, 20, 27, 35, 44, 54]
for i in range(len(b)):
	if b[i] <= n:
		s += a[b[i]]
print(s)


s = input()
word = []
k = ''
if len(s) % 2 == 0:
	word.append(s[-1])
	s = s[0:len(s) - 1]
	for i in range(0, len(s) // 2):
		word.append(s[len(s) - i - 1] + s[i])
	word.append(s[len(s) // 2])
else:
	for i in range(0, len(s) // 2):
		word.append(s[len(s) - i - 1] + s[i])
	word.append(s[len(s) // 2])
for i in reversed(word):
	k += i
print(k)


n = int(input())
s = input()
a = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66]
b = ''
for i in range(n):
	if n == a[i]:
		break
	else:
		b += s[a[i]]
print(b)


n = int(input())
huruf = input()
hasil = ''
a = 2
b = 3
for i in range(1):
	hasil += huruf[i]
for i in range(2, n):
	hasil += huruf[a:b]
	a += i
	b += i
print(hasil)


s = list(input())
s1 = ''
n = len(s)
if n % 2 == 0:
	i = n // 2 - 1
	j = n // 2
	while i >= 0 and j < n:
		s1 += s[i] + s[j]
		i -= 1
		j += 1
	print(s1)
else:
	i = n // 2 - 1
	j = n // 2 + 1
	s1 += s[n // 2]
	while i >= 0 and j < n:
		s1 += s[j] + s[i]
		i -= 1
		j += 1
	print(s1)


a = input()
ans = ''
if len(a) % 2 == 0:
	i = 0
	while i < len(a) / 2:
		ans += a[-i - 1] + a[i]
		i += 1
	for i in range(len(ans) - 1, -1, -1):
		print(ans[i], end='')
else:
	i = 0
	while i < len(a) / 2:
		ans += a[i] + a[-i - 1]
		i += 1
	for i in range(len(ans) - 2, -1, -1):
		print(ans[i], end='')


N = int(input())
S = input()
p = ''
i = 0
f = 1
while i < N:
	p += S[i]
	i += f
	f += 1
print(p)


n = int(input())
s = input()
count = 0
counter = 1
ans = ''
while count < n:
	ans += s[count]
	count += counter
	counter += 1
print(ans)


n = int(input())
s = str(input())
ans = ''
j = 0
i = 0
while i < len(s):
	ans = ans + s[i]
	i = i + j + 1
	j = j + 1
print(ans)


def answer():
	n = int(input())
	a = input()
	i = 0
	place = 0
	ans = ''
	while place + i < len(a):
		place += i
		ans += a[place]
		i += 1
	return ans
print(answer())


n = int(input())
s = input()
result = []
no = 1
i = 0
ans = []
while i + no <= n:
	result.append(s[i:i + no])
	i = i + no
	no = no + 1
for s in result:
	ans.append(s[0:1])
print(''.join(ans))


n = int(input())
b = input()
i = 0
x = 1
while i < n:
	print(b[i], end='')
	i += x
	x += 1


input()
s = input()
(i, j) = (0, 0)
a = []
while i < len(s):
	a.append(s[i])
	j += 1
	i += j
print(''.join(a))


(n, origin, string) = (int(input()), input(), '')
for i in range(int((n * 2) ** 0.5)):
	string += origin[i * (i + 1) // 2]
print(string)


n = int(input())
s = input()
ret = str()
print(''.join([s[(1 + i) * i // 2] for i in range(n) if (1 + i) * i // 2 < n]))


x = int(input())
s = input()
(y, z) = (0, 1)
while y < x:
	print(s[y], end='')
	y += z
	z += 1


s = input()
ans = ''
l = 0
r = len(s) - 1
if len(s) % 2 == 0:
	while l + 1 != r:
		ans += s[r]
		ans += s[l]
		l += 1
		r -= 1
	ans += s[r]
	ans += s[l]
if len(s) % 2 != 0:
	while l != r:
		ans += s[l]
		ans += s[r]
		l += 1
		r -= 1
	ans += s[l]
print(ans[::-1])


n = int(input())
a = input()
b = 0
c = []
for i in range(n):
	b = b + i
	c.append(b)
for i in c:
	if i < n:
		print(a[i], end='')


n = input()
l = len(n)
m = l // 2
if l % 2 == 0:
	m -= 1
s = n[m]
p = r = 1
for i in range(l - 1):
	if i % 2 == 0:
		s += n[m + p]
		p += 1
	else:
		s += n[m - r]
		r += 1
print(s)


m = int(input())
x = input()
n = int((-1 + (1 + 8 * m) ** 0.5) / 2)
k = ''
for i in range(n):
	k += x[int((i ** 2 + i) / 2)]
print(k)


n = int(input())
t = input()
s = ''
k = (-1 + (1 + 8 * n) ** (1 / 2)) / 2
for i in range(int(k)):
	s = s + t[int(i * (i + 1) / 2)]
print(s)


s = list(input())
s1 = ''
if len(s) % 2 == 0:
	for i in range(len(s)):
		if i % 2 == 0:
			s1 = s.pop() + s1
		else:
			s1 = s.pop(0) + s1
else:
	for i in range(len(s)):
		if i % 2 == 0:
			s1 = s.pop(0) + s1
		else:
			s1 = s.pop() + s1
print(s1)


a = input()
b = ''
j = len(a) // 2
i = j - 1
if len(a) != 1:
	if len(a) % 2 != 0:
		j += 1
		i += 1
	while i >= 0:
		b += a[i] + a[j]
		i -= 1
		j += 1
		if j == len(a) and len(a) % 2 != 0:
			b += a[0]
			break
	print(b)
else:
	print(a)


(n, s) = (int(input()), input())
(k, r) = (0, 1)
while k < n:
	print(s[k], end='')
	k += r
	r += 1


n = int(input())
a = input()
i = 1
j = 1
while i < n + 1:
	print(a[i - 1], end='')
	i += j
	j += 1


word = input()
mass = list(word)
old_word = ''
new_word = ''
while len(mass) != 0:
	if len(word) % 2 == 0:
		letter = len(mass) / 2 - 0.7
		letter = round(letter)
		new_word = old_word + mass[letter]
		mass.pop(letter)
		old_word = new_word
	else:
		letter = len(mass) / 2 - 0.3
		letter = round(letter)
		new_word = old_word + mass[letter]
		mass.pop(letter)
		old_word = new_word
print(new_word)


t = list(input())
res = []
if len(t) % 2 == 1:
	t.reverse()
while t:
	res.append(t[-1])
	t.reverse()
	t = t[1:]
res.reverse()
print(''.join(res))


s = input()
n = len(s)
if n % 2 == 0:
	a = ''
	for i in range(n // 2):
		a += s[n // 2 - 1 - i] + s[n // 2 + i]
else:
	a = s[n // 2]
	for i in range(n // 2):
		a += s[n // 2 + 1 + i] + s[n // 2 - 1 - i]
print(a)


n = int(input())
s = str(input())
ix = 0
a = 1
while ix < n:
	print(s[ix], end='')
	a += 1
	ix += a


from sys import stdin

def decrypt(length, encrypted):
	length = int(length)
	key = list(range(1, 11))
	decrypted = ''
	for i in key:
		if length > 0:
			decrypted += encrypted[0]
			if len(encrypted) > i:
				encrypted = encrypted[i:]
			length -= i
	return decrypted
data = stdin.read()
data = data.split()
data = decrypt(data[0], data[1])
print(data)


n = int(input())
s = input()
res = ''
last = 0
for i in range(n):
	res = res + s[last + i]
	last = last + i + 1
	if last >= n:
		break
print(res)


import math
s = list(input())
f = math.ceil(len(s) / 2) - 1
ans = []
ans.append(s[int(f)])
for i in range(1, int(math.ceil(len(s) / 2))):
	ans.append(s[int(f + i)])
	ans.append(s[int(f - i)])
if len(s) % 2 == 0:
	ans.append(s[-1])
print(''.join(ans))


t = input()
ans = ''
while len(t) != 0:
	if len(t) % 2 == 0:
		ans = t[len(t) - 1] + ans
		t = t[:len(t) - 1]
	else:
		ans = t[0] + ans
		t = t[1:]
print(ans)


a = input()
st = input()
i = 0
s = ''
k = 0
while i < len(st):
	s += st[i]
	k += 1
	i += k
print(s)


value = 0
i = 1
ans = ''
length = int(input())
word = input()
while value < length:
	ans += word[value]
	value += i
	i += 1
print(ans)


s = input()
n = len(s)
ans = ['a'] * n
odd_start = (n - 1) // 2
i = odd_start
while i >= 0:
	ans[(odd_start - i) * 2] = s[i]
	i -= 1
even_start = (n + 1) // 2
j = even_start
while j < n:
	ans[(j - even_start) * 2 + 1] = s[j]
	j += 1
print(''.join(ans))


s = input()
(i, j) = (0, len(s) - 1)
O = []
if len(s) % 2 != 0:
	O.append(s[0])
	i += 1
while i < j:
	a = s[i]
	b = s[j]
	O.append(b)
	O.append(a)
	i += 1
	j -= 1
print(''.join(reversed(O)))


n = int(input())
s = list(input())
i = 0
s1 = []
count = 1
while i < n:
	s1.append(s[i])
	i += count
	count += 1
print(''.join(s1))


n = int(input())
t = input()
i = ii = 0
while n:
	n = n - ii - 1
	print(t[i], end='')
	i = i + ii + 1
	ii = ii + 1


(n, s) = (int(input()), input())
b = ''
(i, k) = (0, 1)
while i < len(s):
	b += s[i]
	i += k
	k += 1
print(b)


t = int(input())
s = input()
i = 0
j = 1
while i < t:
	print(s[i], end='')
	i += j
	j += 1


n = int(input())
t = input()
result = []
i = 0
delta = 1
while i < n:
	result.append(t[i])
	i += delta
	delta += 1
print(''.join(result))


n = int(input())
s = input()
s2 = list()
j = 0
for i in range(1, n + 1):
	j = j + i
	s2.append(s[j - 1])
	if j == n:
		break
print(''.join(s2))


n = int(input())
s = input()
a = 0
sum = []
if n == 1:
	print(s)
else:
	for i in range(n):
		sum.append(s[a])
		if a == len(s) - 1:
			for j in sum:
				print(j, end='')
			break
		a += i + 2


n = eval(input())
l = list(input())
i = 0
k = 2
while i < n:
	print(l[i], end='')
	i += k
	k += 1


n = int(input())
s = input()
c = 1
str1 = ''
i = 0
while i < len(s):
	str1 = str1 + s[i]
	i = i + c
	c = c + 1
print(str1)


import sys
n = int(input())
s = str(input())
c = 2
i = 0
while i < len(s):
	print(s[i], end='')
	i += c
	c += 1


import sys
import math
n = int(input())
bstr = str(input())
astr = list(bstr)
a = []
suma = 0
for i in range(n):
	suma += i
	if suma < n:
		a.append(suma)
sa = ''
for i in range(len(a)):
	sa += astr[a[i]]
print(sa)


n = input()
n = list(n)
nl = len(n)
ans = ''
if nl % 2 == 0:
	l = nl // 2 - 1
	r = nl // 2
	for i in range(nl // 2):
		ans += n[l]
		ans += n[r]
		l -= 1
		r += 1
else:
	ans += n[nl // 2]
	l = nl // 2 - 1
	r = nl // 2 + 1
	for i in range(nl // 2):
		ans += n[r]
		ans += n[l]
		l -= 1
		r += 1
print(ans)


import math as ma
n = int(input())
a = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
s = str(input())
ans = ''
for i in range(n):
	if i in a:
		ans += s[i]
print(ans)


s = input()
res = ''
s = list(s)
i = 0
if len(s) % 2 == 0:
	i = 0
	for i in range(len(s)):
		if i % 2 == 0:
			res = s[-1] + res
			s.pop()
		else:
			res = s[0] + res
			s.pop(0)
		i += 1
else:
	i = 0
	for i in range(len(s)):
		if i % 2 == 1:
			res = s[-1] + res
			s.pop()
		else:
			res = s[0] + res
			s.pop(0)
		i += 1
print(res)


n = int(input())
string = input()
k = 0
for i in range(n):
	print(string[k], end='')
	k += i + 1
	if k >= n:
		break


s = input()
l1 = len(s)
l = 0
if l1 % 2 == 0:
	l = l1 // 2 - 1
	z = ''
	z += s[l]
	i = 1
	while len(z) != l1:
		if len(z) < l1:
			z += s[l + i]
		if len(z) < l1:
			z += s[l - i]
		i += 1
	print(z)
else:
	l = l1 // 2
	z = ''
	z += s[l]
	i = 1
	while len(z) != l1:
		if len(z) < l1:
			z += s[l + i]
		if len(z) < l1:
			z += s[l - i]
		i += 1
	print(z)


n = int(input())
a = input()
b = ''
i = 0
j = 1
while i < n:
	b += a[i]
	i += j
	j += 1
print(b)


n = int(input())
string = input()
a = ''
k = 0
r = 1
while k < n:
	a = a + string[k]
	r = r + 1
	k = k + r
print(a)


n = int(input())
string1 = input()
k = 1
j = 0
count = 0
for i in range(1, n):
	if n > 0:
		count += 1
	n -= i
print(string1[0], end='')
for i in range(count):
	l = j + k
	j = l
	print(string1[j + k:j + k + 1], end='')
	k += 1


n = int(input())
s = list(input())
a = n
indi = 0
for i in range(11):
	a = a - (i + 1)
	if a == 0:
		indi = i + 1
		break
p = 0
for i in range(indi):
	print(s[p], end='')
	p = p + i + 1


n = int(input())
a = list(input())
for i in range(n):
	del a[i:2 * i]
s = ''.join(a)
print(s)


x = input()
lens = len(x)
if lens % 2 == 0:
	mid = lens // 2 - 1
else:
	mid = lens // 2
(mid1, mid2) = (0, 0)
mid1 += mid - 1
mid2 += mid + 1
st = x[mid]
for i in range(lens - 1):
	if i % 2 == 0:
		st += x[mid2]
		mid2 += 1
	else:
		st += x[mid1]
		mid1 -= 1
print(st)


n = int(input())
t = input()
A = [(i + 1) * i // 2 for i in range(1, 11)]
for i in range(10):
	if A[i] > n:
		break
	else:
		print(t[A[i] - 1], end='')


n = int(input())
l = input()
j = 1
i = 0
s = ''
while i < n:
	s += l[i]
	i += j
	j += 1
print(s)


word = input()
k = len(word) // 2
if 2 * k == len(word):
	k = k - 1
s1 = word[:k][::-1]
s2 = word[k + 1:]
(l, r) = (0, 0)
drow = word[k]
for i in range(1, len(word)):
	if i % 2 == 1:
		drow += s2[r]
		r += 1
	else:
		drow += s1[l]
		l += 1
print(drow)


n = int(input())
a = input()
k = 0
result = 0
b = []
while result + k != n:
	result = result + k
	b.append(a[result])
	k += 1
print(''.join(b))


s = str(input())
word = []
mid = len(s) // 2
left = s[:mid]
right = s[mid:]
if len(s) == 1:
	print(s)
elif len(s) % 2 == 0:
	for i in range(mid):
		word.append(left[len(left) - i - 1])
		word.append(right[i])
	for i in range(len(word)):
		print(word[i], end='')
else:
	word.append(s[mid])
	for i in range(mid):
		word.append(right[i + 1])
		word.append(left[len(left) - i - 1])
	for i in range(len(word)):
		print(word[i], end='')


n = int(input())
s = input()
sol = []
i = 0
j = 1
while i < n:
	sol.append(s[i])
	i += j + 1
	j += 1
temp = ''
for i in sol:
	temp = temp + i
print(temp)


t = input()
s = ''
n = len(t)
i = (n + 1) // 2 - 1
k = 1
s += t[i]
x = 1
while x != n:
	s += t[i + k]
	x += 1
	if x == n:
		break
	s += t[i - k]
	x += 1
	k += 1
print(s)


s = input()
ans = ''
n = len(s)
if n % 2 == 0:
	start = n // 2 - 1
else:
	start = n // 2
i = start
j = 1
ans += s[i]
while i != n - 1:
	if j % 2 == 1:
		i += j
	else:
		i -= j
	ans += s[i]
	j += 1
if n == 1:
	print(s)
elif n % 2 == 0:
	print(ans)
else:
	print(ans + s[0])


s = list(input())
x = ''
z = len(s) // 2
s1 = s[:z][::-1]
s2 = s[z:]
f = True
if len(s) % 2 == 1:
	s1 = s[:z + 1][::-1]
	s2 = s[z + 1:]
	f = False
i = 0
while len(x) < len(s):
	if f:
		x += s1[i]
		x += s2[i]
	elif i < len(s2):
		x += s1[i]
		x += s2[i]
	else:
		x += s1[i]
	i += 1
print(x)


n = int(input())
s = input()
p = 0
m = 1
result = ''
while p < n:
	result = result + s[p]
	p = p + m
	m = m + 1
print(result)


n = int(input())
s = input()
a = ''
for i in range(n):
	try:
		a += s[i]
		s = s[i:]
	except:
		break
print(a)


n = int(input())
str = input()
p = 0
i = 0
while i < n:
	print(str[i], end='')
	p += 1
	i += p


n = int(input())
s = input()
string = []
index = 0
step = 1
while step <= n:
	string.append(s[step - 1])
	index += 1
	step += index + 1
print(''.join(string))


s = str(input())
a = []
for i in range(0, len(s)):
	a += [s[i]]
if len(a) % 2 == 0:
	k = -1
else:
	k = 0
ans = ''
while len(a) > 0:
	ans += a[k]
	del a[k]
	if k == -1:
		k = 0
	else:
		k = -1
print(ans[::-1])


n = int(input())
data = input()
val = 0
i = 1
s = ''
while val != n:
	s += data[val]
	val += i
	i += 1
print(s)


def decipher(code, length):
	decoded = []
	cnt = 0
	c = 0
	while cnt < length:
		decoded.insert(cnt, code[cnt])
		c = c + 1
		cnt = cnt + c
	return decoded
n = input()
out = []
code = input()
if int(n) == 1:
	out = code
else:
	out = decipher(code, int(n))
print(''.join((str(x) for x in out)))


n = int(input())
s = input()
i = 1
a = s[0]
j = 1
while n > 1 and i < n:
	j += 1
	a += s[i]
	i += j
print(a)


def Cipher(s):
	s1 = ''
	n = len(s)
	e = 2
	if n == 1:
		return s
	if n % 2 == 0:
		for i in range(n // 2):
			s2 = '' + s[i] + s[n - i - 1]
			s1 = s2 + s1
	else:
		for i in range(n // 2):
			s2 = '' + s[n - i - 1] + s[i]
			s1 = s2 + s1
		s1 = s[n // 2] + s1
	return s1
x = input()
print(Cipher(x))


n = input()
l = len(n) - 1
a = l // 2
s = n[a]
for i in range(1, l // 2 + 1):
	s += n[a + i]
	s += n[a - i]
if l % 2 == 1:
	s += n[-1]
print(s)


n = int(input())
k = input()
i = 0
h = 1
result = []
while i < n:
	result.append(k[i])
	i += h
	h += 1
for i in result:
	print(i, end='')


n = str(input())
a = str(input())
index = 1
test = 1
result = ''
while True:
	result = result + a[index - 1]
	test = test + 1
	index = index + test
	if index - 1 >= len(a):
		break
print(result)


s = input()
if len(s) % 2 == 1:
	c = 1
else:
	c = -1
s1 = ''
while len(s) > 0:
	if c > 0:
		s1 += s[0]
		s = s[1:]
	else:
		s1 += s[-1]
		s = s[:len(s) - 1]
	c *= -1
s2 = ''
for i in range(len(s1) - 1, -1, -1):
	s2 += s1[i]
print(s2)


crypted = input()
passes = len(crypted)
resultt = list('a' * passes)
if passes % 2:
	for i in range(passes // 2):
		resultt[i * 2] = crypted[passes // 2 - i]
		resultt[i * 2 + 1] = crypted[passes // 2 + 1 + i]
	resultt[-1] = crypted[0]
else:
	for i in range(passes // 2):
		resultt[i * 2] = crypted[passes // 2 - 1 - i]
		resultt[i * 2 + 1] = crypted[passes // 2 + i]
print(''.join(resultt))


a = input()
b = ''
while a:
	if len(a) % 2 == 0:
		b = a[-1:] + b
		a = a[:-1]
	else:
		b = a[:1] + b
		a = a[1:]
print(b)


n = int(input())
t = input()
x = 0
c = 2
while 1:
	if x >= len(t):
		break
	print(t[x], end='')
	x += c
	c -= -1


from itertools import accumulate, count
n = int(input())
s = input()
ans = []
for i in accumulate(count(0)):
	if i >= n:
		break
	ans.append(s[i])
print(''.join(ans))


n = int(input())
q = [input()]
ans = ''
v = 1
y = 0
while n > 0:
	ans += q[0][y]
	n -= v
	y += v
	v += 1
print(ans)


s = input()
ans = []
n = len(s)
if n % 2 == 0:
	i = int(n / 2) - 1
else:
	i = int(n / 2)
j = 1
for l in range(0, n):
	if l % 2 == 0:
		ans.append(s[i])
		i = i + j
		j = j + 1
	else:
		ans.append(s[i])
		i = i - j
		j = j + 1
st = ''
for i in range(0, n):
	st = st + ans[i]
print(st)


n = int(input())
c = input()
j = 0
i = 0
b = ''
while i < n:
	b += c[i]
	j += 1
	i += j
print(b)


word = input()
trueWord = ''
begLetter = len(word) // 2
if len(word) % 2 == 0:
	begLetter -= 1
letter = begLetter
for i in range(len(word)):
	trueWord += word[letter]
	if i % 2 == 0:
		letter = begLetter + (i + 2) // 2
	else:
		letter = begLetter - (i + 2) // 2
print(trueWord)


string = input()
result = ''
l = len(string)
if l % 2 == 0:
	tag = 1
else:
	tag = 0
while len(string) > 0:
	if tag == 0:
		result = string[0] + result
		string = string[1:]
		tag = 1
	else:
		result = string[-1] + result
		string = string[:len(string) - 1]
		tag = 0
print(result)


t = int(input())
x = input()
k = 1
p = ''
i = 0
while i <= len(x) - 1:
	c = [i for i in x[i:i + k]]
	c = list(set(c))
	i = i + k
	k = k + 1
	p = p + str(''.join(map(str, c)))
print(p)


s = input()
a = len(s)
d = []
if a % 2 == 0:
	for i in range(a // 2):
		d.append(s[-i - 1])
		d.append(s[i])
	d.reverse()
	print(''.join(d))
else:
	b = s[a // 2]
	for i in range(a // 2):
		d.append(s[i])
		d.append(s[-i - 1])
	d.append(b)
	d.reverse()
	print(''.join(d))


x = eval(input())
y = input()
z = y[0]
i = 0
j = 2
while i + 1 < x:
	i = i + j
	j = j + 1
	z = z + y[i]
print(z)


import collections
import math
try:
	n = int(input())
	t = input()
	i = 0
	j = 1
	b = []
	while i < n:
		o = t[i:i + j]
		i = i + j
		j += 1
		b.append(o[0])
	print(''.join(b))
except:
	pass


n = input()
st = input()

def f(s):
	k = 1
	while s:
		print(s[0], end='')
		s = s[k:]
		k += 1
f(st)


a = input()
if len(a) % 2 == 1:
	i1 = len(a) // 2
	s1 = a[i1]
	for i in range(1, i1 + 1):
		s1 += a[i1 + i]
		s1 += a[i1 - i]
	print(s1)
else:
	a1 = ' ' + a
	i1 = len(a) // 2
	s1 = a1[i1]
	for i in range(1, i1 + 1):
		s1 += a1[i1 + i]
		s1 += a1[i1 - i]
	print(s1[:-1])


n = int(input())
a = input()
p = 0
m = 1
ans = ''
while abs(p) < n:
	ans += a[p]
	p += m
	m += 1
print(ans)


from collections import deque
from math import sqrt
n = int(input())
s = input()
a = int((-1 + sqrt(1 + 8 * n)) // 2)
t = deque(s)
m = []
x = ''
for i in range(a + 1):
	for j in range(i):
		x = t.popleft()
	m += x
print(''.join(m))


n = int(input())
s = input()
(idx, l) = (0, 1)
ans = ''
while idx < len(s):
	ans += s[idx]
	idx += l
	l += 1
print(ans)


l = int(input())
str1 = input()
ans = str1[0]
a = 2
count = 1
while a < l:
	ans += str1[a]
	count += 1
	a = a + count
print(ans)


n = int(input())
s = input()
for i in range(n):
	if len(s) > 0:
		print(s[0], end='')
		s = s[i + 1:len(s)]


s = input()
k = ''
if len(s) % 2 == 1:
	k = s[0]
	s = s[1:]
c = 0
while c < len(s) // 2:
	k = s[c] + s[len(s) - 1 - c] + k
	c += 1
print(k)


x = int(input())
y = input()
i = 0
t = 0
s = ''
while i < x:
	s = s + y[i]
	t = t + 1
	i = i + t
print(s)


l = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
n = int(input())
s = input()
t = ''
for x in l:
	if x < n:
		t += s[x]
	else:
		break
print(t)


n = int(input())
s = input().strip()
index = 0
counter = 1
res = ''
while index < n:
	res += s[index]
	index += counter
	counter += 1
print(res)


a = int(input())
b = input()
c = []
for i in b:
	c.append(i)
for i in range(a):
	if i > len(c) - 1:
		break
	print(c[i], end='')
	for j in range(i):
		del c[j]


length = int(input())
string = input()
a = 0
b = 0
while a < length:
	print(string[a], end='')
	b += 1
	a += b


length = int(input())
for i in range(1, 11):
	if int(i * (i + 1) / 2) == length:
		ori_len = i
		break
string = list(input())
for count in range(0, ori_len):
	for me in range(count):
		del string[count]
string = ''.join(string)
print(string)


def anti(cipher):
	word = ''
	i = 0
	j = 1
	while i < len(cipher):
		word += cipher[i]
		i += j
		j += 1
	return word
n = int(input())
cipher = input()
print(anti(cipher))


a = input()
for i in range(1):
	if len(a) % 2 == 0:
		print(a[len(a) // 2 - 1], end='')
		b = a[:len(a) // 2 - 1]
		b = b[::-1]
		c = a[len(a) // 2:]
		for j in range(len(b)):
			print(c[j] + b[j], end='')
		print(c[len(b)])
	else:
		print(a[len(a) // 2], end='')
		b = a[:len(a) // 2]
		b = b[::-1]
		c = a[len(a) // 2 + 1:]
		for j in range(len(b)):
			print(c[j] + b[j], end='')
		print()


def repeating_cipher(cipher):
	word = '' + cipher[0]
	x = 2
	cipher = cipher[1:]
	while cipher != '':
		word += cipher[0]
		cipher = cipher[x:]
		x += 1
	return word
inp = int(input())
cipher = input()
print(repeating_cipher(cipher))


s = input()
n = (len(s) + 1) // 2
r = ''.join(map(lambda x, y: x + y, reversed(s[:n]), s[n:]))
if len(s) & 1:
	print(r + s[0])
else:
	print(r)


n = int(input())
s = input()
x = ''
ind = 0
incre = 0
while True:
	x += s[ind]
	incre += 1
	ind = incre + ind
	if ind > n - 1:
		break
print(x)


s = input()
r = ''
if len(s) % 2 == 1:
	r = s[0]
	s = s[1:]
for i in range(len(s) // 2):
	r = s[0] + s[-1] + r
	s = s[1:-1]
print(r)


input()
cnt = 1
s = input()
i = 0
while i < len(s):
	print(s[i], end='')
	i += cnt
	cnt += 1


n = int(input())
s = input()
i = 0
m = 1
while i < len(s):
	print(s[i], end='')
	i += m
	m += 1


n = int(input())
s = input()
i = 0
c = 0
while i < n:
	print(s[i], end='')
	c = c + 1
	i = i + c


t = input()
i = 0
j = len(t) - 1
s = ''
b = len(t)
while i <= j:
	if b % 2 == 0:
		s = t[j] + s
		b -= 1
		j -= 1
	else:
		s = t[i] + s
		b -= 1
		i += 1
print(s)


n = int(input())
m = input()
i = 0
a = 0
while i < n:
	print(m[i], end='')
	i += a + 1
	a += 1


ans = str()
n = int(input())
s = input()
x = 0
for i in range(n):
	x += i
	if x < n:
		ans += s[x]
	else:
		break
print(ans)


n = int(input())
s = input()
outs = ''
pos = 0
i = 0
while pos < n:
	i += 1
	outs += s[pos]
	pos += i
print(outs)


import math
n = int(input())
str = input()

def fac(n):
	if n == 1:
		return n
	else:
		return n + fac(n - 1)
lis = [0] + [fac(i) for i in range(1, n + 1)]
i = int((-1 + math.sqrt(1 + 8 * n)) / 2)
k = lis[0:i]
l = [str[i] for i in k]
p = ''
for i in l:
	p = p + i
print(p)


n = int(input())
a = input()
i = 1
sum = 0
while sum < n:
	print(a[sum], end='')
	sum += i
	i += 1


n = int(input())
st = input()
i = 0
st1 = ''
c = 0
while i < n:
	st1 = st1 + st[i]
	c = c + 1
	i = i + c
print(st1)


n = int(input())
s = input()
first = 1
now = 0
ans = ''
while now < len(s):
	ans += s[now]
	now += first
	first += 1
print(ans)


t = 1
for test in range(t):
	n = int(input())
	s = input()
	ind = 0
	cur = 1
	ans = []
	while ind < n:
		ans.append(s[ind])
		ind += cur
		cur = cur + 1
	print(*ans, sep='')


(n, i, cnt) = (int(input()), 0, 0)
s = input()
while i < n:
	print(s[i], end='')
	cnt += 1
	i += cnt


n = int(input())
s = list(input())
s1 = s[0]
c = 1
i = 0
while i + c < n:
	s1 += s[i + c]
	i = i + c
	c += 1
print(s1)


n = int(input())
s = input()
s1 = []
i = 0
j = 1
while i < len(s):
	s1.append(s[i])
	i += j
	j += 1
for i in s1:
	print(i, end='')


x = int(input())
y = input()
s = 0
t = int((-1 + (1 + 4 * 2 * x) ** (1 / 2)) / 2)
for i in range(t):
	s = s + i
	print(y[s], end='')


(i, t, r, s) = (0, 0, '', [input() for _ in range(2)][1])
while i < len(s):
	r += s[i]
	t += 1
	i += t
print(r)


try:
	l = int(input())
	s = input()
	i = 0
	a = 0
	while i < l:
		print(s[i], end='')
		a = a + 1
		i = i + a
except:
	pass


from math import sqrt

def cipher(str):
	l = len(str)
	n = int((sqrt(8 * l + 1) - 1) / 2)
	c = str[int((n ** 2 - n) / 2)]
	if l == 1:
		return str
	else:
		return cipher(str[:l - n]) + c
val = int(input())
s = input()
print(cipher(s))


def read_input():
	n = input()
	t = input()
	return (int(n), t)

def decrypt(n, t):
	char_list = list(t)
	original = []
	i = 0
	step = 1
	while i < n:
		original.append(char_list[i])
		i += step
		step += 1
	return ''.join(original)

def print_output(result):
	print(result)
(n, t) = read_input()
res = decrypt(n, t)
print_output(res)


n = int(input())
s = str(input())
list = []
i = 1
j = 1
while j <= n:
	m = s[j - 1]
	list.append(m)
	j = j + i
	i = i + 1
word = ''.join(map(str, list))
print(word)


n = int(input())
s = input()
(i, j) = (0, 1)
r = ''
while i < len(s):
	r += s[i]
	i += j
	j += 1
print(r)


n = int(input(''))
s = input()
out = ''
count = 1
i = 0
while i < len(s):
	out += s[i]
	count += 1
	i += count
print(out)


n = int(input())
cipher = input()
result = []
i = j = 0
while i + j < n:
	result.append(cipher[i + j])
	j += i
	i += 1
print(''.join(result))


a = list(input())
l = len(a)
s = []
i = 1
j = 1
if l % 2 == 1:
	while i in range(1, int(l / 2) + 2):
		s.append(l + (i - 1) * -2)
		i += 1
	while j in range(1, int(l / 2) + 1):
		s.append(2 + (j - 1) * 2)
		j += 1
else:
	while i in range(1, int(l / 2) + 1):
		s.append(l - 1 + (i - 1) * -2)
		i += 1
	while j in range(1, int(l / 2) + 1):
		s.append(2 + (j - 1) * 2)
		j += 1
c = [x for (_, x) in sorted(zip(s, a))]
print(''.join(c))


a = input()
ans = str()
if len(a) == 1:
	ans = a
elif len(a) % 2 == 0:
	s = len(a) // 2 - 1
	ans += a[s]
	for i in range(1, s + 1):
		ans += a[s + i]
		ans += a[s - i]
	ans += a[-1]
else:
	s = len(a) // 2
	ans += a[s]
	for i in range(1, s + 1):
		ans += a[s + i]
		ans += a[s - i]
print(ans)


n = int(input())
s = input().rstrip()
result = ''
j = 0
t = 1
while j < n:
	result += s[j]
	j += t
	t += 1
print(result)


def decrypt(s, n):
	s1 = ''
	ctr = 0
	i = 1
	while ctr < n:
		s1 += s[ctr]
		ctr += i
		i += 1
	print(s1)
n = int(input())
s = input()
decrypt(s, n)


n = int(input())
s = input()
p = ''
j = 0
k = 2
while j < n:
	p += s[j]
	j += k
	k += 1
print(p)


t = input()
ost = len(t) % 2
n = len(t) // 2 - 1
if ost == 0:
	s = str(t[n])
else:
	s = str(t[n + 1])
	n += 1
switch = 1
u = 1
for i in range(len(t) - 1):
	if u == 1:
		s += t[n + switch]
		u = 0
	else:
		s += t[n - switch]
		u = 1
		switch += 1
print(s)


s = [i for i in input()]
if not len(s) % 2:
	while s:
		ind = (len(s) - 1) // 2
		print(s[ind], end='')
		s.pop(ind)
else:
	from math import ceil
	while s:
		ind = ceil((len(s) - 1) / 2)
		print(s[ind], end='')
		s.pop(ind)


(w, s) = (input(), '')
l = len(w)
if l % 2:
	w += ' '
	l += 1
(lf, rt) = (w[0:l // 2][-1::-1], w[l // 2:])
for i in range(l // 2):
	s += lf[i] + rt[i]
print(s)


n = int(input())
s = input()
i = 0
j = 1
while True:
	try:
		print(s[i], end='')
		i += j
		j += 1
	except:
		break


s = input()
l = len(s)
i = 0
j = l - 1
res = []
if l % 2 == 0:
	while i < j:
		res.append(s[j])
		j = j - 1
		res.append(s[i])
		i = i + 1
else:
	while i < j:
		res.append(s[i])
		i = i + 1
		res.append(s[j])
		j = j - 1
	res.append(s[(l - 1) // 2])
res.reverse()
print(''.join(res))


s = input()
S = []
if len(s) % 2 == 0:
	for i in range(len(s)):
		if i % 2 != 0:
			S.append(s[i // 2])
		else:
			S.append(s[-i // 2 - 1])
else:
	for i in range(len(s)):
		if i % 2 == 0:
			S.append(s[i // 2])
		else:
			S.append(s[-i // 2])
S.reverse()
print(*S, sep='')


n = int(input())
s = input()
c = 1
d = 1
k = 0
for i in range(n):
	print(s[k:k + 1], end='')
	k = k + c
	c += 1
	if k >= n:
		break


n = int(input())
s = input()
p = ''
j = 0
for i in range(n):
	j += i
	if j < n:
		print(s[j], end='')


n = int(input())
s = input()
sp = ''
i = 0
c = 0
while c != len(s):
	sp += s[c]
	c += i
	i += 1
print(sp[1:])


s = input()
size = len(s) // 2 + len(s) % 2 - 1
print(s[size], end='')
for i in range(1, size + 1):
	print(s[size + i], end='')
	print(s[size - i], end='')
if len(s) % 2 == 0:
	print(s[len(s) - 1])


s = input()
side = -1
if len(s) % 2 == 1:
	side = 0
o = ''
for i in range(len(s)):
	o += s[side]
	if side == -1:
		s = s[:-1]
		side = 0
	else:
		s = s[1:]
		side = -1
for i in range(len(o) - 1, -1, -1):
	print(o[i], end='')


import math
wcipher = input()
center = math.ceil(len(wcipher) / 2)
val = list(wcipher)
pos = {}
j = 0
out = ''
if len(wcipher) % 2 == 0:
	start = len(wcipher) - 1
else:
	start = len(wcipher)
for i in range(start, 0, -2):
	pos[i] = val[j]
	j = j + 1
j = center
for i in range(2, len(wcipher) + 1, 2):
	pos[i] = val[j]
	j = j + 1
out = out.join(('{}'.format(val) for (key, val) in sorted(pos.items())))
print(out)


s = input()
if len(s) % 2 == 0:
	i = int(len(s) / 2) - 1
	x = str(s[i])
	le = -1
	ri = 1
	while len(x) != len(s):
		if i + ri <= len(s) - 1:
			x = x + str(s[i + ri])
		if i + le >= 0:
			x = x + str(s[i + le])
		le -= 1
		ri += 1
	print(x)
else:
	i = int(len(s) / 2)
	x = str(s[i])
	le = -1
	ri = 1
	while len(x) != len(s):
		if i + ri <= len(s) - 1:
			x = x + str(s[i + ri])
		if i + le >= 0:
			x = x + str(s[i + le])
		le -= 1
		ri += 1
	print(x)


n = int(input())
t = input()
i = 0
j = 1
b = []
while i < n:
	o = t[i:i + j]
	i = i + j
	j += 1
	b.append(o[0])
print(''.join(b))


n = int(input())
s = input()
i = 1
j = 0
if n == 1:
	r = s[0]
else:
	r = ''
	while i < n:
		j = j + 1
		i = j * (j + 1) // 2
		r = r + s[i - 1]
print(r)


i = input()
s = input()
fs = ''
n = 0
m = 0
while n < int(i):
	fs += s[n]
	m += 1
	n += m
print(fs)


(n, k) = (int(input()), 0)
(s, x, t) = ('', 1, input())
while k < n:
	s += t[k]
	k += x
	x += 1
print(s)


t = list(input())
s = []
tmp = False
i = len(t)
while i != 0:
	if i % 2 == 0:
		s.append(t.pop())
	else:
		s.append(t.pop(0))
	i -= 1
s.reverse()
print(''.join(s))


n = int(input())
s = input()
p = ''
count = 0
j = 1
for i in s:
	count += 1
	if count == j:
		p += i
		j += 1
		count = 0
print(p)


a = str(input())
i = 1
c = str()
if len(a) == 1:
	print(a)
elif len(a) % 2 == 1:
	for i in range(0, len(a) // 2):
		c = a[-i - 1] + a[i] + c
	print(a[len(a) // 2] + c)
else:
	for i in range(0, len(a) // 2):
		c = a[i] + a[-i - 1] + c
	print(c)


value = [i + 1 for i in range(10)]
n = int(input())
istr = input()
index = 0
ans = istr[0]
for i in value:
	index = index + i
	if index >= n:
		break
	ans = ans + istr[index]
print(ans)


n = int(input())
t = input()
s = ''
start = 0
i = 1
while start < n:
	s += t[start]
	start += i
	i += 1
print(s)


def decrypt(s):
	res = ''
	i_res = 1
	i_s = 0
	while i_s != len(s):
		res += s[i_s]
		i_s += i_res
		i_res += 1
	return res
n = int(input())
print(decrypt(input()))


t = int(input())
p = input()
(i, j) = (0, 0)
while True:
	print(p[i], end='')
	i += 2 * 1 + j
	j += 1
	if i >= t:
		break


s = list(input())
s_was = ''
for i in range(len(s) // 2):
	if len(s) % 2 == 0:
		s_was += s[len(s) // 2 - i - 1]
		s_was += s[len(s) // 2 + i]
	else:
		s_was += s[len(s) // 2 - i]
		s_was += s[len(s) // 2 + i + 1]
if len(s) % 2 == 1:
	s_was += s[0]
print(s_was)


s = input()
a = len(s)
sl = ''
i = a - 1
j = 0
while a > 0:
	if a % 2 == 0:
		sl = s[i] + sl
		i -= 1
	else:
		sl = s[j] + sl
		j += 1
	a -= 1
print(sl)


import math
n = int(input())
s = input()
ans = ''
d = 1 + 8 * n
sm = -1
for i in range((math.ceil(math.sqrt(d)) - 1) // 2):
	ans += s[sm + 1]
	sm = sm + i + 1
print(ans)


n = int(input())
s = input()[:n]
a = []
k = 0
t = 1
while k < len(s):
	a.append(s[k])
	t += 1
	k += t
print(''.join(a))


n = int(input())
s = str(input())
result = []
temp = 0
i = 0
while i < n:
	if i + temp <= n - 1:
		result.append(s[i + temp])
	i += temp
	temp += 1
print(*result, sep='')


limit = int(input())
enc = input()
idx = 0
inc = 1
output = ''
while idx < limit:
	output += enc[idx]
	idx += inc
	inc += 1
print(output)


n = int(input())
string = input()
i = 0
j = 1
ep = 2
result = ''
while j <= n:
	result += string[i]
	i = j
	j += ep
	ep += 1
print(result)


n = int(input())
k = input()
q = 0
i = 1
l = ''
while i <= n:
	l += k[q + i - 1:q + i]
	q += i
	i += 1
print(l)


t = input()
ans = ''
itr = 0
i = len(t) // 2 - (len(t) + 1) % 2
while itr != len(t):
	itr += 1
	ans += t[i]
	if itr % 2 == 1:
		i += itr
	else:
		i -= itr
print(ans)


s = input()
arr = [0 for i in range(len(s))]
ind = len(s) // 2 + len(s) % 2
for i in range(1, len(s), 2):
	arr[i] = s[ind]
	ind += 1
ind = 0
for i in range(len(s) - 1 - (len(s) % 2 == 0), -1, -2):
	arr[i] = s[ind]
	ind += 1
print(''.join(arr))


(a, b) = (int(input()), input())
(i, j) = (1, 0)
while j < a:
	print(b[j], end='')
	i += 1
	j += i


n = int(input())
k = 1
s = input()
ans = ''
period = 0
for i in range(n):
	if period == 0:
		print(s[i], end='')
		k += 1
	period = (period + 1) % k


import sys

class Main:

	def __init__(self):
		self.buff = None
		self.index = 0

	def next(self):
		if self.buff is None or self.index == len(self.buff):
			self.buff = sys.stdin.readline().split()
			self.index = 0
		val = self.buff[self.index]
		self.index += 1
		return val

	def next_int(self):
		return int(self.next())

	def solve(self):
		n = self.next_int()
		s = self.next()
		print(''.join([s[i * (i + 1) // 2] if i * (i + 1) // 2 < n else '' for i in range(0, n)]))
Main().solve()


import math
t = input()
if len(t) % 2 != 0:
	x1 = (len(t) + 1) / 2
	x2 = (len(t) - 1) / 2
	y = math.ceil(x2)
	x = math.ceil(x1)
	for i in range(0, x):
		if i == 0:
			print(t[y], end='')
		else:
			print(t[y + i], end='')
			print(t[y - i], end='')
else:
	x1 = len(t) / 2
	x = math.ceil(x1) - 1
	for i in range(0, len(t)):
		if i % 2 == 0:
			print(t[x - i], end='')
			x = x - i
		else:
			print(t[x + i], end='')
			x = x + i


n = int(input())
t = list(input())
s = ''
for i in range(1, len(t)):
	if i >= len(t):
		break
	s += t[i - 1]
	for j in range(i):
		del t[j]
print(s + t[-1])


n = int(input())
s = input()
r_len = 0
i = 0
while i < len(s):
	end = i + r_len
	if end >= len(s):
		break
	sub = s[i:end + 1]
	print(sub[0], end='')
	r_len += 1
	i = i + r_len


def main():
	_n = int(input())
	t = input().strip()
	(s_arr, j) = ([], 0)
	for i in range(len(t)):
		j += i
		if j >= len(t):
			break
		s_arr.append(t[j])
	print(''.join(s_arr))
main()


n = int(input())
s = str(input())
t = 2
k = 0
p = ''
while k < n:
	p += s[k]
	k += t
	t += 1
print(p)


t = input()
s = input()
lenth = len(s)
output = ''
i = 0
n = 1
while i < lenth:
	output = output + s[i]
	i = i + n
	n += 1
print(output)


n = input()
n = list(n)
k = ['0'] * len(n)
h = -1
for i in n:
	if abs(h) <= len(n):
		k[h] = i
		h -= 2
for i in k:
	if i in n:
		n.remove(i)
if len(k) % 2 == 0:
	k.append('0')
	k = k[1:]
y = 0
for i in range(len(k)):
	if k[i] == '0':
		k[i] = n[y]
		y += 1
for i in k:
	print(i, end='')


amount = int(input())
string = input()
answer = ''
counter = 1
i = 0
while i < len(string):
	answer += string[i]
	i += counter
	counter += 1
print(answer)


n = int(input())
s = input()
k = 1
a = []
for i in range(0, n):
	try:
		a.append(i)
		i = sum(a)
		print(s[i], end='')
	except:
		continue


n = int(input())
s = input()
(i, k) = (1, 1)
sol = ''
while i <= n:
	sol += s[i - 1]
	i += k
	k += 1
print(sol)


n = int(input())
s = input()
res = ''
cnt = 0
cur = 1
if n == 1:
	print(s)
for i in range(1, n):
	if cnt == n:
		break
	res += s[cnt]
	cnt += i
print(res)


n = int(input())
st = input()
out = ''
(i, t) = (0, 1)
while i < n:
	out += st[i]
	i += t
	t = t + 1
print(out)


n = int(input())
x = input()
s = ''
c = 0
for i in range(0, n):
	c += i
	if c >= n:
		break
	s += x[c]
print(s)


n = int(input())
a = input()
ans = ''
k = 1
ramu = 1
for i in range(1, n):
	if i == k:
		ans = ans + a[i - 1]
		k = k + ramu
		ramu = ramu + 1
if n == 1:
	ans = a[0]
print(ans)


t = input()
s = ''
a = len(t) // 2
if len(t) % 2 == 0:
	a -= 1
s += t[a]
b = a + 1
a -= 1
while a >= 0 and b < len(t):
	s += t[b]
	s += t[a]
	a -= 1
	b += 1
if a >= 0:
	s += t[0]
if b < len(t):
	s += t[-1]
print(s)


def cipher(s):
	if len(s) % 2 == 0:
		return int(len(s) / 2)
	if len(s) % 2 == 1:
		return int((len(s) + 1) / 2)

def raya(s):
	d = cipher(s) - 1
	t = []
	for i in range(1, len(s) + 1):
		t.append(d)
		d = d + i * (-1) ** (i + 1)
	return t

def key(letter):
	list = raya(letter)
	d = ''
	for i in list:
		d = d + letter[i]
	return d
var = input()
print(key(var))


n = int(input())
s = input()
p = ''
count = 1
i = 0
while i < len(s):
	p += s[i]
	count += 1
	i = i + count
print(p)


x = str(input())
t = 1
o = []
p = len(x)
if p % 2 == 0:
	p = p // 2 - 1
else:
	p = p // 2
for i in range(1, len(x) + 1):
	o.append(x[p])
	p += i * t
	t *= -1
print(''.join(o))


n = int(input())
a = input()
i = 1
while n > 0:
	n = n - i
	i += 1
t = i - 1
b = []
c = 0
for x in range(t):
	b.append(a[x + c])
	c += x
print(''.join(b))


n = int(input())
s = str(input())
a = []
a.append(0)
c = 1
while c < n:
	f = c * (c + 1) // 2
	if f < n:
		a.append(f)
	c += 1
g = len(a)
d = ''
for j in range(g):
	d += s[a[j]]
print(d)


s = input()
decoded = str()
if len(s) % 2 == 0:
	r = len(s) - 1
	l = 0
	while l < r:
		decoded += s[r]
		decoded += s[l]
		l += 1
		r -= 1
else:
	r = len(s) - 1
	l = 0
	while l < r:
		decoded += s[l]
		decoded += s[r]
		l += 1
		r -= 1
	decoded += s[r]
print(decoded[::-1])


n = int(input())
s = input()
if len(s) == 1:
	print(s)
elif len(s) == 3:
	print(s[0] + s[1])
elif len(s) == 6:
	print(s[0] + s[1] + s[3])
elif len(s) == 10:
	print(s[0] + s[1] + s[3] + s[6])
elif len(s) == 15:
	print(s[0] + s[1] + s[3] + s[6] + s[10])
elif len(s) == 21:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15])
elif len(s) == 28:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21])
elif len(s) == 36:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21] + s[28])
elif len(s) == 45:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21] + s[28] + s[36])
elif len(s) == 55:
	print(s[0] + s[1] + s[3] + s[6] + s[10] + s[15] + s[21] + s[28] + s[36] + s[45])


import sys

class Solution(object):

	def solve(self):
		_len = int(input())
		text = input().strip()
		rtr = text[0]
		cd = 2
		i = 1
		while i < _len:
			rtr += text[i]
			i += cd
			cd += 1
		return rtr
sol = Solution()
print(sol.solve())


def stringmismatch(s, n):
	if n % 2 == 0:
		ss = n // 2 - 1
	else:
		ss = n // 2
	(i, o) = (ss, 1)
	(j, res) = (1, s[i])
	while True:
		i = i + j
		if i < 0 or i >= n:
			break
		res += s[i]
		j = (abs(j) + 1) * (-1) ** o
		o += 1
	print(res)
s = input()
stringmismatch(s, len(s))


n = int(input())
s = input()
n1 = 0
i = 1
while n1 <= n - 1:
	print(s[n1], end='')
	n1 += i
	i += 1


n = int(input())
c = int(0)
st = input()
res = ''
for i in range(1, n + 1):
	res = res + st[0]
	st = st[i:99]
	c = c + i
	if c == n:
		break
print(res)


s = input()
if len(s) % 2 == 0:
	k = len(s) // 2 - 1
else:
	k = len(s) // 2
s1 = s[k]
(a, b) = (k, k)
for i in range(len(s) - 1):
	if i % 2 == 0:
		b += 1
		s1 += s[b]
	else:
		a -= 1
		s1 += s[a]
print(s1)


input()
a = input()
i = 0
ind = 0
try:
	while 1:
		print(a[ind], end='')
		i += 1
		ind += i
except IndexError:
	pass


n = input()
re = []
k = 0
x = 1
if len(n) % 2 != 0:
	c = len(n) // 2
else:
	c = len(n) // 2 - 1
while len(re) != len(n):
	if x % 2 != 0:
		re.append(n[c - k])
		k += 1
	else:
		re.append(n[c + k])
	x += 1
print(''.join(map(str, re)))


a = int(input())
b = input()
j = (-1 + (1 + 8 * a) ** 0.5) / (2 * 1)
j = int(j)
n = []
for i in range(1, j + 1):
	k = i * (i + 1) / 2 - 1
	k = int(k)
	w = b[k]
	n.extend(w)
print(''.join(n))


s = input()
n = len(s)
ans = ''
if n % 2 == 0:
	ans = s[n // 2 - 1]
	l = n // 2 - 1
	r = n // 2 - 1
	last = -1
	for i in range(n - 1):
		if last == -1:
			ans += s[r + 1]
			r += 1
			last = 1
		elif last == 1:
			ans += s[l - 1]
			l -= 1
			last = 0
		else:
			ans += s[r + 1]
			r += 1
			last = 1
	print(ans)
else:
	ans = s[n // 2]
	l = n // 2
	r = n // 2
	last = -1
	for i in range(n - 1):
		if last == -1:
			ans += s[r + 1]
			r += 1
			last = 1
		elif last == 1:
			ans += s[l - 1]
			l -= 1
			last = 0
		else:
			ans += s[r + 1]
			r += 1
			last = 1
	print(ans)


n = int(input())
str = input()
step = 0
i = 0
while i < n:
	print(str[i], end='')
	i += step + 1
	step += 1


n = int(input())
li = input()
i = 0
fin = []
while i < n and len(li) != 0:
	fin.append(li[i])
	li = li.replace(li[i], '', i + 1)
	i += 1
print(''.join(fin))


s = input()
ans = ''
if len(s) == 1:
	print(s)
	exit()
mid = (len(s) - 1) // 2
ans += s[mid]
index = 1
while mid - index > -1 and mid + 1 < len(s):
	ans += s[mid + index]
	ans += s[mid - index]
	index += 1
if not len(s) % 2:
	ans += s[-1]
print(ans)


n = int(input())
s = input()
ans = ''
ind = 2
i = 0
while i < n:
	ans += s[i]
	i += ind
	ind += 1
print(ans)


from collections import deque
s = deque(input())
ans = ''
n = len(s)
if n % 2:
	c = 0
else:
	c = -1
for i in range(n):
	if c == 0:
		ans += s.popleft()
	else:
		ans += s.pop()
	c -= 1
	c %= 2
print(''.join(ans[::-1]))


l = list(input())
s = []
if len(l) % 2 != 0:
	l = l[-1::-1]
while len(l) >= 1:
	i = l.pop()
	s.append(i)
	l = l[-1::-1]
print(''.join(s[-1::-1]))


from sys import stdin

def main():
	b = stdin.readline()
	s = stdin.readline()
	res = ''
	aux = 1
	cont = 1
	for i in range(len(s)):
		if i + 1 == aux:
			res += s[i]
			aux += cont
			cont += 1
	print(res)
main()


n = int(input())
s = input()
ans = []
for i in range(n):
	try:
		ans.append(s[i * (i + 1) // 2])
	except:
		KeyError
print(''.join(ans))


import sys
import math
data = sys.stdin.readlines()
texto = data[1]
suma = 0
i = 1
resultado = ''
while True:
	resultado = resultado + texto[suma]
	suma = suma + i
	i = i + 1
	if suma + i > len(texto):
		break
print(resultado)


n = int(input())
s = input()
(i, j) = (0, 1)
p = ''
while i < n:
	p = p + s[i]
	i = i + j
	j = j + 1
print(p)


N = int(input())
k = 1
p = 1
D = input()
ans = ''
while k != N:
	ans += D[k - 1]
	p += 1
	k = p * (p + 1) // 2
ans += D[k - 1]
print(ans)


n = int(input())
s = str(input())
i = 2
res = s[0]
x = 2
while i < n:
	res = res + s[i]
	i = i + x
	x = x + 1
print(res)


n = int(input())
s = input()
ans = ''
t = 1
delta = 2
while t <= n:
	ans += s[t - 1]
	t += delta
	delta += 1
print(ans)


n = int(input())
s = input()
a = 1
b = 0
while b < len(s):
	print(s[b], end='')
	b += a
	a += 1


a = int(input())
b = input()
c = 0
d = 1
while c < a:
	print(b[c], end='')
	d += 1
	c += d


n = []
x = ''
for i in range(2):
	n.append(input())
for j in range(int(n[0])):
	l = int(j * (j + 1) / 2)
	if l < len(n[1]):
		x = x + n[1][l]
print(x)


n = int(input())
a = input()
a = list(a)
ans = []
p = 1
k = 0
f = 2
import sys
for i in range(len(a)):
	if p <= len(a):
		ans.append(a[k:p])
		k = p
		p += f
		f += 1
for i in range(len(ans)):
	print(ans[i][0], end='')


x = input()
if len(x) % 2 == 0:
	i = int(len(x) / 2) - 1
else:
	i = int(len(x) / 2)
j = i - 1
y = x[i]
i = i + 1
for a in range(0, int(len(x) / 2) + 1):
	if i < len(x):
		y += x[i]
	if j >= 0:
		y += x[j]
	i += 1
	j -= 1
print(y)


s = input()
s1 = ' '
n = len(s)
if len(s) % 2 == 0:
	(l, r) = (0, len(s) - 1)
else:
	(l, r) = (1, len(s) - 1)
	s1 = s[0] + s1
	n = n - 1
for i in range(n):
	if i % 2 == 0:
		s1 = s[r] + s1
		r = r - 1
	else:
		s1 = s[l] + s1
		l = l + 1
print(s1)


import sys, time, os
from pprint import pprint as pp
if os.environ.get('_ONPC_', False):
	stdin = open('input.txt', 'r')
	stdout = open('output.txt', 'w')
	sys.stdin = stdin
	sys.stdout = stdout
	now = time.time()
	__flag = True
else:
	__flag = False

def what(obj):
	if __flag:
		pp(obj, sys.stderr)
s = input().strip()
ans = ''
while s:
	if len(s) & 1:
		ans = s[0] + ans
		s = s[1:]
	else:
		ans = s[-1] + ans
		s = s[:-1]
print(ans)
if __flag:
	stdout.close()
	stdin.close()
	print(time.time() - now, file=sys.stderr)


n = int(input())
s = input()
l = len(s)
c = []
i = 0
j = 1
while i < l:
	c.append(s[i])
	i += j
	j += 1
h = len(c)
for i in range(h):
	print(c[i], end='')


n = int(input())
t = input()
if n == 1:
	print(t)
else:
	s = ''
	c = 0
	for i in range(1, n):
		try:
			s += t[c]
			c += i
		except:
			break
	print(s)


n = int(input())
s = input()
s = list(s)
c = 0
k = 0
l = []
while c < n:
	k += 1
	l.append(s[c])
	c = c + k
print(''.join(l))


s = input()
if len(s) % 2 == 0:
	ans = ''
	i = len(s) // 2 - 1
	nap = 0
	for j in range(len(s)):
		if nap == 1:
			i += j
			nap = 0
		else:
			i -= j
			nap = 1
		ans += s[i]
	print(ans)
else:
	ans = ''
	i = len(s) // 2
	nap = 0
	for j in range(len(s)):
		if nap == 1:
			i += j
			nap = 0
		else:
			i -= j
			nap = 1
		ans += s[i]
	print(ans)


n = input()
a = input()
i = 0
j = 1
while i < len(a):
	print(a[i], end='')
	i += j
	j += 1


t = list(input())
k = 1
st = ''
if len(t) > 1:
	if len(t) % 2 == 0:
		for i in range(len(t) // 2 - 1, -1, -1):
			st += t[i] + t[i + k]
			k += 2
	else:
		for i in range(len(t) // 2, -1, -1):
			if i > 0:
				st += t[i] + t[i + k]
			else:
				st += t[i]
			k += 2
else:
	st += t[0]
print(st)


s = input()
n = len(s)
index = n - 1
index = index // 2
count = 0
b = ''
for x in range(1, n + 1):
	if x % 2 == 0:
		a = s[index + x // 2]
		b = b + a
	else:
		a = s[index - x // 2]
		b = b + a
print(b)


n = int(input())
a = str(input())
j = 1
i = 0
while i < n:
	print(a[i], end='')
	j = j + 1
	i = i + j


n = int(input())
a = input()
i = j = 0
t = ''
while i < n:
	t += a[i]
	j += 1
	i += j
print(t)


(a, b) = (int(input()), input())
c = ''
j = 1
k = 0
while k < a:
	c += b[k]
	k += j
	j += 1
print(c)


n = int(input())
s = input()
hsl = ''
i = 0
j = 1
while i < n:
	hsl += s[i]
	i += j
	j += 1
print(hsl)


n = int(input())
s = str(input())
t = ''
u = 0
for i in range(n):
	u += i
	if u < n:
		t += s[u]
	else:
		break
print(t)


l = int(input())
es = input()
i1 = 0
i2 = 0
s = ''
while i2 < l:
	s += es[i2]
	i1 += 1
	i2 += i1
print(s)


n = int(input())
s = input()
t = []
c = 0
for i in range(n):
	c = c + i
	if c < n:
		t.append(s[c])
	else:
		break
t = '%s' * len(t) % tuple(t)
print(t)


d = {x * (x + 1) // 2: x for x in range(1, 12)}
n = int(input())
s = input()
t = ''
c = 0
for i in range(d[n]):
	c += i
	t += s[c]
print(t)


n = int(input())
s = input()
(p, t, a) = (1, 0, '')
for i in range(len(s)):
	if i == t:
		a += s[i]
		p += 1
		t = p + i
print(a)


from math import sqrt
m = int(input())
line = input()
ans = []
l = int(sqrt(m * 2))
for i in range(0, l):
	ans.append(line[0:i + 1])
	line = line[i + 1:]
print(''.join([sub[0] for sub in ans]))


n = int(input())
l = list(input())
z = 0
count = 1
done = False
while not done:
	print(l[z], end='')
	z = z + count
	count += 1
	if z >= len(l) - 1:
		done = True


t = input()
len_t = len(t)
string = list()
if len_t % 2 == 0:
	for i in range(len_t):
		if i % 2 == 0:
			string.append(t[len_t - 1 - i // 2])
		if i % 2 != 0:
			string.append(t[i // 2 + i % 2 - 1])
else:
	for i in range(len_t):
		if i % 2 == 0:
			string.append(t[i // 2])
		if i % 2 != 0:
			string.append(t[len_t - i // 2 - 1])
string.reverse()
print(''.join(string))


x = int(input())
a = str(input())
b = list(a)
x = len(b)
i = 0
n = 1
while i < x:
	print(b[i], end='')
	i = i + n
	n = n + 1


import math
n = int(input())
a = input()
t = (math.sqrt(8 * n + 1) - 1) // 2
i = 0
x = 1
s = ''
while t > 0:
	s += a[i]
	i += x
	t -= 1
	x += 1
print(s)


a = int(input())
b = input()
t = 0
s = 2
while t <= a:
	print(b[t], end='')
	t += s
	s += 1


from functools import reduce
n = int(input())
s = input()

def solve(p, curr):
	pos = p[1] + curr
	if pos >= n:
		return p
	return (p[0] + s[pos], pos)
(ans, _) = reduce(solve, range(11), ('', 0))
print(ans)


n = int(input())
s = input()
result = ''
i = 0
j = 0
while i < n:
	result += s[i]
	j += 1
	i += j
print(result)


n = int(input())
s = input()
s = list(s)
j = 1
a = []
i = 0
while i < len(s):
	a.append(s[i])
	i = i + j
	j = j + 1
a = ''.join(a)
print(a)


a = input()
b = []
if len(a) % 2 == 0:
	midl = int((len(a) - 2) / 2)
	midr = int(len(a) / 2)
	for i in range(int(len(a) / 2)):
		b.append(a[midl])
		b.append(a[midr])
		midr = midr + 1
		midl = midl - 1
else:
	b.append(a[int((len(a) - 1) / 2)])
	midl = int((len(a) - 1) / 2)
	midr = int((len(a) - 1) / 2)
	for i in range(int((len(a) - 1) / 2)):
		midr = midr + 1
		midl = midl - 1
		b.append(a[midr])
		b.append(a[midl])
print(''.join(b))


t = list(input())
if len(t) % 2 == 0:
	for i in range(len(t)):
		if i % 2 == 0:
			t.insert(0, t.pop(len(t) - 1))
		else:
			t.insert(0, t.pop(i))
else:
	for i in range(len(t)):
		if not i % 2 == 0:
			t.insert(0, t.pop(len(t) - 1))
		else:
			t.insert(0, t.pop(i))
print(''.join(t))


n = int(input())
s = input()
pos = 0
for i in range(n):
	print(s[pos], end='')
	pos += i + 1
	if pos >= n:
		break


k = int(input())
n = input()
i = 1
s = 1
l = []
c = ''
while k != 0:
	k -= i
	l.append(s)
	s += i
	i += 1
for x in l:
	print(n[x - 1], end='')


n = int(input())
s = input()
ans = ''
i = 0
y = 0
while i < n:
	ans += s[i]
	y += 1
	i += y
print(ans)


s = input()
l = len(s)
i = 0
out = ''
if l > 1 and l % 2 == 0:
	while l - i > i:
		out = s[i] + s[l - i - 1] + out
		i += 1
elif l % 2 == 1:
	while l - i + 1 != i + 1 and l - i > i:
		out = s[l - i - 1] + s[i] + out
		i += 1
	out = out[1:]
print(out)


n = int(input())
data = input()
s = ''
(i, j) = (1, 0)
while j < n:
	s += data[j]
	j += i
	i += 1
print(s)


n = int(input())
s = input()
t = 1
while n > 0:
	n = n - t
	t += 1
t -= 1
p = 0
a = ''
for i in range(t):
	p += i
	a += s[p]
print(a)


code = input()
if len(code) % 2 == 0:
	mid = len(code) // 2 - 1
else:
	mid = len(code) // 2
result = code[mid]
for i in range(1, len(code) - mid):
	result += code[mid + i]
	if mid - i >= 0:
		result += code[mid - i]
print(result)


n = int(input())
x = []
k = 0
s = input()
for i in range(len(s)):
	k += i
	if k < len(s):
		x.append(s[k])
for i in range(len(x)):
	print(x[i], end='')


n = int(input())
s = input()
i = 0
k = 1
count = 1
ans = ''
while True:
	if k <= n:
		ans += s[i]
		count += 1
		i = k
		k += count
	else:
		break
print(ans)


s = input()
s2 = ''
while s:
	if len(s) % 2 == 0:
		s2 = s[-1:] + s2
		s = s[:-1]
	else:
		s2 = s[:1] + s2
		s = s[1:]
print(s2)


(n, line) = (int(input()), input())
print(''.join([line[i] for i in [0, 1, 3, 6, 10, 15, 21, 28, 36, 45] if i < len(line)]))


x = int(input())
y = input()
g = 0
p = 0
for i in y:
	p += 1
	if p == g + 1:
		p = 0
		g = g + 1
		print(i, end='')
print()


n = input()
p = input()
s = ''
k = 0
i = 0
while k <= int(n) - 1:
	s = s + p[k]
	k = k + (i + 1)
	i += 1
print(s)


n = int(input())
s = input()
s1 = ''
k = 0
kindex = 0
while k != n:
	s1 += s[k]
	kindex += 1
	k += 1 * kindex
print(s1)


a = list(input())
s = []
j = 0
if len(a) % 2 == 0:
	while len(a) != 0:
		if j % 2 == 0:
			b = len(a) // 2
			n = a.pop(b - 1)
			s.append(n)
		else:
			b = len(a) // 2
			n = a.pop(b)
			s.append(n)
		j = j + 1
else:
	while len(a) != 0:
		b = len(a) // 2
		n = a.pop(b)
		s.append(n)
print(*s, sep='')


f = int(input())
a = input()
s = 0
t = 1
d = ''
while s < len(a):
	d += a[s]
	s += t
	t += 1
print(d)


n = int(input())
string = input()
i = 1
while i * (i + 1) // 2 <= n:
	print(string[i * (i + 1) // 2 - 1], end='')
	i += 1


t = input()
lng = len(t)
mid = lng // 2 - 1
mid = mid if lng % 2 == 0 else mid + 1
dec = t[mid]
for i in range(1, mid + 2):
	if mid + i < lng:
		dec += t[mid + i]
	if mid - i >= 0:
		dec += t[mid - i]
print(dec)


l = int(input())
s = input()
n = 2
j = 0
while j <= l:
	j = (n - 1) * (n - 2) // 2 + 1
	if j > l:
		break
	print(s[j - 1], end='')
	n += 1


n = int(input())
word = input()
res = ''
letters_pos = [0, 1, 3]
for x in range(3, 11):
	letters_pos.append(x + letters_pos[-1])
if n == 1:
	print(word)
else:
	word = list(word)
	relevant = [word[i] for i in letters_pos if i <= n - 1]
	res = ''.join(relevant)
	print(res)


n = int(input())
s = input()
r = ''
i = 0
k = 1
while i < n:
	r += s[i]
	i += k
	k += 1
print(r)


s = input()
i = 0
j = len(s) - 1
u = []
if len(s) % 2 == 1:
	k = 0
else:
	k = 1
while True:
	if k % 2 == 0:
		u.append(s[i])
		i += 1
	else:
		u.append(s[j])
		j -= 1
	k = (k + 1) % 2
	if i > j:
		break
for i in range(len(u) - 1, -1, -1):
	print(u[i], end='')


n = int(input())
s = list(input())
k = 0
i = 0
ans = []
while i < n:
	ans.append(s[i])
	k += 1
	i += k
print(*ans, sep='')


a = str(input())
b = ''
if len(a) % 2 == 0:
	for (i, j) in zip(range(len(a) - 1, len(a) // 2 - 1, -1), range(len(a) // 2)):
		b = a[j] + a[i] + b
else:
	for (i, j) in zip(range(len(a) - 1, len(a) // 2, -1), range(len(a) // 2)):
		b = a[i] + a[j] + b
	b = a[len(a) // 2] + b
print(b)


x = input()
n = len(x)
mas = []
for i in x:
	mas.append(i)
if n % 2 == 0:
	mas = list(reversed(mas))
ot = ''
for i in range(n):
	ot += mas[0]
	temp = mas.pop(0)
	mas = list(reversed(mas))
print(ot[::-1])


def codeForce(dlina, stroka):
	nova = ''
	stroka1 = list(stroka)
	cur = 0
	count = 0
	for i in range(1, 1000):
		if cur >= len(stroka1):
			break
		nova += stroka1[cur]
		cur += i
	return nova
print(codeForce(input(), input()))


import math
a = input()
if len(a) == 1:
	print(a)
else:
	ans = ''
	i = math.ceil(len(a) / 2) - 1
	j = i + 1
	while i >= 0 or j < len(a):
		if i >= 0:
			ans += a[i]
		if j < len(a):
			ans += a[j]
		i -= 1
		j += 1
	print(ans)


n = int(input())
parola = input()
k = 1
while k * (k + 1) // 2 != n:
	k = k + 1
risultato = ''
for i in range(k):
	risultato = risultato + parola[i * (i + 1) // 2]
print(risultato)


n = int(input())
s = input()
dec_num = 1
str = ''
pos = 0
len1 = len(s)
while pos < len1:
	x = dec_num
	str = str + s[pos]
	while pos < len1 and x != 0:
		pos = pos + 1
		x = x - 1
	dec_num = dec_num + 1
print(str)


n = int(input())
s = input()
(c, m) = (1, 1)
ans = ''
while m <= n:
	ans += s[m - 1]
	m += c
	c += 1
print(ans)


num = int(input())
ar = input()
num_ar = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
result = ''
temp = 0
for i in range(10):
	if num_ar[i] == num:
		num = i + 1
for j in range(num):
	result = result + ar[temp]
	temp = temp + j + 1
print(result)


n = int(input())
s = input()
last = 0
res = ''
count = 1
while last < len(s):
	res += s[last]
	last += count
	count += 1
print(res)


s = input()
get = s

def shifr(stroka):
	a = stroka
	start = a[0]
	for i in range(1, len(a)):
		if i % 2 == 1:
			start = start + a[i]
		else:
			start = a[i] + start
	return start
to = shifr(s)
while shifr(to) != get:
	to = shifr(to)
print(to)


n = int(input())
arr = input()
l = []
sum = 0
i = 0
while sum + i < n:
	l.append(arr[i + sum])
	sum += i
	i += 1
print(''.join(l))


input()
s = input()
char_ind = 0
step = 1
res = ''
while char_ind < len(s):
	res += s[char_ind]
	char_ind += step
	step += 1
print(res)


s = list(input())
if len(s) % 2 == 0:
	t = ''
	for q in range(len(s) // 2 - 1, -1, -1):
		t += s[q] + s[-q - 1]
else:
	t = s[len(s) // 2]
	for q in range(len(s) // 2 - 1, -1, -1):
		t += s[-q - 1] + s[q]
print(t)


crypted = input()
m = (len(crypted) - 1) // 2
ans = crypted[m]
t = 1
while m - t != -1:
	ans += crypted[m + t]
	ans += crypted[m - t]
	t += 1
if len(crypted) % 2 == 0:
	ans += crypted[-1]
print(ans)


a = input()
b = input()
z = 1
x = b[0]
i = 0
while i < len(b):
	x = b[i]
	if x * z == b[i:i + z]:
		print(x, end='')
		i += z
		z += 1
	else:
		i += 1


n = int(input())
s = input()
(ini, counter) = (0, 1)
while ini < n:
	print(s[ini], end='')
	ini += counter
	counter += 1


p = int(input())
y = input()
n = 0
jwb = ''
u = 1
while n < p:
	jwb += y[n]
	n += u
	u += 1
print(jwb)


s = input()
n = len(s)
if n % 2 == 0:
	start = n // 2 - 1
else:
	start = n // 2
print(s[start], end='')
i = 1
while i <= n // 2:
	print(s[start + i], end='')
	if start - i >= 0:
		print(s[start - i], end='')
	i += 1


import sys
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
n = int(input())
s = input().strip()
ans = ''
x = 0
for i in range(1, 11):
	if x >= n:
		break
	ans += s[x]
	x += i
print(ans)


n = int(input())
x = input()
m = 1
i = 0
while i < n:
	print(x[i], end='')
	i += m
	m += 1


n = int(input())
string = input()
index = 0
k = 1
original_string = ''
while index < n:
	original_string += string[index]
	index += k
	k += 1
print(original_string)


cifer = input()
res = ''
n = len(cifer) // 2

def decifer(s):
	global res
	l = len(s)
	if l == 0:
		return
	if l == 1:
		res += s
		return
	if l % 2 != 0:
		res += s[l // 2] + s[l // 2 + 1]
		decifer(s[:l // 2] + s[l // 2 + 2:])
	else:
		res += s[l // 2 - 1] + s[l // 2]
		decifer(s[:l // 2 - 1] + s[l // 2 + 1:])
decifer(cifer)
print(res)


n = int(input())
alpha = str(input())
i = 0
res = ''
a1 = 1
while i < n:
	res += alpha[i]
	a1 += 1
	i += a1
print(res)


s = input()
r = s
ans = ''
t = len(s)
if t % 2 == 0:
	for i in range(t):
		if i % 2 == 0:
			ans = s[-1] + ans
			s = s[:-1]
		else:
			ans = s[0] + ans
			s = s[1:]
else:
	for i in range(t):
		if i % 2 == 1:
			ans = s[-1] + ans
			s = s[:-1]
		else:
			ans = s[0] + ans
			s = s[1:]
print(ans)


n = int(input())
a = input()
g = 1
current = 0
while current < n:
	print(a[current], end='')
	current += g
	g += 1


def main():
	n = int(input())
	s1 = str(input())
	start = 0
	res = ''
	cnt = 0
	while start < n:
		res += s1[start]
		cnt += 1
		start += cnt
	print(res)
	return
main()


from math import *
from copy import *
from string import *
from sys import stdin
from itertools import *
from collections import Counter
N = int(stdin.readline())
s = input()
l = list(s)
i = 0
x = 1
S = ''
while i < len(s):
	S += l[i]
	i += x
	x += 1
print(S)


import sys
n = int(input())
s = input()
ans = ''
(counter, j) = (0, 1)
while counter != n:
	ans += s[counter]
	counter += j
	j += 1
print(ans)


n = int(input())
t = input()
li = 0
ri = 1
s = 1
p = ''
while li < len(t):
	p += t[li:ri][0]
	s += 1
	li = ri
	ri += s
print(p)


import math
n = int(input())
a = input()
x = int((-1 + pow(8 * len(a), 0.5)) / 2)
n = 0
A = []
d = ''
for i in range(x + 1):
	n = n + i
	A.append(a[n])
for i in A:
	d = d + i
print(d)


def q(x):
	p = len(x)
	s = [0] * p
	s[::2] = x[(p - 1) // 2::-1]
	s[1::2] = x[(p + 1) // 2::1]
	print(''.join(s))
q(input())


s = str(input())
b = int(len(s))
a = 0
c = ''
if b == 1 or b == 2:
	print(s)
elif b % 2 == 0:
	for i in range(len(s) // 2):
		c += s[b - 1]
		c += s[a]
		b -= 1
		a += 1
	print(c[::-1])
else:
	for i in range(len(s) // 2):
		c += s[a]
		c += s[b - 1]
		b -= 1
		a += 1
	c += s[len(s) // 2]
	print(c[::-1])


a = input()
answer = ''
if len(a) % 2 == 1:
	for i in range(len(a)):
		if i % 2 == 1:
			answer = a[len(a) - i // 2 - 1] + answer
		else:
			answer = a[i // 2] + answer
else:
	for i in range(len(a)):
		if i % 2 == 0:
			answer = a[len(a) - i // 2 - 1] + answer
		else:
			answer = a[i // 2] + answer
print(answer)


a = int(input())
seq = input()
d = {1: 1, 3: 2, 6: 3, 10: 4, 15: 5, 21: 6, 28: 7, 36: 8, 45: 9, 55: 10}
ans = []
idd = 0
for i in range(1, d[a] + 1):
	ans.append(seq[idd])
	idd += i
print(''.join(ans))


n = int(input())
st = input()
lis = []
count = 1
i = 0
while i < n:
	lis.append(st[i])
	temp = i + count
	j = i
	while j < temp:
		j += 1
		continue
	count += 1
	i = j + 1
print(''.join(lis))


s = input()
ns = ''
l = len(s)
z = int((l - 1) / 2)
m = z + 1
while z >= 0 or m <= l - 1:
	if z >= 0 and m <= l - 1:
		ns = ns + s[z] + s[m]
	elif z >= 0:
		ns = ns + s[z]
	elif m <= l - 1:
		ns = ns + s[m]
	z = z - 1
	m = m + 1
print(ns)


def sint():
	return int(input())

def sints():
	return map(int, input().split())

def sara():
	return list(map(int, input().split()))

def sstr():
	s = input()
	return list(s[:len(s)])

def main():
	n = sint()
	s = input()
	i = 0
	j = 1
	while i < n:
		print(s[i], end='')
		i += j
		j += 1
	print('')
main()


n = int(input())
s = input()
ans = ''
t = 0
for i in range(len(s)):
	t += i
	if t >= len(s):
		break
	ans += s[t]
print(ans)


s = list(input())
s1 = []
l = len(s)
if l % 2 == 0:
	i = l // 2 - 1
else:
	i = l // 2
s1.append(s[i])
for j in range(1, i + 1):
	s1.append(s[i + j])
	s1.append(s[i - j])
if l % 2 == 0:
	s1.append(s[l - 1])
print(''.join(s1))


n = int(input())
t = input()
x = 0
y = 0
s = ''
if n == 1:
	print(t)
else:
	while y < n:
		s += t[y]
		x += 1
		y += x
	print(s)


n = input()
s = input()
i = 0
j = 1
while i < len(s):
	print(s[i], end='')
	i += j
	j += 1


a = input()
a = list(a)
w = []
if len(a) % 2 == 0:
	k = 0
	p = 0
	for i in range(len(a)):
		if i % 2 == 0:
			w.append(a[-1 - p])
			p += 1
		else:
			w.append(a[0 + k])
			k += 1
else:
	k = 0
	p = 0
	for i in range(len(a)):
		if i % 2 == 0:
			w.append(a[k])
			k += 1
		else:
			w.append(a[-1 - p])
			p += 1
w.reverse()
for i in range(len(w)):
	print(w[i], end='')


n = int(input())
a = input()
for i in range(1, n + 1):
	if n == i * (i + 1) // 2:
		t = i
		break
for j in range(t):
	print(a[j * (j + 1) // 2], end='')
print()


a = int(input())
s = input()
l = ''
r = 0
p = 0
i = 1
while p < a:
	l += s[p]
	i += 1
	p += i
print(l)


n = int(input())
stri = list(input())
j = 1
stri1 = ''
i = 0
while i < n:
	stri1 += stri[i]
	i += j
	j += 1
print(stri1)


t = int(input())
s = input()
count = 0
result = []
while len(s) >= count:
	result.append(s[count])
	count += 1
	s = s[count:]
print(''.join(result))


import math
import bisect
import itertools
import sys
I = lambda : sys.stdin.readline()
mod = 10 ** 9 + 7

def mindiff(a):
	b = a[:]
	b.sort()
	m = 10000000000
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] < m:
			m = b[i + 1] - b[i]
	return m

def lcm(a, b):
	return a * b // math.gcd(a, b)

def merge(a, b):
	i = 0
	j = 0
	c = 0
	ans = []
	while i < len(a) and j < len(b):
		if a[i] < b[j]:
			ans.append(a[i])
			i += 1
		else:
			ans.append(b[j])
			c += len(a) - i
			j += 1
	ans += a[i:]
	ans += b[j:]
	return (ans, c)

def mergesort(a):
	if len(a) == 1:
		return (a, 0)
	mid = len(a) // 2
	(left, left_inversion) = mergesort(a[:mid])
	(right, right_inversion) = mergesort(a[mid:])
	(m, c) = merge(left, right)
	c += left_inversion + right_inversion
	return (m, c)

def is_prime(num):
	if num == 1:
		return False
	if num == 2:
		return True
	if num == 3:
		return True
	if num % 2 == 0:
		return False
	if num % 3 == 0:
		return False
	t = 5
	a = 2
	while t <= int(math.sqrt(num)):
		if num % t == 0:
			return False
		t += a
		a = 6 - a
	return True

def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def binsearch(arr, b, low, high):
	if low == high:
		return low
	if arr[math.ceil((low + high) / 2)] < b:
		return binsearch(arr, b, low, math.ceil((low + high) / 2) - 1)
	else:
		return binsearch(arr, b, math.ceil((low + high) / 2), high)

def ncr1(n, r):
	s = 1
	for i in range(min(n - r, r)):
		s *= n - i
		s %= mod
		s *= pow(i + 1, mod - 2, mod)
		s %= mod
	return s

def calc(n, m, r):
	s = 0
	for i in range(0, r + 1, 2):
		s += ncr1(n, i) * ncr1(m, i)
		s %= mod
	return s
n = int(input())
s = input()
i = 0
count = 1
while i < n:
	print(s[i], end='')
	i += count
	count += 1


n = int(input())
a = ''
string = list(input())
j = 1
i = 0
while i < n:
	a += string[i]
	i += j
	j += 1
print(a)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_strList_from_str = lambda : list(sys.stdin.readline().strip())
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
string = get_string()
len_actual_str = math.floor((-1 + math.sqrt(1 + 8 * n)) // 2)
result = ''
index = 0
incrementer = 1
for i in range(len_actual_str):
	result += string[index]
	index += incrementer
	incrementer += 1
print(result)


(n, step, i) = (int(input()), 0, 0)
s = input()
while i + step < n:
	print(s[i + step], end='')
	i += step
	step += 1


n = int(input())
a = input()
k = 0
c = 1
while k < n:
	print(a[k], end='')
	k += c
	c += 1


n = int(input())
string = input()
i = 1
lis = []
while i <= n:
	if len(string) != 0:
		s = string[0]
		lis.append(s)
		string = string[i:]
		i = i + 1
	else:
		break
print(''.join(map(str, lis)))


input()
palavra = input()
x = 0
for i in range(len(palavra)):
	print(palavra[x], end='')
	x += i + 1
	if x >= len(palavra):
		print('')
		break


n = input()
arr = list(input())
i = 0
j = 0
while i < len(arr):
	print(arr[i], end='')
	j += 1
	i = int(j * (j + 1) / 2)


n = int(input())
s = input()
i = 0
t = 1
a = ''
if n == 1:
	print(s)
else:
	while i < n:
		a += s[i]
		t += 1
		i = i + t
print(a)


length = input()
cipher = input()
cipher = list(cipher)
ans = ''
i = 1
while len(cipher) != 0:
	ans += cipher[0]
	for x in range(i):
		cipher.pop(0)
	i += 1
print(ans)


try:
	while 1:
		i = input()
		n = len(i)
		if not n:
			print('')
		if n == 1:
			print(i)
		else:
			res = ''
			if n % 2 == 0:
				mid = n // 2
				pre = i[:mid]
				post = i[mid:]
				for j in range(len(pre)):
					res += pre[-(j + 1)]
					res += post[j]
			if n % 2 == 1:
				mid = n // 2
				res += i[mid]
				pre = i[:mid]
				post = i[mid + 1:]
				for j in range(len(pre)):
					res += post[j]
					res += pre[-(j + 1)]
			print(res)
except:
	pass


n = int(input())
x = input()
m = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
y = []
for i in m[:m.index(n)]:
	y.append(x[i])
print(*y, sep='')


n = int(input())
s = input()
res = ''
i = 0
skip = 0
while i < n:
	res += s[i]
	skip += 1
	i += skip
print(res)


x = int(input(''))
y = input('')
j = 0
c = ''
for i in range(x):
	j = i + j
	if j < x:
		c = c + y[j]
	else:
		break
print(c)


line = input()
new_line = ''
if len(line) % 2 == 0:
	for i in range(len(line) // 2):
		new_line += line[-i - 1] + line[i]
	print(new_line[::-1])
else:
	new_line += line[len(line) // 2]
	j = len(line) // 2 - 1
	for i in range(len(line) // 2 + 1, len(line)):
		new_line += line[i] + line[j]
		j -= 1
	print(new_line)


l = int(input())
s = input()
r = ''
i = 0
j = 1
while i < l:
	r += s[i]
	i = j * (j + 1) // 2
	j += 1
print(r)


n = int(input().strip())
text = input().strip()

def root(n: int) -> int:
	disc: int = 1 + 4 * 2 * n
	return (-1 + int(disc ** (1 / 2))) // 2
storage = [0] * root(n)
token = ''
t_length = 0
for i in range(len(storage)):
	storage[i] = text[t_length]
	t_length = t_length + i + 1
print(''.join(storage))


e = input()
e = list(e)
res = ['0' for i in range(len(e))]
i = 0
n = len(e) - 1
if len(e) % 2 != 0:
	r = 1
else:
	r = -1
y = len(e) - 1
while i != n + 1:
	if r == -1:
		res[y] = e[n]
		n -= 1
	else:
		res[y] = e[i]
		i += 1
	r *= -1
	y -= 1
print(*res, sep='')


n = int(input())
s = str(input())
new = ''
a = 0
b = 0
for i in s:
	if b == 0:
		new += i
		b = a + 1
		a += 1
	else:
		b -= 1
print(new)


s = input()
n = len(s)
ans = ''
if n % 2 == 0:
	now = n // 2 - 1
else:
	now = n // 2
for i in range(n):
	if i % 2 != 0:
		ans += s[now + i]
		now += i
	else:
		ans += s[now - i]
		now -= i
print(ans)


s = input()
n = len(s)
if n % 2 == 0:
	ans = list(s[n // 2 - 1:])
	ans.reverse()
	ind = 1
	for i in range(n // 2 - 1):
		ans.insert(ind, s[i])
		ind += 2
	ans.reverse()
	ans = ''.join(ans)
	print(ans)
elif n % 2 != 0:
	ans = list(s[n // 2:])
	ans.reverse()
	ind = 0
	for i in range(n // 2):
		ans.insert(ind, s[i])
		ind += 2
	ans.reverse()
	ans = ''.join(ans)
	print(ans)


n = int(input())
t = list(input())
q = 1
i = 0
j = 0
k = 0
a = []
x = len(t)
while True:
	X = x - q
	if X == 0:
		break
	q += 1
	x = X
while i < q:
	a.append(str(i))
	i += 1
while j < len(a):
	a[j] = t[k]
	k = k + (j + 2)
	j += 1
print(''.join(a))


n = int(input())
string = input()

def find_m(x):
	m = 1
	while x > 0:
		x -= m
		m += 1
	return m - 1
(out_string, position) = ('', 0)
for i in range(1, find_m(n) + 1):
	out_string += string[position]
	position += i
print(out_string)


n = int(input())
k = 0
res = ''
s = input()
n = n * 2
ko = int(n ** 0.5)
if ko * (ko + 1) > n:
	ko = ko - 1
if ko * (ko + 1) < n:
	ko = ko + 1
if ko * (ko + 1) == n:
	for i in range(1, ko + 1):
		res += s[k]
		k += i
	print(res)


s = input()
n = len(s)
u = 0
ans = ''
ans += s[(n - 1) // 2]
u1 = (n - 1) // 2 + 1
u2 = (n - 1) // 2 - 1
u = 1
while u1 < n and u2 >= 0:
	ans += s[u1]
	ans += s[u2]
	u1 += 1
	u2 -= 1
if n % 2 == 0:
	ans += s[-1]
print(ans)


import math
n = int(input())
s = input()
l = list(s)
s1 = 0
l1 = []
d = 1 + 8 * n
d1 = math.sqrt(d)
sol_2 = int((-1 + d1) / 2)
for i in range(0, sol_2):
	z = i * (i + 1) // 2
	l1.append(l[z])
print(''.join(map(str, l1)))


n = int(input())
line = str(input())
ans_line = ''
cntr = 1
last_cntr = 1
for a in line:
	if cntr > 1:
		cntr -= 1
		continue
	ans_line += a
	last_cntr += 1
	cntr = last_cntr
print(ans_line)


size = int(input())
word = input()
ind = []
(Sum, i) = (0, 1)
while Sum < size:
	ind.append(Sum)
	Sum += i
	i += 1
print(''.join([word[i] for i in ind]))


stroka = str(input())
l = len(stroka)
start = (l - 1) // 2
s1 = []
s2 = []
if l % 2 == 1:
	i = 0
	while i != start:
		s1.append(stroka[i])
		s2.append(stroka[l - i - 1])
		i += 1
	new = stroka[start]
	for i in range(len(s1) - 1, -1, -1):
		new += s2[i] + s1[i]
	print(new)
else:
	i = l - 1
	while i != start:
		s1.append(stroka[i])
		s2.append(stroka[l - i - 1])
		i -= 1
	new = ''
	for i in range(len(s1) - 1, -1, -1):
		new += s2[i] + s1[i]
	print(new)


word = input()
b = ''
c = 0
if len(word) % 2 != 0:
	c += 1
c += len(word) // 2 - 1
b = b + word[c]
for i in range(0, len(word) - 1):
	if i % 2 == 0:
		b += word[c + (i // 2 + 1)]
	else:
		b += word[c - (i // 2 + 1)]
print(b)


n = int(input())
f = input()
k = []
for i in range(1, 11):
	if n >= i * (i + 1) // 2:
		k.append(f[i * (i + 1) // 2 - 1])
print(''.join(k))


n = int(input())
s = input()
ans = []
i = 0
k = 0
while i < n:
	ans.append(s[i])
	k += 1
	i += k
for i in ans:
	print(i, end='')


def repeat(n, s):
	res = ''
	sx = 0
	if len(s) == 1:
		print(s)
		return
	res += s[0]
	for i in range(1, len(s) - 1):
		if sx < n:
			sx += i
			if sx >= n:
				print(res)
				return
			res += s[sx]
	print(res)
n = int(input())
s = input()
repeat(n, s)


def read(type=1):
	if type:
		file = open('input.dat', 'r')
		n = int(file.readline())
		line = file.readline()
		file.close()
	else:
		n = int(input().strip())
		line = input().strip()
	return (n, line)

def solve():
	i = 0
	sol = ''
	pos = 0
	while pos < len(s):
		sol += s[pos]
		i += 1
		pos += i
	return sol
(n, s) = read(0)
sol = solve()
print(sol)


n = int(input())
m = 0
for i in range(1, 11):
	if i * (i + 1) / 2 == n:
		m = i
		break
s = input()
now = 0
for i in range(1, m + 1):
	print(s[now], end='')
	now += i


n = int(input())
c = 1
s = str(input())
ans = ''
temp = ''
while len(s) > 0:
	temp = s[:c]
	s = s[c + 1:]
	ans = ans + temp[0]
	c = c + 1
print(ans)


s = input()
s1 = s[(len(s) - 1) // 2:(len(s) - 1) // 2 + 2]
add_n = 1
add_l = 1
add_r = 1
for i in range(len(s) - 2):
	if add_n % 2 == 1:
		s1 += s[(len(s) - 1) // 2 - add_l]
		add_l += 1
	else:
		s1 += s[(len(s) - 1) // 2 + 1 + add_r]
		add_r += 1
	add_n += 1
print(s1)


import math

def solve():
	n = int(input())
	s = input()
	stri = ''
	a = 0
	for i in range(999):
		a += i
		if a < n:
			stri += s[a]
		else:
			break
	print(stri)
solve()


s = input()
i = (len(s) - 1) // 2
n = 0
l = ''
for j in range(len(s)):
	if j % 2 == 0:
		l = l + s[i - n]
		n = n + 1
	else:
		l = l + s[i + n]
print(l)


last = 0
n = int(input())
s = input()
x = 0
i = 0
ans = ''
while i < n:
	ans += s[i]
	x += 1
	i += x
print(ans)


n = int(input())
wordlist = list(input())
unique = [1]
count = 1
decode = []
decode.append(wordlist[count - 1])
for i in range(1, n + 1):
	count = count + i
	if count > n:
		break
	decode.append(wordlist[count - 1])
print(''.join(decode))


s = input()
ans = ''
n = len(s)
i = 0
j = n - 1
if n % 2:
	ans += s[0]
	i += 1
while i - 1 != j:
	ans += s[j]
	j -= 1
	ans += s[i]
	i += 1
print(ans[::-1])


s = input()
a = ''
while s:
	if len(s) % 2 == 0:
		a = s[-1:] + a
		s = s[:-1]
	else:
		a = s[:1] + a
		s = s[1:]
print(a)


from math import factorial as f

def decrypt(s):
	s2 = []
	i = 1
	j = 0
	while j < len(s):
		s2.append(s[j])
		j += i
		i += 1
	return ''.join(s2)
input()
s = input().strip()
print(decrypt(s))


x = int(input())
y = list(input())
z = 0
j = 2
i = 2
c = []
print(y[0], end='')
while z < x and x >= 3:
	v = y[i]
	c.append(v)
	z += 1
	j = j + 1
	i = i + j
	if i > x - 1:
		break
for i in c:
	print(i, end='')


k = int(input())
s = input()
n = ''
i = 1
p = 1
while p <= k:
	n = n + s[p - 1]
	i += 1
	p = i * (i + 1) // 2
print(n)


n = int(input())
s = input()
r = ''
c = 1
k = 0
for i in range(n):
	if k == c:
		k = 0
		c += 1
	if k == 0:
		r += s[i]
	k += 1
print(r)


def res(a):
	l = []
	if len(a) == 1:
		return a
	if len(a) % 2 == 0:
		for i in range((len(a) + 1) // 2):
			l.append(a[len(a) - i - 1])
			if len(a) - i - 1 != i:
				l.append(a[i])
	else:
		for i in range((len(a) + 1) // 2):
			l.append(a[i])
			if len(a) - i - 1 != i:
				l.append(a[len(a) - i - 1])
	l = reversed(l)
	s = ''.join(l)
	return s
a = str(input())
print(res(a))


(a, d, p, l, i) = (int(input()), [], ' ' + input(), 1, 2)
while l <= a:
	d.append(p[l])
	l += i
	i += 1
print(''.join(d))


n = int(input())
ss = input()
res = ''
i = 0
j = 0
while i < n:
	res += ss[i]
	j += 1
	i += j
print(res)


t = int(input().strip())
s = input().strip()
i = 1
e = ''
l = 0
while l < t:
	e += s[l]
	l += i
	i += 1
print(e)


n = int(input())
st = input()
j = 0
i = 0
s = ''
while j < n:
	i += 1
	j += i
	s = s + st[j - 1]
print(s)


n = int(input())
s = str(input())
index_1 = 0
i = 1
while index_1 < n:
	print(s[index_1], end='')
	index_1 += i
	i = i + 1


s = input()
n = len(s)
if n == 1 or n == 2:
	print(s)
else:
	if n % 2 == 0:
		c = n // 2
		i = c - 1
		j = c
	else:
		c = n // 2
		i = c
		j = c + 1
	print(s[i], s[j], sep='', end='')
	count = n - 2
	while count > 0:
		i -= 1
		count -= 1
		print(s[i], end='')
		if count == 0:
			break
		j += 1
		count -= 1
		print(s[j], end='')


n = int(input())
s = str(input())
i = 0
jump = 0
ans = []
while i < n:
	curr = s[i]
	jump += 1
	i += jump
	ans.append(curr)
print(''.join(ans))


input()
n = 1
s = list(input().strip())
while len(s) > 0:
	print(s[0], end='')
	for i in range(n):
		s.pop(0)
	n += 1
print('')


n = int(input())
m = input()
(k, l) = (0, 0)
for i in range(n):
	if l == k:
		print(m[i], end='')
		l = 0
		k += 1
	else:
		l += 1


S = input()
n = len(S)
if n % 2 == 0:
	k = 1
	for i in range(n // 2, 0, -1):
		print(S[i - 1], end='')
		print(S[i - 1 + k], end='')
		k = k + 2
else:
	k = 1
	for i in range(n // 2, 0, -1):
		print(S[i], end='')
		print(S[i + k], end='')
		k = k + 2
	print(S[0])


a = int(input())
b = input()
c = ''
z = 0
f = 0
for i in b:
	if z == 0:
		c += i
		f += 1
		z = f
	else:
		z -= 1
print(c)


s = input()
n = len(s)
start = (n - 1) // 2
ans = s[start]
for i in range(1, n // 2 + 1):
	if start + i < n:
		ans += s[start + i]
	if start - i >= 0:
		ans += s[start - i]
print(ans)


import math
n = int(input())
code = input()
for index in range(0, n):
	k = math.floor(index * (index + 1) / 2)
	if k < n:
		print(code[k], end='')


n = int(input())
s = input()
tot = ''
i = 0
sk = 0
while i <= n - 1:
	tot += s[i]
	sk += 1
	i += sk
print(tot)


n = int(input())
m = input()
f = str()
a = 0
i = 0
j = 0
while n != 0:
	f += m[j]
	n -= i + 1
	i += 1
	j += i
print(f)


n = int(input())
st = input()
s = ''
c = 0
j = 1
while c < n:
	s += st[c]
	c += j
	j += 1
print(s)


n = eval(input())
t = input()
p = t[0]
i = 0
j = 2
while i + 1 < n:
	i = i + j
	p = p + t[i]
	j = j + 1
print(p)


n = int(input())
s = input()
x = 1
i = 0
while i < len(s):
	print(s[i], end='')
	i += x
	x += 1


t = input()
s = ''
n = len(t)
if n == 0:
	s = s
elif n == 1:
	s += t
elif n % 2 == 0:
	a = int(n / 2)
	b = a - 1
	while True:
		s += t[b]
		s += t[a]
		if b == 0:
			break
		b -= 1
		a += 1
else:
	s += t[int((n - 1) / 2)]
	a = int((n - 1) / 2 + 1)
	b = a - 2
	while True:
		s += t[a]
		s += t[b]
		if b == 0:
			break
		b -= 1
		a += 1
print(s)


input()
word = list(input())
(k, x) = (0, 0)
li = []
while k < len(word):
	li.append(word[k])
	x += 1
	k += x
print(*li, sep='')


n = int(input())
string = input()
output = ''
s = 1
while True:
	t = s * (s + 1) // 2
	output += string[t - 1]
	if t == n:
		break
	s += 1
print(output)


bs = input()
string = input()
g = 0
i = 1
answer = []
while g < len(string):
	answer.append(string[g])
	g = g + i
	i = i + 1
ans = ''
for element in answer:
	ans = ans + element
print(ans)


s = input()
s_new = ['' for _ in range(len(s))]
s_new[0] = s[(len(s) + 1) // 2 - 1]
f_h = s[:(len(s) + 1) // 2 - 1][::-1]
if len(s) == 1:
	print(s)
else:
	k = 2
	for i in f_h:
		s_new[k] = i
		k += 2
	n_h = s[(len(s) + 1) // 2:]
	k = 1
	for i in n_h:
		s_new[k] = i
		k += 2
	print(''.join(s_new))


n = int(input())
s = input()
index = 0
res = ''
for i in range(11):
	index += i
	if index > n - 1:
		break
	res += s[index]
print(res)


N = int(input())
S = input()
T = 0
i = 1
R = ''
while T < N:
	R += S[T]
	T += i
	i += 1
print(R)


try:
	n = int(input())
	s = input()
	a = 0
	ans = ''
	b = 0
	while b != n:
		b = a * (a + 1) // 2
		a += 1
	a = a - 1
	l = [1, 2, 4, 7, 11, 16, 22, 29, 37, 46]
	for j in range(0, a):
		ans += s[l[j] - 1]
	print(ans)
except:
	pass


n = int(input())
s = input()
c = 1
s1 = ''
for i in range(n):
	if i + 1 == c * (c + 1) // 2:
		c += 1
		s1 += s[i]
print(s1)


n = int(input())
t = str(input())
suma = ''
k = 1
counter = 1
while k <= n:
	suma += t[k - 1]
	counter += 1
	k = int(counter * (counter + 1) / 2)
print(suma)


s = input()
k = len(s)
index = len(s) // 2
i = 0
if len(s) % 2 == 0:
	index -= 1
ans = s[index]
num = 1
while num < k:
	i += 1
	ans += s[index + i]
	num += 1
	if i <= index:
		ans += s[index - i]
		num += 1
print(ans)


n = int(input())
s = input()
(i, j) = (0, 1)
f = ''
while i < len(s):
	f = f + s[i]
	i += j
	j += 1
print(f)


from sys import stdin, stdout
from math import *
from heapq import *
from collections import *

def main():
	n = int(stdin.readline())
	t = stdin.readline()
	s = []
	i = 0
	j = 1
	while i < n:
		s.append(t[i])
		i = i + j
		j = j + 1
	stdout.write(''.join(s))
	return 0
main()


n = int(input())
s = input()
ind = 0
i = 1
out = ''
while ind < n:
	out += s[ind]
	ind += i
	i += 1
print(out)


n = int(input())
m = input()
sumi = 0
i = 1
while sumi != n:
	sumi += i
	i += 1
	print(m[sumi - 1], end='')


a = list(input())
t = ''
b = 1
if len(a) % 2 == 1:
	c = (len(a) + 1) // 2
else:
	c = len(a) // 2
c -= 1
d = 1
try:
	for i in a:
		t += a[c]
		c += b * d
		b *= -1
		d += 1
except:
	print(t)
print(t)


String = str(input())
List = []
m = 1
if len(String) % 2 == 0:
	List.append(String[len(String) // 2 - 1])
	for i in range(len(String) - 1):
		if len(List) % 2 == 1:
			List.append(String[len(String) // 2 - 1 + m])
		else:
			List.append(String[len(String) // 2 - 1 - m])
			m += 1
else:
	List.append(String[len(String) // 2])
	for j in range(len(String) - 1):
		if len(List) % 2 == 1:
			List.append(String[len(String) // 2 + m])
		else:
			List.append(String[len(String) // 2 - m])
			m += 1
print(''.join(List))


input()
s = list(input())
d = ''
r = 0
a = 1
while r < len(s):
	d = d + s[r]
	r = r + a
	a = a + 1
print(d)


(count, t_count) = (0, 1)
number = int(input())
str = input().strip()
r_string = ''
while number != 0:
	t_count = count + t_count
	r_string += str[t_count - 1]
	count += 1
	number -= count
print(r_string)


n = int(input())
s = input()
string = s[0]
j = 2
if n == 3:
	string = string + s[2]
else:
	for i in range(3, n // 2 + 2):
		x = s[j]
		string = string + x
		j = j + i
		if j > n:
			break
print(string)


n = int(input())
t = input()
A = ''
j = 1
for i in range(0, n, j):
	if len(t) != 0:
		A += t[i]
		t = t[i + 1:]
		j += 1
	else:
		break
print(A)


import math
import os
import random
import re
import sys

def cpypher(s, n):
	i = 0
	l = []
	k = 1
	while i < n:
		l.append(s[i])
		i = i + k
		k = k + 1
	print(''.join(l))
	return
n = int(input())
x = input()
cpypher(x, n)


from math import sqrt

def nth(i):
	if i == 0:
		return i
	else:
		return nth(i - 1) + i + 1
n = int(input())
string = input()
s = int(-0.5 + sqrt(1 + 2 * n))
res = ''
for i in range(s):
	res += string[nth(i)]
print(res)


n = int(input())
t = input()
s = ''
numbers = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
for i in range(n):
	if i + 1 in numbers:
		s += t[i]
print(s)


s = input()
n = len(s)
res = ''
i = 0
if n % 2 == 1:
	res = s[0]
	s = s[1:]
	n = n - 1
while i < n / 2:
	res = s[i] + s[n - i - 1] + res
	i = i + 1
print(res)


n = int(input())
s = input()
t = ''
count = 2
i = 0
while i < n:
	t = t + s[i]
	i = i + count
	count = count + 1
print(t)


n = input()
s = input()
i = 0
cnt = 1
ans = ''
while i < len(s):
	ans += s[i]
	i += cnt
	cnt += 1
print(ans)


s = input()
w = []
l = []
q = len(s)
for i in range(len(s)):
	w.append(s[i])
if len(s) % 2 == 0:
	for i in range(len(s)):
		if i % 2 == 0:
			l.insert(0, w[len(s) - i // 2 - 1])
		else:
			l.insert(0, w[i // 2])
if len(s) % 2 != 0:
	for i in range(len(s)):
		if i % 2 != 0:
			l.insert(0, w[len(s) - i // 2 - 1])
		else:
			l.insert(0, w[i // 2])
s = ''
for i in range(q):
	s += l[i]
print(s)


import math
n = int(input())
st = input()
x = (-1 + math.sqrt(1 + 4 * 1 * 2 * n)) // 2
s = -1
for i in range(1, int(x + 1)):
	s = s + i
	print(st[s], end='')


n = int(input())
s = input()
if n % 2 == 0:
	t = int(n // 2)
else:
	t = n
a = 0
b = 0
list2 = []
list1 = []
for j in s:
	list1.append(j)
for j in range(1, t + 1):
	b += j
	for k in range(a, b):
		c = a
	list2.append(list1[c])
	a = b
	if b == len(s):
		break
d = list2[0]
for j in range(1, len(list2)):
	d += list2[j]
print(d)


t = input()
tmp1 = 0
if len(t) % 2 == 0:
	tmp1 = len(t) // 2 - 1
else:
	tmp1 = len(t) // 2
tmp2 = tmp1
final = ''
for i in range(len(t)):
	if i % 2 is 0:
		final += t[tmp2]
		tmp1 += 1
	else:
		final += t[tmp1]
		tmp2 -= 1
print(final)


n = int(input())
str = input()
i = 0
m = 1
actual_str = str[0]
w = 2
x = 1
while i < n:
	m += 1
	if m == 2:
		w = 2 * x
		i = i + w
		m = 0
		x += 1
	else:
		i += w
	if i < n:
		actual_str += str[i]
print(actual_str)


import sys
import math
n = int(input())
s = sys.stdin.readline().strip()
res = []
count = 1
L = (math.sqrt(1 + 8 * n) - 1) // 2
i = 0
while count <= L:
	res.append(s[i])
	i += count
	count += 1
es = ''.join(res)
print(es)


from fractions import gcd
from itertools import combinations, permutations, accumulate, product
from collections import deque, defaultdict, Counter
import decimal
import re
import math
import bisect
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7
from sys import stdin
readline = stdin.readline

def readInts():
	return list(map(int, readline().split()))

def readTuples():
	return tuple(map(int, readline().split()))

def I():
	return int(readline())
n = I()
s = input()
ans = ''
pos = 0
go = 1
while s:
	ans += s[pos]
	s = s[go:]
	go += 1
print(ans)


x = int(input())
s = input()
k = 0
i = 1
str1 = ''
while k < x:
	str1 += s[k]
	k += i
	i += 1
print(str1)


(_, s) = (input(), input().strip())
n = len(s)
i = 0
sr = ''
while s != '':
	sr += s[0]
	s = s[i + 1:]
	i += 1
print(sr)


from math import ceil
t = input()
s = ''
while t != '':
	x = ceil(len(t) / 2)
	s += t[x - 1:x + 1]
	t = t[:x - 1] + t[x + 1:]
print(s)


s = input()
kl = ''
dd = len(s) % 2
if dd:
	while len(s) > 1:
		kl = s[0] + kl
		kl = s[-1] + kl
		s = s[1:-1]
	print(s[0] + kl)
else:
	while len(s) > 1:
		kl = s[-1] + kl
		kl = s[0] + kl
		s = s[1:-1]
	print(kl)


s = input()
res = ''
x = len(s) // 2
if len(s) % 2 == 0:
	x -= 1
res += s[x]
for i in range(x):
	res += s[x + 1 + i]
	res += s[x - 1 - i]
if len(s) % 2 == 0:
	res += s[len(s) - 1]
print(res)


n = int(input())
s = input()
i = 0
a = 1
ans = ''
while i < n:
	ans = ans + s[i]
	i += a
	a += 1
print(ans)


n = list(input())
l = []
m = []
y = len(n)
if y % 2 == 0:
	for i in range(int(y / 2)):
		m.append(n[-1])
		m.append(n[0])
		n.pop(-1)
		n.pop(0)
	if len(n) > 0:
		m.append(n[0])
	for i in range(len(m) - 1, -1, -1):
		l.append(m[i])
	print(''.join(l))
if y % 2 == 1:
	for i in range(int(y / 2)):
		m.append(n[0])
		m.append(n[-1])
		n.pop(0)
		n.pop(-1)
	if len(n) > 0:
		m.append(n[0])
	for i in range(len(m) - 1, -1, -1):
		l.append(m[i])
	print(''.join(l))


n = int(input())
s = input()
pos = 0
i = 0
while pos < n:
	print(s[pos], end='')
	i += 1
	pos += i


n = int(input())
s = list(input())
res = []
i = 1
if n == 1:
	print(*s)
else:
	while len(s) > 1:
		res = res + [s[0]]
		del s[:i]
		i = i + 1
	print(''.join(res))


n = int(input())
a = input()
x = int(((8 * n + 1) ** (1 / 2) - 1) / 2)
step = range(x)
t = 0
ans = ''
for i in range(x):
	t += step[i]
	ans += a[t]
print(ans)


def getOriginal(str):
	ans = []
	while str:
		ans.append(str[:len(ans) + 1])
		str = str[len(ans):]
	ans = [i[0] for i in ans]
	return ''.join(ans)
n = int(input())
print(getOriginal(input().strip()))


n = int(input())
s = input()
s0 = ''
c = 0
for i in range(1, 11):
	if c > n - 1:
		break
	s0 += s[c]
	c += i
print(s0)


n = int(input())
s = input()
answ = ''
i = 0
for k in range(1, 11):
	if i >= n:
		break
	answ += s[i]
	i += k
print(answ)


length = int(input())
string = input()
decrypt = ''
i = 0
while len(string) > 0:
	decrypt += string[0]
	i += 1
	string = string[i:]
print(decrypt)


numberOfInputs = int(input())
word = input()
ans = ''
b = 0
i = 0
while b < len(word):
	ans += word[b]
	i += 1
	b += i
print(ans)


l = int(input())
n = ((1 + 8 * l) ** 0.5 - 1) / 2
t = input()
s = ''
c = 0
for i in range(1, int(n) + 1):
	s += t[c]
	c += i
print(s)


n = int(input())
s = str(input())
S = ''
j = 0
for i in range(1, n + 1):
	S = S + s[j]
	j = j + i
	if j >= n:
		break
print(S)


n = int(input())
s = input()
t = []
inc = int(0)
if 1 <= n and n <= 55 and (len(s) == n):
	i = 0
	while i < n:
		t.append(s[int(inc * (inc + 1) / 2)])
		inc = inc + 1
		i = int(inc * (inc + 1) / 2)
	str1 = ''.join((str(e) for e in t))
	print(str1)


t = input()
f = ''
if len(t) % 2 == 0:
	for i in range(len(t) // 2):
		f += t[-i - 1]
		f += t[i]
else:
	for i in range(len(t) // 2):
		f += t[i]
		f += t[-i - 1]
if len(t) % 2 == 1:
	f += t[len(t) // 2]
print(''.join(list(map(str, list(reversed(f))))))


n = int(input())
s = input()
step = 0
p = 0
decode = ''
while p < n:
	decode += s[p]
	step += 1
	p += step
print(decode)


n = int(input())
cipher = input()
decrypt = ''
j = 0
i = 0
while j < n:
	decrypt += cipher[j]
	i += 1
	j += i
print(decrypt)


kol = int(input())
string = input()
i = 0
kol1 = 0
while kol1 < kol:
	i += 1
	kol1 += i
answer = ''
lasti = 0
for j in range(i):
	lasti += j
	answer += string[lasti]
print(answer)


input()
dec = input()
j = 0
k = 0
lst = list(dec)
while j < len(lst):
	print(lst[j], end='')
	k += 1
	j = j + k


n = int(input())
s = input()
ans = ''
i = 2
index = 0
while index < len(s):
	ans += s[index]
	index = (i - 1) * i // 2
	i += 1
print(ans)


import math
n = int(input())
s = input()
indiceS = (int(math.sqrt(8 * n + 1)) - 1) // 2
respuesta = ''
for k in range(indiceS):
	respuesta += s[((2 * k + 1) ** 2 - 1) // 8]
print(respuesta)


a = input()
b = len(a)
c = []
for j in range(b):
	c.append(a[j])
d = []
if b % 2 == 0:
	while b > 0:
		if b % 2 == 0:
			d.append(c[b // 2 - 1])
			c.pop(b // 2 - 1)
			b = len(c)
		if b % 2 != 0:
			d.append(c[b // 2])
			c.pop(b // 2)
			b = len(c)
elif b % 2 != 0:
	while b > 0:
		if b % 2 != 0:
			d.append(c[b // 2])
			c.pop(b // 2)
			b = len(c)
		if b % 2 == 0 and b != 0:
			d.append(c[b // 2])
			c.pop(b // 2)
			b = len(c)
print(''.join(d))


N = int(input())
S = input()
i = 0
add = 1
while i < N:
	print(S[i], end='')
	i += add
	add += 1


n = int(input())
t = input()
s = ''
index = 0
for i in range(n):
	if index >= len(t):
		break
	s += t[index]
	index += i + 1
print(s)


s = str(input())
if len(s) <= 2:
	print(s)
else:
	first = (len(s) - 1) // 2
	s1 = s[first - 1::-1]
	s2 = list(s[first:])
	k = 2
	for i in range(len(s1)):
		s2.insert(k, s1[i])
		k += 2
	print(''.join(s2))


z = int(input())
n = input()
x = 0
s = ''
z = int((-1 + (1 + 8 * z) ** 0.5) / 2)
for i in range(z):
	x = i * (i + 1) / 2
	s += n[int(x)]
print(s)


input()
s = input()
i = 1
r = ''
while s:
	r += s[0]
	s = s[i:]
	i += 1
print(r)


t = input()
decoded = ''
if len(t) % 2 == 0:
	for i in range(len(t)):
		if i % 2 == 0:
			decoded += t[-1]
			t = t[:-1]
		else:
			decoded += t[0]
			t = t[1:]
else:
	for i in range(len(t)):
		if i % 2 != 0:
			decoded += t[-1]
			t = t[:-1]
		else:
			decoded += t[0]
			t = t[1:]
print(decoded[::-1])


n = int(input())
t = str(input())
s = ''
i = 0
num = 0
a = []
while i <= 10:
	num += i
	a.append(num)
	i += 1
index = 0
for i in range(a.index(n)):
	try:
		letter = t[index]
	except IndexError:
		print('error')
	s += letter
	index = index + i + 1
print(s)


v = ''
it = 0
si = 0
its = int(input())
s = input()
while si < its:
	it = it + 1
	v = v + s[si]
	si = si + it
print(v)


input()
s = input()
symbols = [0]
t = symbols[0]
while symbols[-1] + len(symbols) < len(s):
	symbols.append(symbols[-1] + len(symbols))
ans = ''
for i in symbols:
	ans += s[i]
print(ans)


from sys import stdin

def myfunction(n, string):
	i = 0
	j = 2
	while i < len(string):
		print(string[i], end='')
		i += j
		j += 1
	print()
n = int(stdin.readline().strip())
mystring = list(stdin.readline())
myfunction(n, mystring)


n = int(input())
t = input()
st = ''
i = 0
c = 1
while i < n:
	st += t[i]
	i += c
	c += 1
print(st)


input()
i = input()
ans = ''
(a, iter) = (1, 1)
while a <= len(i):
	ans += i[a - 1]
	a += iter
	iter += 1
print(ans)


n = int(input())
t = input()
s = ''
ctr = 0
for i in range(1, n):
	if ctr >= n:
		break
	s += t[ctr]
	ctr += i
if s == '':
	s += t
print(s)


s = int(input())
k = input()
f = 0
g = 0
d = ''
while g < s:
	d = d + k[g]
	f += 1
	g += f
print(d)


num = int(input())
s = input()
s = list(s)
a = []
temp = 0
for i in range(0, num):
	temp += i
	if temp > num - 1:
		break
	a.append(s[temp])
	print(s[temp], end='')


(n, s) = (int(input()), input())
t = ''
a = 1
i = 0
while i < n:
	t += s[i]
	i += a
	a += 1
print(t)


a = int(input())
b = int(0.5 * (-1 + (1 + 8 * a) ** 0.5))
c = []
d = list(input())
e = 0
for i in range(b):
	e += i
	c.append(d[e])
print(*c, sep='')


n = int(input())
s = input()
i = 0
l = 1
ans = ''
while i < n:
	ans += s[i]
	for j in range(i, i + l):
		i += 1
	l += 1
print(ans)


t = input()
a = []
n = len(t)
r = (n + 1) // 2
l = r - 1
for i in range(n):
	if i % 2:
		a.append(t[r])
		r += 1
	else:
		a.append(t[l])
		l -= 1
print(*a, sep='')


import sys
input = sys.stdin.read().split()
ciphertext = input[1]
tally = len(ciphertext)
charcount = 0
advancer = 1
plaintext = ''
while charcount < len(ciphertext):
	plaintext = plaintext + ciphertext[charcount]
	charcount = charcount + advancer
	advancer = advancer + 1
print(plaintext)


n = int(input())
code = input()
sum_c = 0
i = 1
ans = ''
while sum_c != n:
	ans = ans + code[sum_c]
	sum_c = sum_c + i
	i += 1
print(ans)


n = int(input())
i = 0
s = input()
sn = ''
ni = 1
while i != n:
	sn += s[i]
	i += ni
	ni += 1
print(sn)


a = int(input())
f = input()
s = 0
d = ''
j = 0
while a != 0:
	j += 1
	a -= 1 * j
	d = d + f[s]
	s += 1 * j
print(d)


s = input()
l = len(s)
answer = ''
if l % 2 == 0:
	s = s[::-1]
for i in range(l):
	answer += s[i // 2]
	s = s[::-1]
print(answer[::-1])


n = int(input())
s = input()
a = 0
i = 0
emp = ''
while a < n:
	emp += s[a]
	i += 1
	a = a + i
print(emp)


def Contar(n):
	disminuir = 1
	contador = 0
	while n > 0:
		n = n - disminuir
		disminuir = disminuir + 1
		contador = contador + 1
	return contador
n = int(input())
l = input()
newl = ''
N = Contar(n)
j = 1
contador = 0
while j < N + 1:
	newl = newl + l[contador]
	contador = contador + j
	j = j + 1
print(newl)


from collections import deque
from math import log, sqrt, ceil

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def li():
	return list(mi())
n = ii()
s = si()
s1 = ''
j = 1
k = 1
while j <= n:
	s1 += s[j - 1]
	k += 1
	j += k
print(s1)


s = list(input())
n = len(s)
l = []
if n % 2 == 0:
	st = 'pr'
	while len(s) > 0:
		if st == 'pr':
			l.append(s.pop())
			st = 'lev'
		else:
			l.append(s.pop(0))
			st = 'pr'
else:
	st = 'lev'
	while len(s) > 0:
		if st == 'pr':
			l.append(s.pop())
			st = 'lev'
		else:
			l.append(s.pop(0))
			st = 'pr'
l.reverse()
s = ''
for i in l:
	s += i
print(s)


number = int(input())
name = input()
counter = 0
for i in range(number):
	counter += i
	if counter == number:
		break
	print(name[counter], end='')


n = int(input())
s = input()
res = ''
i = 0
c = 1
while i < n:
	res += s[i]
	i += c
	c += 1
print(res)


s = input()
s_new = ''
k = len(s)
if k % 2 != 0:
	for i in range(k // 2):
		s_new += s[i]
		s_new += s[k - i - 1]
	s_new += s[k // 2]
elif k % 2 == 0:
	for i in range(k // 2):
		s_new += s[k - 1 - i]
		s_new += s[i]
s_new = s_new[::-1]
print(s_new)


a = int(input())
b = input()
c = [i for i in b]
d = []
i = 0
while i * (i + 1) // 2 < a:
	e = c[i * (i + 1) // 2]
	d.append(e)
	i = i + 1
print(*d, sep='')


a = input()
b = input()
p = 0
i = 1
final = ''
while p < int(a):
	final = final + b[p]
	p = p + i
	i = i + 1
print(final)


raw_input = input
n = int(raw_input())
s = raw_input()
ans = ''
i = 0
temp = 1
while i < n:
	ans += s[i]
	i += temp
	temp += 1
print(ans)


n = int(input())
st = input()
t = 0
es = ''
for i in range(n):
	try:
		es += st[t + i]
		t += i
	except IndexError:
		break
print(es)


n = int(input())
a = input()
k = 0
if n == 1:
	print(a)
else:
	for i in range(1, len(a)):
		print(a[k], end='')
		k += i
		kek = 1
		if k >= len(a):
			break


n = int(input())
s = input()
a = 0
b = 0
for i in range(n):
	if i + b >= n:
		break
	print(s[i + b], end='')
	a += 1
	b += a
print()


s = list(input())
number = (len(s) + 1) // 2
word = ''
t = (len(s) + 1) // 2 - 1
k = 1
word += s[t]
if len(s) % 2 == 0:
	for i in range((len(s) + 1) // 2):
		word += s[t + k]
		word += s[t - k]
		k += 1
	print(word[:len(word) - 1])
	quit()
for i in range(len(s) // 2):
	word += s[t + k]
	word += s[t - k]
	k += 1
print(word[:len(word)])
quit()


n = int(input())
s = input()
i = 0
x = 0
while x < n:
	print(s[x], end='')
	i += 1
	x = i * (i + 1) // 2


n = int(input())
encrypted = input()
count = 1
start = 0
ans = ''
while start < n:
	end = start + count
	word = encrypted[start:end]
	ans = ans + word[0]
	count = count + 1
	start = end
print(ans)


n = int(input())
s = input()
S = list(s)
a = 1
while a * (a + 1) / 2 <= n:
	b = int(a * (a + 1) / 2)
	print(S[b - 1], end='')
	a = a + 1


num = int(input())
s_tr = input()
(a1, a2, a3) = (0, 0, 0)
if num == 1:
	print(s_tr)
else:
	while a3 < num:
		print(s_tr[a3], end='')
		a1 = a3
		a2 += 1
		a3 = a1 + a2


n = int(input())
a = input()
b = []
i = 1
c = 0
while i < n + 1:
	c = c + 1
	b.append(a[i - 1])
	i = i + c
print(''.join(b))


t = int(input())
arr = input()
i = 0
gap = 1
while i < t:
	print(arr[i], end='')
	i += gap
	gap += 1


n = int(input())
t = list(input())
item = [0]
ans = []
for i in range(1, n):
	if item[i - 1] < n:
		item.append(item[i - 1] + i)
	else:
		break
for j in item:
	try:
		ans.append(t[j])
	except:
		pass
print(''.join(ans))


s = input()
a = len(s) % 2
ans = ''
for i in range(len(s)):
	if not a:
		ans = s[-1] + ans
		s = s[:-1]
		a = 1
	else:
		ans = s[0] + ans
		s = s[1:]
		a = 0
print(ans)


input()
s = input()
(index, count) = (0, 1)
ans = ''
while index < len(s):
	ans += s[index]
	index += count
	count += 1
print(ans)


n = int(input())
s = list(input())
j = 0
for i in range(1, n + 1):
	j += i
	try:
		print(s[j - 1], end='')
	except:
		break
print()


t = int(input())
s = input()
l = []
r = ((1 + 8 * t) ** 0.5 - 1) // 2
for i in range(int(r)):
	l.append(i * (i + 1) // 2)
e = ''
for i in l:
	e += s[i]
print(e)


n = int(input())
s = input()
k = 0
c = 1
while k != n:
	print(s[k], end='')
	k = c * (c + 1) // 2
	c = c + 1


import math
m = input()
x = 0
length = len(m)
for i in range(length):
	if i % 2 == 0:
		x += i * -1
	else:
		x += i
	print(m[math.ceil(length / 2) - 1 + x], end='')


s = list(input())
l = ''
n = len(s)
if n % 2 != 0:
	k = 0
else:
	k = -1
while s:
	l += s.pop(k)
	if k == 0:
		k = -1
	else:
		k = 0
l = l[::-1]
print(l)


from math import sqrt
n = int(input())
N = int((-1 + sqrt(1 + 8 * n)) // 2)
s = input()
for i in range(1, N + 1):
	el = s[0:i]
	s = s[i:]
	print(el[0], end='')


length = int(input())
word = input()
index = 0
counter = 0
result = ''
while index < length:
	result += word[index]
	counter += 1
	index += counter
print(result)


n = input()
n = int(n)
t = input()
s = ''
k = 1
kolvo = 0
while k <= n:
	kolvo = kolvo + k
	s = s + t[kolvo - 1]
	n = n - k
	k = k + 1
print(s)


n = int(input())
s = input()
l = 0
k = 0
s1 = ''
while l != len(s):
	s1 += s[l]
	k += 1
	l += k
print(s1)


a = int(input())
b = input()
k = 1
d = ''
i = 0
while i != a:
	d += b[i]
	i += 1 * k
	k += 1
print(d)


import math
length = int(input())
s = input()
m = math.floor(math.sqrt(length * 2))
result = str()
for i in range(m):
	result += s[i * (i + 1) // 2]
print(result)


n = int(input())
inp = input()
res = ''
curr = 0
c = 1
while curr < n:
	res += inp[curr]
	curr += c
	c += 1
print(res)


n = int(input())
s = input()
l = list(s[::-1])
i = 1
d = ''
while len(l) > 0:
	d += l[len(l) - 1]
	for _ in range(i):
		l.pop()
	i += 1
print(d)


s = input()
n = len(s)
x = n // 2
ost = n % 2
result = []
for i in range(n):
	if i % 2 == ost:
		result.append(s[-(i // 2) - 1])
	else:
		result.append(s[i // 2])
print(''.join(reversed(result)))


import math
import sys
s = input()
n = len(s)
if n % 2 == 0:
	st = n // 2 - 1
else:
	st = n // 2
otv = s[st]
for i in range(1, st + 1):
	otv += s[st + i]
	otv += s[st - i]
if (n - 1) % 2 != 0:
	otv += s[n - 1]
print(otv)


x = input()
answer = ''
if len(x) % 2 == 0:
	x = list(x)
	answer += x.pop(len(x) // 2 - 1)
	while x:
		if len(answer) % 2 == 1:
			answer += x.pop(len(x) // 2)
		else:
			answer += x.pop(len(x) // 2 - 1)
else:
	x = list(x)
	answer += x.pop(len(x) // 2)
	while x:
		if len(answer) % 2 == 1:
			answer += x.pop(len(x) // 2)
		else:
			answer += x.pop(len(x) // 2)
print(answer)


num = int(input(''))
str = input('')
ran = 1
j = 0
while j < num:
	print(str[j], end='')
	j = j + ran
	ran = ran + 1


s = input()
t = len(s) // 2
if len(s) & 1 == 0:
	t -= 1
if t < 0:
	t = 0
print(s[t], end='')
temp = 1
while t >= 0:
	t += temp
	if t < len(s):
		print(s[t], end='')
	temp += 1
	t -= temp
	if t >= 0:
		print(s[t], end='')
	temp += 1


n = int(input())
a = input()
i = 1
s = ''
f = ''
while a != '':
	for ii in range(0, i):
		f = f + a[ii]
	s = s + a[0]
	a = a.replace(f, '', 1)
	f = ''
	i = i + 1
print(s)


n = int(input())
s = input()
for i in range(1, n + 1):
	summ = 0
	for j in range(1, i + 1):
		summ += j
	if summ == n:
		ans = ''
		p = 0
		part = 1
		while p < len(s):
			ans += s[p]
			p += part
			part += 1
		print(ans)


input()
A = input()
i = 1
b = ''
while A:
	b += A[0]
	A = A[i:]
	i += 1
print(b)


def solve(s):
	s = list(s)
	t = ''
	l = False if len(s) % 2 == 0 else True
	while s:
		t += s.pop(0) if l else s.pop(-1)
		l ^= 1
	return t[::-1]

def main():
	s = input()
	print(solve(s))
main()


n = int(input())
t = input()
s = ''
k = r = 0
while k != n:
	r += 1
	k += r
k = 0
for i in range(r):
	k += i
	s += t[k]
print(s)


x = input()
y = input()
if int(x) == len(y):
	i = 0
	m = 1
	s = ''
	while i < len(y):
		i = i + m
		m += 1
		s = s + y[i - 1]
	print(s)


import math

def modi(a, m):
	return pow(a, m - 2, m)
n = int(input())
s = str(input())
i = 0
j = 1
ans = ''
while i < n:
	ans += s[i]
	i += j
	j += 1
print(ans)


input()
t = input()
n = len(t)
res = ''
i = 0
while i * (i + 1) // 2 < n:
	res += t[i * (i + 1) // 2]
	i += 1
print(res)


from operator import itemgetter
n = int(input())
s = input()
i = 0
inc = 1
ans = ''
while i < n:
	ans += s[i]
	i += inc
	inc += 1
print(ans)


def cipher():
	d = []
	for n in range(11):
		d.append(n * (n + 1) >> 1)
	n = int(input())
	line = str(input())
	for i in range(len(d)):
		if d[i] < len(line):
			print(line[d[i]], end='')
	print()
cipher()


n = int(input())
f = str(input())
f = list(f)
g = []
i = 0
k = 1
while i < len(f):
	g.append(f[i])
	i = i + k
	k = k + 1
print(*g, sep='')


def sol(s):
	n = len(s)
	i = 0
	gap = 1
	while i < n:
		print(s[i], end='')
		i += gap
		gap += 1
n = int(input())
s = input()
sol(s)


_len_str = input()
len_str = int(_len_str)
enc_str = input()
un_enc_str = list()
index_plus = 0
if len_str == 1:
	print(enc_str[0])
else:
	for i in range(0, len_str - 1):
		index_plus = int(i * (i + 1) / 2)
		if index_plus >= len_str:
			break
		un_enc_str.append(enc_str[index_plus])
un_enc_str = ''.join(un_enc_str)
print(un_enc_str)


n = int(input())
t = input()
l = int((-1 + (1 + 8 * n) ** (1 / 2)) // 2)
j = 0
for i in range(l):
	j = i + j
	print(t[j], end='')


from math import *
n = int(input())
s = input()
ns = ''
l = (round((1 + 8 * n) ** 0.5) - 1) // 2
while n != 0:
	ns += s[n - 1]
	n -= l
	l -= 1
print(ns[::-1])


a = input()
a = list(a)
s = []
for i in range(len(a)):
	if len(a) % 2 == 0:
		if i % 2 == 0:
			continue
		else:
			a.insert(len(a) - i, a[0])
			del a[0]
	elif i % 2 == 0:
		a.insert(len(a) - i, a[0])
		del a[0]
	else:
		continue
print(''.join(a))


n = input()
p = ''
bv = 0
if len(n) % 2 == 0:
	for i in range(len(n) // 2):
		u = n[len(n) - 1 - i] + n[i]
		p += u
elif len(n) % 2 != 0:
	if len(n) > 1:
		for j in range(len(n) // 2):
			u = n[j] + n[len(n) - 1 - j]
			p += u
		p += n[len(n) // 2]
	else:
		print(n)
		bv += 1
if bv == 0:
	z = ''
	for k in range(len(n) - 1, -1, -1):
		z += p[k]
	print(z)


from sys import stdin
n = int(stdin.readline())
input_str = stdin.readline().strip()
count = 1
temp = ''
ls = list(input_str)
while len(ls) != 0:
	temp = temp + ls[0]
	for x in range(0, count):
		del ls[0]
	count = count + 1
print(temp)


n = int(input())
s = input()
ll = list(s)
ss = ''
l = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
m = l.index(n) + 1
for i in range(m):
	ss += ll[i]
	del ll[:i + 1]
print(ss)


t = int(input())
s = list(input())
l = len(s)
i = 0
j = 1
f = []
while i < l:
	f.append(s[i])
	j = j + 1
	i = i + j
print(''.join(f))


length = int(input())
s = input()
L = [1]
for i in range(2, 11):
	L.append(L[-1] + i)
real = L.index(length) + 1
ans = []
for i in range(real):
	ans.append(s[L[i] - 1])
print(''.join(ans))


n = int(input())
e = input()
s = ''
i = 0
c = 1
while i < n:
	s += e[i]
	i += c
	c += 1
print(s)


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest

def binNumber(n, size):
	return bin(n)[2:].zfill(size)

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())
n = ini()
s = sti()
sp = ''
i = 0
m = 1
while i < n:
	m += 1
	sp += s[i]
	i += m
print(sp)


n = int(input())
a = input()
q = ''
w = 0
e = 1
while w < n:
	q += a[w]
	w += e
	e += 1
print(q)


n = int(input())
s = input()
k = 1
while len(s):
	j = s[:k]
	s = s[k:]
	k += 1
	print(j[0], end='')


n1 = int(input())
str = input()
j = 0
for var in range(n1):
	if j >= n1:
		break
	j = var + j
	print(str[j], end='')
	j += 1


def go():
	n = int(input())
	a = [i for i in input()]
	i = 0
	j = 1
	o = ''
	while i < n:
		o += a[i]
		i += j
		j += 1
	return o
print(go())


n = int(input())
s = input()
gap = 1
ind = 0
while ind < n:
	print(s[ind], end='')
	ind += gap
	gap += 1


n = int(input())
s = list(str(input()))
ans = ''
specialNumber = 1
while len(s) > 0:
	ans += s[0]
	if specialNumber == len(s):
		s = []
	else:
		s = s[specialNumber:]
	specialNumber += 1
print(ans)


k = int(input())
st = input()
c = 0
s = 0
while s < k:
	print(st[s], end='')
	c += 1
	s += c


import math
s = input()
var = math.ceil(len(s) / 2) - 1
r = var + 1
l = var - 1
k = s[var]
while len(k) != len(s):
	if r <= len(s) - 1:
		k += s[r]
	if l >= 0:
		k += s[l]
	r += 1
	l -= 1
print(k)


inp = int(input())
x = list(input())
i = 0
cnt = 0
res = []
while i < inp:
	cnt += 1
	res.append(x[i])
	i += cnt
print(''.join(res))


a = input()
l = len(a)
rez = ''
if l % 2 == 1:
	for i in range(1, l + 1):
		if i % 2 != 1:
			rez = a[-i // 2] + rez
		else:
			rez = a[(i - 1) // 2] + rez
else:
	for i in range(1, l + 1):
		if i % 2 == 1:
			rez = a[-i // 2] + rez
		else:
			rez = a[(i - 1) // 2] + rez
print(rez)


t = int(input())
s = input()
i = 1
sum = 0
while sum < t:
	sum += i
	i = i + 1
i = i - 1
sum = 0
for j in range(i):
	sum += j
	print(s[sum], end='')


st1 = input()
st = []
for i in range(len(st1)):
	st.append(st1[i])
res = ''
stk = []
fl = True
if len(st) % 2 == 0:
	cur = len(st) // 2
else:
	cur = len(st) // 2 + 1
m = cur
i = 1
while len(stk) != len(st):
	stk.append(st[cur - 1])
	if fl == True:
		cur += m - cur + i
		fl = False
	else:
		cur += m - cur - i
		fl = True
		i += 1
for i in range(len(stk)):
	res += stk[i]
print(res)


n = int(input())
c = 0
i = 0
l = input()
while 1:
	print(l[i], end='')
	c = c + 1
	i = i + c
	if i < n:
		pass
	else:
		break


a = int(input())
b = list(input())
i = 0
c = 0
while i + c < a:
	print(b[i + c], end='')
	c += 1
	i += c
print()


pituus = int(input())
salaus = input()
kirjainlista = []
i = 0
lisaaja = 0
while i < pituus:
	kirjainlista.append(salaus[i])
	lisaaja += 1
	i += lisaaja
for kirjain in kirjainlista:
	print(kirjain, end='')


s = input()
if len(s) % 2 == 0:
	i = len(s) // 2 - 1
	j = len(s) // 2
	while i >= 0:
		print(s[i] + s[j], end='')
		i -= 1
		j += 1
else:
	i = len(s) // 2 - 1
	j = len(s) // 2 + 1
	print(s[len(s) // 2], end='')
	while i >= 0:
		print(s[j] + s[i], end='')
		i -= 1
		j += 1


n = int(input())
s = str(input())
c = 0
d = ''
i = 0
while i < len(s):
	c = c + i
	if c > len(s) - 1:
		break
	else:
		d = d + s[c]
	i = i + 1
print(d)


t = input()
if len(t) == 1:
	print(t)
elif len(t) % 2 == 0:
	a = int(len(t) / 2)
	t1 = t[-a - 1::-1]
	t2 = t[a:]
	s = ''
	for i in range(len(t1)):
		s += t1[i] + t2[i]
	print(s)
else:
	a = int(len(t) / 2)
	t1 = t[a - 1::-1]
	t2 = t[a + 1:]
	s = ''
	s += t[a]
	for i in range(len(t1)):
		s += t2[i] + t1[i]
	print(s)


nbr = int(input())
s = input()
res = ''
res = res + s[0]
i = 1
cpt = 2
while i < nbr:
	res += s[i]
	i = i + cpt
	cpt += 1
print(res)


import sys
input = sys.stdin.readline
n = int(input())
a = input()
x = 0
j = 1
ans = []
while x < n:
	ans.append(a[x])
	x += j
	j += 1
print(''.join(ans))


n = int(input())
a = input()
sum = 0
b = []
c = ''
for i in range(n):
	sum += i
	if sum < n:
		b.append(a[sum])
for i in range(len(b)):
	c += b[i]
print(c)


s = input()
res = ''
n = len(s)
m = n // 2
if n % 2 == 0:
	for i in range(m):
		res = s[i] + s[n - i - 1] + res
else:
	for i in range(m):
		res = s[n - i - 1] + s[i] + res
	res = s[n // 2] + res
print(res)


len = int(input())
s = input()
n = 0
while n * (n + 1) // 2 < len - 1:
	print(s[n * (n + 1) // 2], end='')
	n += 1
print(s[0] if n == 0 else '')


n = int(input())
s = input()
a = ''
i = j = 0
while j < n:
	j += i
	if j < n:
		a += s[j]
	i += 1
print(a)


n = int(input())
a = input()
b = ''
f = 1
s = 0
while n:
	b += a[s]
	s += f
	n -= f
	f += 1
print(b)


input()
encrypted = input()
decrypted = ''
i = 0
counter = 2
while i <= len(encrypted) - 1:
	decrypted += encrypted[i]
	i += counter
	counter += 1
print(decrypted)


n = int(input())
s = input()
i = 0
j = 1
a = []
while True:
	f = s[i:i + 1]
	i = i + j
	j += 1
	a.append(f)
	if i >= len(s):
		break
print(''.join(a))


s = input()
c = len(s)
n = (c - 1) // 2
ans = [''] * c
ans[0] = s[n]
(j, l) = (1, 2)
for i in range(n + 1, c):
	ans[j] = s[i]
	j += 2
for k in range(n - 1, -1, -1):
	ans[l] = s[k]
	l += 2
print(''.join(ans))


import math
n = int(input())
s = input()
c = int((math.sqrt(1 + 8 * n) - 1) // 2)
for i in range(1, c + 1):
	print(s[0], end='')
	s = s[i:]
print()


s = input()
s2 = [' '] * len(s)
if len(s) % 2 == 0:
	j = len(s) - 1
	for i in range(len(s) - 1, -1, -2):
		s2[i] = s[j]
		j -= 1
	for i in range(0, len(s) - 1, 2):
		s2[i] = s[j]
		j -= 1
else:
	j = len(s) - 1
	for i in range(len(s) - 2, -1, -2):
		s2[i] = s[j]
		j -= 1
	for i in range(0, len(s), 2):
		s2[i] = s[j]
		j -= 1
print(''.join(s2))


s = input()
if len(s) % 2:
	k = len(s) // 2
else:
	k = len(s) // 2 - 1
ans = s[k]
(l, r) = (k - 1, k + 1)
cur = 1
while l >= 0 or (r <= len(s) - 1 and len(s) > 1):
	if cur and r <= len(s) - 1:
		ans += s[r]
		r += 1
		cur = not cur
	else:
		ans += s[l]
		l -= 1
		cur = not cur
print(ans)


n = int(input())
s = input()
i = 1
r = ''
c = 0
while c < n:
	r = r + s[c]
	i = i + 1
	c = c + i
print(r)


from math import sqrt
num = int(input())
st = input()
ans = str()
ran = int((sqrt(1 + 8 * num) - 1) / 2)
for i in range(1, ran + 1):
	index = int((i * i + i - 2) / 2)
	ans += st[index]
print(ans)


m = int(input())
a = input()
i = 0
next = 0
while True:
	next = i + next
	try:
		print(a[next], end='')
	except:
		break
	i += 1


string = input()
if len(string) % 2 == 0:
	length = len(string) - 1
else:
	length = len(string)
i = 0
first = []
second = []
while length != 1:
	first.append(string[i])
	length = length - 2
	i += 1
first.append(string[i])
i = i + 1
length = len(string)
while i < length:
	second.append(string[i])
	i += 1
answer = []
k = 0
j = len(first) - 1
if len(string) % 2 == 1:
	while j > 0 and k < len(first):
		answer.append(first[j])
		answer.append(second[k])
		j -= 1
		k += 1
	answer.append(first[0])
else:
	while j > -1 and k < len(first):
		answer.append(first[j])
		answer.append(second[k])
		j -= 1
		k += 1
i = 0
while i < len(answer):
	print(answer[i], end='')
	i += 1


import _collections
s = _collections.deque(input())
n = len(s)
a = [''] * n
if n % 2 == 0:
	for i in range(n):
		if i % 2 == 0:
			x = s.pop()
			a[n - i - 1] = x
		else:
			x = s.popleft()
			a[n - i - 1] = x
else:
	for i in range(n):
		if i % 2 == 1:
			x = s.pop()
			a[n - i - 1] = x
		else:
			x = s.popleft()
			a[n - i - 1] = x
print(*a, sep='')


n = int(input())
s = input()
l = []
count = 1
it = 1
for i in range(1, len(s) + 1):
	if i == count:
		l.append(s[i - 1])
		it += 1
		count += it
print(''.join(l))


st = list(input())
ans_st = st[(len(st) + 1) // 2 - 1]
st.pop((len(st) + 1) // 2 - 1)
if len(st) % 2 == 1:
	for index in range(len(st.copy())):
		ans_st += st[(len(st) + 1) // 2 - 1]
		st.pop((len(st) + 1) // 2 - 1)
else:
	for index in range(len(st.copy())):
		ans_st += st[len(st) // 2]
		st.pop(len(st) // 2)
print(ans_st)


n = int(input())
string = input()
a = 0
ans = ''
i = 0
while a < n:
	ans += string[a]
	i += 1
	a += i
print(ans)


def repCipher(n, s):
	ns = ''
	(i, j) = (0, 0)
	while j <= n - 1:
		ns += s[j]
		i += 1
		j += i
	return ns
n = int(input())
s = input()
print(repCipher(n, s))


class CodeforcesTask1095ASolution:

	def __init__(self):
		self.result = ''
		self.word_len = 0
		self.encrypted = ''

	def read_input(self):
		self.word_len = int(input())
		self.encrypted = input()

	def process_task(self):
		result = ''
		pos = 0
		x = 1
		while pos < self.word_len:
			result += self.encrypted[pos]
			pos += x
			x += 1
		self.result = result

	def get_result(self):
		return self.result
Solution = CodeforcesTask1095ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
s = input()
dec = ''
i = 0
count = 1
while i < n:
	dec += s[i]
	i += count
	count += 1
print(dec)


import math
n = int(input())
x = input()
b = math.sqrt(1 + 8 * n)
k = int((-1 + b) / 2)
l = []
m = 0
for i in range(1, k + 1):
	l.append(x[0 + m])
	m += i
l = ''.join(l)
print(l)


a = int(input())
b = str(input())
i = 0
n = 2
while i < a:
	print(b[i], end='')
	i = i + n
	n += 1


n = int(input())
s = input()
i = 0
jump = 1
while i < len(s):
	print(s[i], end='')
	i += jump
	jump += 1


t = input()
j = len(t)
g = __import__('math').ceil(j / 2) - 1
print = __import__('sys').stdout.write
p = g + 1
e = True
try:
	while True:
		if e:
			if g < 0:
				raise Exception('sdaf')
			print(t[g])
			g -= 1
			e = False
		else:
			print(t[p])
			p += 1
			e = True
except Exception:
	pass


n = list(input())
s = ''
if len(n) % 2 == 0:
	while n != []:
		s += n[-1]
		n.pop(-1)
		if n == []:
			break
		s += n[0]
		n.pop(0)
else:
	while n != []:
		s += n[0]
		n.pop(0)
		if n == []:
			break
		s += n[-1]
		n.pop(-1)
print(s[::-1])


n = int(input())
s = input()
count = 1
i = 0
while i < n:
	print(s[i], end='')
	i += count
	count += 1


a = input()
if len(a) % 2 == 0:
	ind = int(len(a) / 2 - 1)
else:
	ind = int(len(a) / 2)
b = a[ind]
right = 0
left = 0
for i in range(len(a) - 1):
	if i % 2 == 0:
		right += 1
		b = b + a[ind + right]
	else:
		left += 1
		b = b + a[ind - left]
print(b)


n = int(input())
s = list(input())
k = 2
b = 0
st = s[0]
while b < n - 1:
	st = st + s[b + k]
	b = b + k
	k = k + 1
print(st)


n = int(input())
s = input()
itog = ''
i = 0
k = 1
while i < len(s):
	itog += s[i]
	i += k
	k += 1
print(itog)


x = int(input())
c = input()
A = list(c)
i = 0
j = 1
B = []
while i < x:
	temp = A[i]
	B.append(temp)
	j += 1
	i += j
s = ''
print(s.join(B))


n = int(input())
arr = input()
ans = ''
l = len(arr)
t = 0
add = 1
while t < l:
	ans += arr[t]
	t += add
	add += 1
print(ans)


s = input()
l = list(s)
mid = len(l) // 2
if len(l) % 2 == 0:
	lf = list(s[:mid - 1])
	ls = list(s[mid:])
	lf.reverse()
	sm = str(l[mid - 1])
	fs = ''
	for i in range(min(len(ls), len(lf))):
		fs = fs + str(ls[i]) + str(lf[i])
	print(sm + fs + str(ls[-1]))
if len(l) % 2 != 0:
	lf = list(s[:mid])
	ls = list(s[mid + 1:])
	lf.reverse()
	sm = str(l[mid])
	fs = ''
	for i in range(min(len(ls), len(lf))):
		fs = fs + str(ls[i]) + str(lf[i])
	print(sm + fs)


n = int(input())
from collections import Counter
s = input()
x = ''
if n == 1:
	print(s)
t = 0
x = 0
y = 0
j = []
h = [3, 6, 10, 15, 21, 28, 36, 45, 55]
if n in h:
	for i in range(0, len(s)):
		x = x + i
		y = y + i + 1
		x1 = s[x:y]
		if len(Counter(x1)) == 1:
			k = list(dict(Counter(x1)).keys())
			j.append(k[0])
		elif len(Counter(x1)) != 1:
			break
		if y == len(s):
			break
	print(''.join(j))


a = int(input())
t = int((-1 + (1 + 8 * a) ** 0.5) / 2)
s = input()
ss = ''
for i in range(1, t + 1):
	k = int((1 + i) * i / 2)
	if s[k - 1] * i == s[k - i:k]:
		ss += s[k - 1]
print(ss)


class Main:

	def __init__(self):
		n = int(input())
		t = input()
		encrypt = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
		s = ''
		i = 0
		for count in encrypt:
			if i < n:
				s += t[i]
				i += count
		print(s)
Main()


n = int(input())
a = input()
b = [i for i in a]
c = ''
(count, i) = (1, 0)
while i < n:
	c = c + b[i]
	i += count
	count += 1
print(c)


import math
n = int(input())
s = input()
s1 = ''
c = 1
for i in range(1, n + 1):
	s1 = s1 + s[c - 1]
	c = c + i
	if c > len(s):
		break
print(s1)


n = int(input())
t = input()
num = 1
i = 0
ans = ''
while i < n:
	ans += t[i]
	i += num
	num += 1
print(ans)


def Ordenar(cadena1, cadena2, size):
	if len(cadena1) == 0:
		return cadena2
	elif size % 2 == 0:
		cadena2.append(cadena1.pop(int((len(cadena1) - 1) / 2)))
		Ordenar(cadena1, cadena2, size)
	else:
		cadena2.append(cadena1.pop(int(len(cadena1) / 2)))
		Ordenar(cadena1, cadena2, size)
S = input()
Saux = []
cadena = []
for letra in S:
	Saux.append(letra)
Ordenar(Saux, cadena, len(S))
str1 = ''.join(cadena)
print(str1)


n = int(input())
s = input()
i = 0
ind = i
d = ''
while ind < len(s):
	d += s[ind]
	i += 1
	ind += i
print(d)


l = input()
res = ''
if len(l) <= 1:
	print(l)
elif len(l) % 2 != 0:
	while len(l) > 0:
		res += l[0]
		l = l[1:]
		if len(l) > 0:
			res += l[-1]
			l = l[:-1]
		else:
			break
else:
	while len(l) > 0:
		res += l[-1]
		l = l[:-1]
		if len(l) > 0:
			res += l[0]
			l = l[1:]
		else:
			break
print(res[::-1])


n = int(input())
s = input()
x = ''
i = -1
c = 1
while i < n - c:
	i += c
	c += 1
	x += s[i]
print(x)


a = int(input())
b = input()
if len(b) == 1:
	print(b[0])
elif len(b) == 3:
	print(b[0], b[1], sep='')
elif len(b) == 6:
	print(b[0], b[1], b[3], sep='')
elif len(b) == 10:
	print(b[0], b[1], b[3], b[6], sep='')
elif len(b) == 15:
	print(b[0], b[1], b[3], b[6], b[10], sep='')
elif len(b) == 21:
	print(b[0], b[1], b[3], b[6], b[10], b[15], sep='')
elif len(b) == 28:
	print(b[0], b[1], b[3], b[6], b[10], b[15], b[21], sep='')
elif len(b) == 36:
	print(b[0], b[1], b[3], b[6], b[10], b[15], b[21], b[28], sep='')
elif len(b) == 45:
	print(b[0], b[1], b[3], b[6], b[10], b[15], b[21], b[28], b[36], sep='')
else:
	print(b[0], b[1], b[3], b[6], b[10], b[15], b[21], b[28], b[36], b[45], sep='')


n = int(input())
s = input()
i = 0
summ = 0
l = []
while summ < n:
	i += 1
	summ += i
	l.append(summ)
result = ''.join([s[i - 1] for i in l])
print(result)


n = int(input())
s = input()
r = int(-1 + (1 + 4 * n * 2) ** 0.5) // 2
for i in range(r):
	print(s[i * (i + 1) // 2], end='')


t = int(input())
s = input()
k = 0
for j in range(0, len(s)):
	try:
		k = k + j
		print(s[k], end='')
	except:
		break


n = int(input())
s = input()
i = 0
p = 2
arr = []
a = []
for c in s:
	arr.append(c)
while i < len(arr):
	a.append(arr[i])
	i += p
	p += 1
joined_string = ''.join([str(v) for v in a])
print(joined_string)


n = int(input())
codedString = input()
decodedString = ''
for i in range(n):
	a = i * (i + 1) // 2
	if a < n:
		decodedString += codedString[a]
print(decodedString)


n = int(input())
s = input()
res = ''
k = 0
d = 2
while k < n:
	res += s[k]
	k += d
	d += 1
print(res)


def main():
	count = int(input())
	encrypt = input()
	tot = 0
	start = 1
	string = ''
	while tot != count:
		string += encrypt[tot]
		tot += start
		start += 1
	print(string)
main()


n = int(input())
s = input()
l = []
c = 0
t = 0
for i in s:
	c += 1
	t += c
	if t <= n:
		l.append(s[t - 1])
print(''.join(l))


n = int(input())
s = str(input())
x = 0
i = 0
while True:
	i += 1
	x += i
	try:
		print(s[x - 1], end='')
	except:
		break


import math
n = int(input())
tri = [int(i * (i + 1) / 2) for i in range(0, 60)]
length = int((math.sqrt(1 + 8 * n) - 1) // 2)
s = input()
ans = ''
for i in range(0, length):
	ans += s[tri[i]]
print(ans)


n = int(input())
s = input()
i = 0
a = []
t = 0
while i < len(s):
	a.append(s[i])
	t += 1
	i = i + t
for t in a:
	print(t, end='')


n = int(input())
t = input()
s = ''
for i in range(1, n):
	x = i * (i + 1) / 2
	x = x - 1
	x = int(x)
	if x < n:
		s = s + t[x]
	else:
		break
if n == 1:
	print(t)
else:
	print(s)


n = int(input())
s = [i for i in input()]
res = ''
i = 0
p = 1
while i < n:
	res += s[i]
	i = p * (p + 1) // 2
	p += 1
print(res)


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	n = int(input())
	s = input().strip()
	i = 0
	op = []
	flag = 0
	while i < n:
		op.append(s[i])
		flag += 1
		i += flag
	print(*op, sep='')
main()


import sys, math
word = input()
center = int(math.ceil(len(word) / 2))
if len(word) <= 2:
	print(word)
	sys.exit()
right_letters = []
left_letters = []
for i in range(0, center - 1):
	left_letters.append(word[i])
for i in range(center, len(word)):
	right_letters.append(word[i])
left_index = 0
right_index = 0
ans = ''
if len(word) % 2 != 0:
	for i in range(0, len(right_letters)):
		ans = ans + right_letters[i] + left_letters[len(left_letters) - i - 1]
	print(word[center - 1] + ans)
	sys.exit()
for i in range(0, len(right_letters)):
	if i != len(right_letters) - 1:
		ans = ans + right_letters[i] + left_letters[len(left_letters) - i - 1]
print(word[center - 1] + ans + right_letters[len(right_letters) - 1])


n = int(input())
s = input()
k = []
f = 0
i = 0
while i != len(s):
	k.append(s[i])
	f += 1
	i += f
print(*k, sep='')


n = int(input())
g = input()
i = 0
c = 1
while i < n:
	print(g[i], end='')
	c += 1
	i += c


a = input()
c = len(a)
if c % 2 == 0:
	s = a[c // 2 - 1]
	left = a[:c // 2 - 1][::-1]
	right = a[c // 2:]
else:
	s = a[c // 2]
	left = a[:c // 2][::-1]
	right = a[c // 2 + 1:]
for i in range(c // 2):
	if i < len(right):
		s += right[i]
	if i < len(left):
		s += left[i]
print(s)


input()
s = str(input())
index = 0
gap = 1
while index < len(s):
	print(s[index], end='')
	index += gap
	gap += 1


num = input()
str = input()
result = ''
pass_limit = 0
pass_cnt = 0
for s in str:
	if pass_cnt == 0:
		result = result + s
	if pass_cnt == pass_limit:
		pass_cnt = 0
		pass_limit += 1
	else:
		pass_cnt += 1
print(result)


n = int(input())
s = input()
l = []
sum1 = 0
for i in range(0, n):
	sum1 = sum1 + i
	l.append(sum1)
for i in l:
	if i < n:
		print(s[i], end='')


def three_numbers():
	numbers = list(map(int, input().split(sep=' ')))
	m = max(numbers)
	for i in numbers:
		if i != m:
			print(m - i, end=' ')

def gen_and_card_game():
	card = input()
	my_cards = list(input().split(sep=' '))
	for i in my_cards:
		if i[0] == card[0] or i[1] == card[1]:
			print('YES')
			break
	else:
		print('NO')

def kazak_vus_and_contest():
	(a, b, c) = map(int, input().split(sep=' '))
	if a - b <= 0 and a - c <= 0:
		print('YES')
	else:
		print('NO')

def like_A():
	st = input()
	count_a = 0
	for i in st:
		if i == 'a':
			count_a += 1
	if count_a > len(st) - count_a:
		print(len(st))
	else:
		print(count_a + count_a - 1)

def three_piece_candies():
	n = int(input())
	for i in range(n):
		(a, b, c) = map(int, input().split(sep=' '))
		print((a + b + c) // 2)

def re_encryption():
	n = int(input())
	encryption = input()
	decipherment = ''
	k = 0
	while 0 != n:
		k += 1
		n -= k
	for i in range(1, k + 1):
		decipherment += encryption[0]
		encryption = encryption[i:]
	print(decipherment)
re_encryption()


a = int(input())
b = str(input())
otv = str()
dm = 1
u = 0
while u <= a - 1:
	otv += b[u]
	dm += 1
	u += dm
print(otv)


from math import sqrt
n = int(input())
t = input()
s = ''
chars = []
res = []
for char in t:
	chars.append(char)
maxi = int(sqrt(2 * n - 1.75) + 0.5)
for i in range(0, maxi):
	j = int(i + i * (i - 1) / 2)
	s = s + chars[j]
print(s)


n = input()
str = input()
l = 0
p = 1
str1 = ' '
while l <= len(str):
	str1 = str1 + str[l]
	p = p + 1
	l = l + p
print(str1)


n = int(input())
a = input()
y = []
y[:0] = a
s = ''
c = 0
i = 1
while i < n:
	s = s + y[i - 1]
	c = c + 1
	i = i + c
if n == 1:
	s = a
print(s)


s = input().rstrip()
x = list(s)
if len(x) % 2 == 0:
	t = len(x) // 2 - 1
	p = x[0:t]
	q = x[t + 2:len(x)]
	l = []
	for j in range(t, t + 2):
		l.append(x[j])
	a = len(p) - 1
	for i in range(0, len(p)):
		l.append(p[a - i])
		l.append(q[i])
	C = ''.join(l)
	print(C)
else:
	t = len(x) // 2
	p = x[0:t]
	q = x[t + 1:len(x)]
	l = []
	l.append(x[t])
	a = len(p) - 1
	for i in range(0, len(p)):
		l.append(q[i])
		l.append(p[a - i])
	C = ''.join(l)
	print(C)


a = input()
mass = []
ans = []
aa = ''
if not len(a) % 2:
	for i in range(len(a)):
		mass.append(a[i])
	while mass:
		ans += mass[len(mass) - 1]
		mass.pop(len(mass) - 1)
		if not mass:
			break
		ans += mass[0]
		mass.pop(0)
	ans.reverse()
	for i in ans:
		aa += i
	print(aa)
else:
	for i in range(len(a)):
		mass.append(a[i])
	while mass:
		ans += mass[0]
		mass.pop(0)
		if not mass:
			break
		ans += mass[len(mass) - 1]
		mass.pop(len(mass) - 1)
	ans.reverse()
	for i in ans:
		aa += i
	print(aa)


n = int(input())
n2 = n
t = input()
k = 0
s = ''
for i in range(1, n2 + 1):
	n -= i
	k += i
	s += t[k - 1]
	if n == 0:
		break
print(s)


t = int(input())
s = input()
ind = 0
i = 1
while ind < t:
	print(s[ind], end='')
	ind += i
	i += 1


n = int(input())
i = 0
s = input()
ans = ''
t = 0
while i < n:
	ans += s[i]
	t += 1
	i = t * (t + 1)
	i //= 2
print(ans)


t = int(input())
n = input()
c = 1
j = 0
b = []
while t > j:
	b.append(n[j])
	c = c + 1
	j = j + c
print(''.join(b))


n = int(input())
t = input()
l = []
i = 1
while i * (i + 1) // 2 - 1 < n:
	l.append(t[i * (i + 1) // 2 - 1])
	i += 1
str1 = ''.join((str(e) for e in l))
print(str1)


n = int(input())
st = input()
k = 0
pr = 1
for i in range(len(st)):
	if i == k:
		print(st[i], end='')
		k += pr
		pr += 1


n = int(input())
s = input()
(index, jump) = (0, 1)
while index < len(s):
	print(s[index], end='')
	index += jump
	jump += 1
print()


n = int(input())
s = ''
st = input()
d = i = 0
while d < len(st):
	s = s + st[d]
	d = d + (i + 2)
	i += 1
print(s)


num = int(input())
string = input()
test_str = ''
n = 0
n1 = 1
check = True
while check:
	test_str = test_str + string[n]
	n = n + n1
	n1 = n1 + 1
	if n >= num:
		check = False
print(test_str)


a = int(input())
b = input()
s = []
for i in b:
	s.append(i)
w = []
i = 0
if a == 1:
	print(b)
elif a == 3:
	for i in range(int(a // 2) + 1):
		print(s[i], end='')
else:
	for j in range(2, a):
		if i <= a:
			w.append(s[i])
			i += j
		else:
			break
	for i in w:
		print(i, end='')


n = int(input())
s = input()
l = ''
count = 0
i = 0
while i < len(s):
	l += s[i]
	count += 1
	i += count
print(l)


a = input()
if len(a) == 1:
	print(a)
else:
	if len(a) % 2 == 0:
		k = len(a) // 2 - 1
	else:
		k = len(a) // 2
	s = a[k]
	s1 = a[0:k]
	s1 = s1[::-1]
	s2 = a[k + 1:]
	if len(s1) > len(s2):
		for i in range(len(s2)):
			s = s + s2[i] + s1[i]
		s = s + s1[len(s1) - 1]
	elif len(s2) > len(s1):
		for i in range(len(s1)):
			s = s + s2[i] + s1[i]
		s = s + s2[len(s2) - 1]
	else:
		for i in range(len(s2)):
			s = s + s2[i] + s1[i]
	print(s)


a = int(input())
list1 = list(input())
list2 = []
n = 0
m = 1
while a > 0 and n < a:
	print(list1[n], end='')
	n = n + m
	m = m + 1


g = input()
m = 2
t = input()
stroka = t[0]
skorost = 3
while m < len(t):
	stroka = stroka + t[m]
	m = m + skorost
	skorost = skorost + 1
print(stroka)


n = int(input())
s = input()
count = 1
temp = s + ' '
ans = ''
answer = s[0]
d = 0
for i in range(len(temp)):
	if d >= len(s):
		break
	d = d + count
	count = count + 1
	answer = answer + temp[d]
for i in range(len(answer) - 1):
	ans = ans + answer[i]
print(ans)


n = int(input())
t = input()
i = 0
m = 1
while i < n:
	print(t[i], end='')
	i += m
	m += 1


st = input()
n = len(st)
a = ''
if n % 2 == 0:
	ind = n // 2 - 1
	pos = 1
	a += st[ind]
	while 1:
		a += st[ind + pos]
		if ind - pos < 0:
			break
		a += st[ind - pos]
		pos += 1
	print(a)
else:
	ind = n // 2
	pos = 1
	a += st[ind]
	while 1:
		if ind - pos < 0:
			break
		a += st[ind + pos]
		a += st[ind - pos]
		pos += 1
	print(a)


n = int(input())
s = input()
ans = ''
prev = 0
for i in range(11):
	index = prev + i
	if index > len(s) - 1:
		break
	ans += s[index]
	prev = index
print(ans)


n = int(input())
s = input().strip()
ans = ''
i = 1
while True:
	idx = i * (i - 1) // 2
	if idx >= n:
		break
	ans += s[idx]
	i += 1
print(''.join(ans))


n = int(input())
s = input()
answer = ''
for i in range(n):
	x = (9 + i * 8) ** 0.5
	if x == int(x):
		answer = answer + s[i]
print(answer)


n = int(input())
s = input()
new_s = ''
(track, i) = (0, 0)
while i < n:
	new_s += s[i]
	i += 1
	track += 1
	i += track
print(new_s)


n = int(input())
s = input()
t = ''
l = 1
while s != '':
	t += s[0]
	s = s[l:]
	l += 1
print(t)


a = input()
b = len(a)
m = (b - 1) // 2
l = [a[m]]
for x in range(1, 1 + b // 2):
	if m + x < b:
		l.append(a[m + x])
	if m - x >= 0:
		l.append(a[m - x])
print(''.join(l))


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = 1
for tt in range(t):
	n = int(input())
	s = str(input())
	c = 1
	i = 0
	ans = ''
	while i < n:
		ans += s[i]
		i += c
		c += 1
	print(ans)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


s = input()
mid = len(s) // 2
if len(s) % 2 == 0:
	mid -= 1
ans = [s[mid]]
rng = 1
while True:
	try:
		ans.append(s[mid + rng])
		if mid - rng >= 0:
			ans.append(s[mid - rng])
		rng += 1
	except IndexError:
		break
print(''.join(ans))


n = int(input())
s = input()
a = ''
i = 0
p = 1
while i < n:
	a += s[i]
	i += p
	p += 1
print(a)


n = int(input())
l = list(input())
c = 0
for i in range(n):
	c += i
	if c >= n:
		break
	else:
		print(l[c], end='')


n = int(input())
s = input()
ans = ''
a = 0
try:
	for i in range(n):
		ans += s[a:][0]
		a += i + 1
	print(ans)
except:
	print(ans)


t = int(input())
a = input()
ans = ''
j = 0
for i in range(t):
	j = j + i
	if j < t:
		ans = ans + a[j]
print(ans)


n = int(input())
s = list(input())
v = []
(a, b) = (0, 0)
while a < n:
	v.append(s[a])
	b += 1
	a += b
print(''.join(v))


n = int(input())
t = input()
s = ''
i = 0
counter = 1
while i < len(t):
	s += t[i]
	counter += 1
	i += counter
print(s)


str = input()
res = ''
c = 0
kek = 0
lol = len(str) - 1
if len(str) % 2 == 0:
	for i in range(0, len(str)):
		if i % 2 == 0:
			res += str[lol]
			lol -= 1
		else:
			res += str[kek]
			kek += 1
else:
	for i in range(0, len(str)):
		if i % 2 == 0:
			res += str[kek]
			kek += 1
		else:
			res += str[lol]
			lol -= 1
print(res[::-1])


n = int(input())
s = input()
b = ''
k = 0
i = 0
while True:
	b += s[k]
	i += 1
	k += i
	if k >= n:
		break
print(b)


n = int(input())
code = input()
for index in range(0, n):
	k = int(index * (index + 1) / 2)
	if k < n:
		print(code[k], end='')


n = int(input())
c = 0
s2 = []
s1 = list(input())
for i in range(1, n + 1):
	if c > n - 1:
		break
	s2.append(s1[c])
	c += i
print(''.join(s2))


n = int(input())
amar_matha = input()
beng = 1
tmar_matha = 0
while tmar_matha < n:
	print(amar_matha[tmar_matha], end='')
	beng += 1
	tmar_matha += beng


x = input()
x = list(x)
li = []
r = l = 0
if len(x) % 2 == 0:
	a = len(x) // 2 - 1
	li.append(x[a])
else:
	a = len(x) // 2
	li.append(x[a])
for i in range(len(x) - 1):
	if i % 2 == 0:
		r += 1
		li.append(x[a + r])
	else:
		l += 1
		li.append(x[a - l])
print(''.join(li))


a = input()
n = len(a)
i = (n + 1) // 2 - 1
d = 0
print(a[i], end='')
while i - d > 0:
	d += 1
	print(a[i + d], end='')
	print(a[i - d], end='')
print(a[-1] if i + d + 1 == n - 1 else '')


s = input()
res = ''
if len(s) % 2 == 0:
	while s:
		res += s[(len(s) - 1) // 2:(len(s) - 1) // 2 + 2]
		s = s[:(len(s) - 1) // 2] + s[(len(s) - 1) // 2 + 2:]
else:
	res = s[len(s) // 2]
	s = s[:len(s) // 2] + s[len(s) // 2 + 1:]
	while s:
		res += s[(len(s) - 1) // 2:(len(s) - 1) // 2 + 2][::-1]
		s = s[:(len(s) - 1) // 2] + s[(len(s) - 1) // 2 + 2:]
print(res)


n = int(input())
s = input()
l = 0
i = 1
while l < n:
	print(s[l], end='')
	l += i
	i += 1


n = int(input())
str = input()
k = 0
for i in range(n):
	k = k + i
	if k < n:
		print(str[k], end='')


a = list(input())
b = [''] * len(a)
x = len(a) // 2 if len(a) % 2 != 0 else len(a) // 2 - 1
y = x + 1
z = 0
while z < len(b):
	if x >= 0:
		b[z] = a[x]
		x -= 1
		z += 1
	if y < len(b):
		b[z] = a[y]
		y += 1
		z += 1
print(*b, sep='')


n = int(input())
tt = input()
s = ''
k = j = 0
while k < n:
	s += tt[k]
	j += 1
	k += j
print(s)


n = int(input())
u = list(input())
i = 0
z = 0
while z + i <= n - 1:
	print(u[z + i], end='')
	z += i
	i += 1


n = int(input())
l = input()
nb = 0
s = ''
cpt = 0
if n == 1:
	print(l)
else:
	for k in range(n):
		if k * (k + 1) / 2 == n:
			nb = k
			break
	for k in range(1, nb + 1):
		s += l[cpt]
		cpt += k
	print(s)


n = int(input())
t = input()
c = 0
s = 1
while c < n:
	print(t[c], end='')
	c += s
	s += 1


n = int(input())
s = input()
t = 0
o = 0
i = 1
ans = ''
if n == 1:
	print(s)
else:
	while o < n - 1:
		ans += s[o]
		o += i
		i += 1
	print(ans)


def f(s):
	i = (len(s) - 1) // 2
	z = -1
	for d in range(len(s)):
		i += z * d
		z *= -1
		yield s[i]
s = input()
print(*f(s), sep='')


s = input()
n = len(s)
t = n // 2 - 1
t1 = n // 2
s1 = ['' for i in range(n)]
if n % 2 == 0:
	for i in range(n):
		if i % 2 == 0:
			s1[i] = s[t]
			t -= 1
		else:
			s1[i] = s[t1]
			t1 += 1
else:
	flag = True
	for i in range(n):
		if flag == True:
			flag = False
			s1[i] = s[t1]
			t1 += 1
		elif i % 2 == 0:
			s1[i] = s[t]
			t -= 1
		else:
			s1[i] = s[t1]
			t1 += 1
print(''.join(s1))


from itertools import accumulate, count, takewhile
from operator import itemgetter as ig
input()
s = input()
print(''.join((s[i] for i in takewhile(lambda q: q < len(s), accumulate(count())))))


u = input()
str = input()
cnt = 0
i = 1
nstr = ''
while cnt < int(u):
	nstr += str[cnt]
	cnt = cnt + i
	i = i + 1
print(nstr)


s = input()
x = ''
while len(s) != 0:
	if len(s) % 2 != 0:
		x = s[0] + x
		s = s[1:]
	else:
		x = s[-1] + x
		s = s[:len(s) - 1]
print(x)


n = int(input())
a = input()
(i, w) = (0, 1)
s = ''
while i < len(a):
	s += a[i]
	w += 1
	i += w
print(s)


n = int(input())
string = input()
cipher = []
for i in range(n):
	cipher.append(string[0])
	if i + 1 >= len(string):
		break
	string = string[i + 1:len(string)]
print(''.join(cipher))


import sys
n = int(input())
(i, j, s) = (0, 1, input())
while i < n:
	sys.stdout.write(s[i])
	j += 1
	i += j


s = input()
l = len(s)
if l == 1:
	print(s, end='')
else:
	if l % 2 == 0:
		mid = l // 2 - 1
	else:
		mid = l // 2
	i = mid - 1
	j = mid + 1
	print(s[mid], end='')
	while i >= 0 and j < l:
		print(s[j], end='')
		print(s[i], end='')
		i -= 1
		j += 1
	if i >= 0:
		print(s[i], end='')
	if j < l:
		print(s[j], end='')


from math import sqrt
n = int(input())
t = input()
t = ' ' + t
a = ''
lst = [1]
n_i = int((-1 + sqrt(1 + 8 * n)) / 2)
for i in range(1, n_i):
	lst.append(i + lst[i - 1])
	a += t[lst[i]]
print(t[1] + a)


n = int(input())
a = input()
c = 1
i = 0
s = []
while i < n:
	s.append(a[i])
	i += c
	c += 1
print(*s, sep='')


n = int(input())
s = input()
d = ''
l = 0
for i in range(n):
	d = d + s[l]
	l = l + i + 1
	if l >= n:
		break
print(d)


n = int(input())
a = input()
o = ''
i = 0
while (3 + i) * i // 2 <= n:
	o += a[(3 + i) * i // 2]
	i += 1
print(o)


def func(st):
	k = 1
	i = 0
	res = ''
	while i < len(st):
		res += st[i]
		k += 1
		i += k
	return res
n = int(input())
st = input()
print(func(st))


def opp(l):
	r = ''
	s = list(l)
	if len(s) % 2 == 0:
		r = s[-1] + r
		del s[-1]
		while len(s) > 1:
			r = s[0] + r
			del s[0]
			r = s[-1] + r
			del s[-1]
		return s[0] + r
	else:
		r = s[0] + r
		del s[0]
		while s:
			r = s[-1] + r
			del s[-1]
			r = s[0] + r
			del s[0]
		return r
print(opp(input()))


n = int(input())
a = input()
k = int((1 + int((1 + 8 * n) ** 0.5)) / 2) - 1
l = n - 1
ans = ''
for i in range(k, 0, -1):
	if l < 0:
		break
	b = l
	flg = 0
	while l > b - i:
		if flg == 0:
			ans += a[l]
			flg = 1
		l -= 1
print(ans[::-1])


n = int(input())
s = input()
t = 1
t1 = 1
a = []
i = 0
t = 1
while i < n:
	a.append(s[i])
	i = i + t
	t = t + 1
s = ''.join(a)
print(s)


s = input()
t = ''
if len(s) % 2:
	start = True
else:
	start = False
s = list(s)
while s:
	if start:
		t = s.pop(0) + t
		start = False
	else:
		t = s.pop() + t
		start = True
print(t)


n = int(input())
st = list(input())
dcipher = []
i = 0
j = 1
while i < n:
	dcipher.append(st[i])
	i = i + j
	j = j + 1
print(''.join(dcipher))


import math
x = int(input())
n = round(math.sqrt(1 + 2 * x) - 1)
stri = input()
strout = ''
counter = 0
for i in range(n):
	strout = strout + stri[counter]
	counter += i + 1
print(strout)


cantidad = input()
cadena = str(input())
suma = 2
i = 0
r = ''
for char in cadena:
	if len(cadena) == 1:
		r += cadena
		print(r)
		break
	elif i < len(cadena):
		r += cadena[i]
		i += suma
		suma += 1
	else:
		print(r)
		break


N = int(input())
S = input()
I = 0
J = 1
while I < N:
	print(S[I], end='')
	I += J
	J += 1
print()


a = input()
res = ''
if len(a) % 2 == 0:
	while len(a) > 0:
		res += a[-1]
		a = a[:len(a) - 1]
		if len(a) > 0:
			res += a[0]
			a = a[1:]
	print(res[::-1])
else:
	while len(a) > 0:
		res += a[0]
		a = a[1:]
		if len(a) > 0:
			res += a[-1]
			a = a[:len(a) - 1]
	print(res[::-1])


input()
s = input()
c = 0
for i in range(len(s)):
	p = c + i
	if p >= len(s):
		break
	print(s[p], end='')
	c = p


ran = input()
word = input()
m = int(ran)
i = 0
res = []
while len(word):
	w = word[0:i + 1]
	i += 1
	word = word[i:m]
	res.append(w[0])
print(''.join(res))


n = int(input())
i = 1
L = list(input())
A = [L[0]]
c = 2
while i < n:
	A.append(L[i])
	i += c
	c += 1
print(''.join(A))


x = int(input())
s = input()
print(s[0], end='')
for i in range(2, x * x):
	if (i - 1) * (i + 2) // 2 >= x:
		break
	print(s[(i - 1) * (i + 2) // 2], end='')


s = input()
s = list(s)
s1 = []
i = 0
if len(s) % 2 == 0:
	while len(s) > 0:
		if i % 2 == 0:
			s1.append(s[-1])
			del s[-1]
			i += 1
		else:
			s1.append(s[0])
			del s[0]
			i += 1
else:
	while len(s) > 0:
		if i % 2 == 1:
			s1.append(s[-1])
			del s[-1]
			i += 1
		else:
			s1.append(s[0])
			del s[0]
			i += 1
s1.reverse()
s1 = ''.join(s1)
print(s1)


s = list(input())
l = len(s)
if l % 2:
	f = 0
else:
	f = -1
s1 = ''
while s:
	s1 += s.pop(f)
	if f == 0:
		f = -1
	else:
		f = 0
print(s1[::-1])


s = input()
a = ''
ct = 0
t = len(s)
if t % 2 != 0:
	a = s[t // 2]
	ct = 1
	(i, j) = (t // 2 - 1, t // 2 + 1)
	while ct != t:
		if ct % 2 == 0:
			a = a + s[i]
			i -= 1
		else:
			a = a + s[j]
			j += 1
		ct += 1
else:
	(i, j) = (len(s) // 2 - 1, t // 2)
	while ct != t:
		if ct % 2 == 0:
			a = a + s[i]
			i -= 1
		else:
			a = a + s[j]
			j += 1
		ct += 1
print(a)


n = int(input())
s = input()
i = 0
z = 1
while i < n:
	print(s[i], end='')
	z += 1
	i = i + z
print()


n = int(input())
a = list(input())
b = []
c = 1
d = 2
while c <= n:
	b.append(a[c - 1])
	c += d
	d += 1
print(''.join(b))


def func(n):
	return n * (n + 1) // 2
n = int(input())
s = input()
cnt = 0
while func(cnt) < len(s):
	cnt += 1
t = ''
f = 0
t += s[f]
for i in range(1, cnt):
	f = f + i
	t += s[f]
print(t)


n = list(input())
if len(n) % 2 == 0:
	state = 'end'
else:
	state = 'start'
word = []
while n != []:
	if state == 'end':
		word.append(n[-1])
		n.pop(-1)
		state = 'start'
	else:
		word.append(n[0])
		n.pop(0)
		state = 'end'
answer = ''
for i in reversed(word):
	answer += i
print(answer)


n = int(input())
s = input()
count = 1
i = 0
ans = ''
for c in s:
	if i == 0:
		ans += c
	i += 1
	if i == count:
		i = 0
		count += 1
print(ans)


n = int(input())
word = input()
unencrypted = []
letter = 0
counter = 2
while letter <= n:
	unencrypted.append(word[letter])
	letter += counter
	counter += 1
print(''.join(unencrypted))


s = str(input())
e = ''
i = len(s) - 1
if len(s) % 2 != 0:
	s = s[::-1]
while len(e) < len(s):
	e = e + s[i]
	if len(e) == len(s):
		break
	else:
		e = e + s[len(s) - i - 1]
	i = i - 1
print(e[::-1])


I = lambda : int(input())
IL = lambda : list(map(int, input().split()))
s = input()
ans = ''
while s:
	if len(s) % 2:
		ans += s[0]
		s = s[1:]
	else:
		ans += s[-1]
		s = s[:-1]
print(ans[::-1])


st = str(input())
ans = ''
(pop, k, dop, x) = (0, 1, 0, 0)
if len(st) % 2 == 0:
	dop = len(st) / 2 - 1
	ans += st[int(dop)]
	x = len(st) / 2
	for i in range(1, int(x)):
		ans += st[int(dop + i)]
		ans += st[int(dop - i)]
	ans += st[-1]
else:
	pop = (len(st) - 1) / 2
	ans += st[int(pop)]
	for i in range(1, int(pop + 1)):
		ans += st[int(pop + i)]
		ans += st[int(pop - i)]
print(ans)


a = int(input())
b = input()
f = (-1 + (1 + 8 * a) ** (1 / 2)) / 2
for n in range(0, int(f)):
	t = (n + 1) * n / 2
	for x in range(int(t), int(t) + 1):
		print(b[x], end='')


string = input()
l = len(string)
a = 0
b = l - 1
new_string = ''
if l % 2 == 0:
	i = 0
	while a <= b:
		if i % 2 == 0:
			new_string = new_string + string[a]
			a += 1
		else:
			new_string = new_string + string[b]
			b -= 1
		i += 1
else:
	i = 0
	while a <= b:
		if i % 2 == 0:
			new_string = new_string + string[b]
			b -= 1
		else:
			new_string = new_string + string[a]
			a += 1
		i += 1
new_new_string = ''
if l % 2 == 0:
	for i in range(1, (l + 2) // 2):
		new_new_string = new_new_string + new_string[l - i * 2] + new_string[l - i * 2 + 1]
else:
	new_new_string = new_new_string + new_string[l - 1]
	for i in range(1, l // 2 + 1):
		new_new_string = new_new_string + new_string[l - i * 2 - 1] + new_string[l - i * 2]
print(new_new_string)


n = int(input())
t = input()
pos = 0
shift = 0
res = []
while pos < len(t):
	res.append(t[pos])
	shift += 1
	pos += shift
print(''.join(res))


n = int(input())
a = input()
t = 1
i = 0
while i < n:
	print(a[i], end='')
	i = i + t
	t = t + 1


N = int(input())
s = input()
j = 0
word = ''
if 0 < len(s) < 56:
	for i in range(0, N):
		j += i
		while j < N:
			word += s[j]
			break
print(word)


s = input()
res = ''
for i in range(len(s) // 2):
	if len(s) % 2 == 1:
		res += s[i] + s[len(s) - i - 1]
	else:
		res += s[len(s) - i - 1] + s[i]
if len(s) % 2 == 1:
	res += s[len(s) // 2]
print(''.join(reversed(res)))


n = int(input())
s = input()
sp = ''
c = 0
f = 1
for i in range(1, n + 1):
	if i + c <= n:
		sp += s[c]
		c += f
		f += 1
print(sp)


from math import ceil
s = str(input())
b = ceil(len(s) / 2) - 1
answer = []
for i in range(len(s)):
	b += i * 1 if i % 2 != 0 else i * -1
	answer.append(s[b])
print(''.join(answer))


n = int(input())
s = input()
c = 0
x = 0
while c < n:
	print(s[x], end='')
	c += 1
	x += c
	if x >= len(s):
		break


sl = list(input())
l = 1
r = 1
flag = True
if len(sl) % 2 == 0:
	n = len(sl) // 2 - 1
	print(sl[n], end='')
	for i in range(len(sl) - 1):
		if flag:
			print(sl[n + r], end='')
			r = r + 1
			flag = False
		else:
			print(sl[n - l], end='')
			l = l + 1
			flag = True
if len(sl) % 2 == 1:
	n = (len(sl) + 1) // 2 - 1
	print(sl[n], end='')
	for i in range(len(sl) - 1):
		if flag:
			print(sl[n + r], end='')
			r = r + 1
			flag = False
		else:
			print(sl[n - l], end='')
			l = l + 1
			flag = True


z = input
n = int(z())
x = z()
s = ''
i = 0
j = 0
for _ in range(n):
	try:
		s += x[i]
		j += 1
		i += j
	except:
		pass
print(s)


from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import defaultdict
from itertools import combinations
import functools
import sys
import math
MAX = sys.maxsize
MAXN = 10 ** 6 + 10
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b, x, y):
	return abs(a - x) + abs(b - y)

def numIN():
	return map(int, sys.stdin.readline().strip().split())

def charIN():
	return sys.stdin.readline().strip().split()
t = [(-1, -1)] * 1000010

def create(a):
	global t, n
	for i in range(n, 2 * n):
		t[i] = (a[i - n], i - n)
	for i in range(n - 1, 0, -1):
		x = [t[2 * i], t[2 * i + 1]]
		x.sort(key=lambda x: x[0])
		t[i] = x[1]

def update(idx, value):
	global t, n
	idx = idx + n
	t[idx] = value
	while idx > 1:
		idx = idx // 2
		x = [t[2 * idx], t[2 * idx + 1]]
		x.sort(key=lambda x: x[0])
		t[idx] = x[1]

def cal(n, k):
	res = 1
	c = [0] * (k + 1)
	c[0] = 1
	for i in range(1, n + 1):
		for j in range(min(i, k), 0, -1):
			c[j] = (c[j] + c[j - 1]) % MOD
	return c[k]
i = 0
n = int(input())
s = input()
j = 1
while i < n:
	print(s[i], end='')
	i += j
	j += 1


n = int(input())
a = input()
b = ''
count = 0
for i in range(10):
	if count + i < len(a):
		count += i
		b += a[count]
print(b)


n = int(input())
t = input()
j = 0
for i in range(n):
	j += i
	if j < n:
		print(t[j], end='')
	else:
		break


a = input()
s = ''
while a:
	l = len(a)
	if not len(a) % 2:
		s = a[-1] + s
		a = a[:-1]
	else:
		s = a[0] + s
		a = a[1:]
print(s)


n = int(input())
s = input()
l = int((2 * n) ** 0.5)
p = 0
r = ''
for i in range(l):
	r += s[p]
	p += i + 1
print(r)


n = int(input())
s = list(input())
s1 = s[0]
(i, a) = (2, 2)
while i <= n:
	s1 += s[i]
	i += a + 1
	a += 1
print(s1)


n = int(input())
t = input()
l = list(t)
jump = 1
s = ''
i = 0
while i < n:
	s = s + l[i]
	i = i + jump
	jump = jump + 1
print(s)


n = int(input())
string = input()
a = 0
b = 1
while a < n:
	print(string[a], end='')
	a += b
	b += 1


n = int(input())
s = input()
i = 0
res = ''
try:
	for i in range(n):
		res += s[i * (i + 1) // 2]
except:
	pass
print(res)


n = int(input())
s = input()
(k, i, r) = (1, 0, [])
while i < n:
	r.append(s[i])
	i += k
	k += 1
print(''.join(r))


n = int(input())
s = input()
k = 1
r = 0
for k in range(11):
	if k * (k + 1) == n * 2:
		r = k
for i in range(r):
	print(s[i * (i + 1) // 2], end='')


n = int(input())
s = input()
st = ''
n = len(s)
i = 0
k = 1
while i < n:
	st += s[i]
	i += k
	k += 1
print(st)


n = int(input())
s = input()
i = 0
m = 1
while i < n:
	print(s[i], sep='', end='')
	m += 1
	i += m


n = int(input())
k = 0
c = 1
flag = 1
str1 = input()
while flag:
	print(str1[k], end='')
	k = k + c
	c = c + 1
	if k >= n:
		flag = 0


n = int(input())
s = input()
i = 0
temp = 1
ans = []
while i < n:
	ans += s[i]
	i += temp
	temp += 1
print(*ans, sep='')


w = int(input())
n = input()
l = list(n)
s = 1
if w == 1:
	print(n)
if w % 2 == 0:
	for i in range(0, w // 2 + 1):
		s = s + i
		if w > s:
			print(l[s - 1], end='')
		else:
			break
else:
	for i in range(0, w // 2 + 1):
		s = s + i
		if w > s:
			print(l[s - 1], end='')
		else:
			break


n = int(input())
z = list(input())
s = ''
(k, i) = (0, 0)
while k < n:
	i += 1
	k += i
	s += z[k - 1]
print(s)


l = int(input())
string = input()
for i in range(1, l + 1):
	if i * (i + 1) == 2 * l:
		length = i
		break
result = []
n = l - 1
while n >= 0:
	result.append(string[n])
	n -= length
	length -= 1
print(''.join(result[::-1]))


n = int(input())
s = list(input())
ans = []
i = 0
j = 0
while i < n:
	ans.append(s[i])
	i += j + 1
	j += 1
print(''.join(ans))


a = input()
fl = len(a) // 2 + (len(a) % 2 - 1)
if len(a) <= 2:
	result = a
else:
	result = a[fl]
	for i in range(0, fl):
		result += a[fl + i + 1] + a[fl - i - 1]
		if i == fl - 1 and len(a) % 2 == 0:
			result += a[fl + i + 2]
print(result)


_ = input()
string = input()
n_of_chars = len(string)
res = int((-1 + (1 + 4 * 2 * n_of_chars) ** (1 / 2)) / 2)
res_str = ''
for i in range(res):
	get_i = int(i * (i + 1) // 2)
	res_str = res_str + string[get_i]
print(res_str)


n = int(input())
s = input()
l = list(s)
t = ''
i = 0
while i < n:
	j = i * (i + 1) // 2
	if j < n:
		t = t + l[j]
	else:
		break
	i += 1
print(t)


n = int(input())
s = input()
ls = ''
i = 2
cur = 0
try:
	while True:
		ls += s[cur]
		cur += i
		i += 1
except:
	print(ls)


n = int(input())
s = input()
n1 = 0
for i in range(1, 11):
	if n == i * (i + 1) // 2:
		n1 = i
		break
a = ''
for i in range(1, n1 + 1):
	index = i * (i + 1) // 2 - 1
	a = f'{a}{s[index]}'
print(a)


a = int(input())
b = input()
c = 1
d = (-1 + (1 + 8 * a) ** 0.5) / 2
while c <= d:
	e = c * (c + 1) / 2 - 1
	e = int(e)
	print(b[e], end='')
	c += 1


import math
from itertools import zip_longest
s = input()
x = math.ceil(len(s) / 2)
r = ''.join((i + j for (i, j) in zip_longest(s[:x][::-1], s[x:], fillvalue='')))
print(r)


n = int(input())
a = input()
t = 1
i = 0
c = ''
while i < n:
	c = c + a[i]
	i = i + t
	t = t + 1
print(c)


input()
l = input()
ans = ''
while l:
	ans += l[0]
	l = l[len(ans):]
print(ans)


n = int(input())
inp = input()
i = 0
ans = ''
curr = 1
while i < n:
	ans += inp[i]
	curr += 1
	i += curr
print(ans)


l = int(input())
s = input()
a = ''
count = 0
para = []
for num in range(1, 55):
	if count < l:
		para.append(count)
		count = count + num
	else:
		break
for x in para:
	a = a + s[x]
print(a)


n = int(input())
s = input()
dec = ''
i = 0
rep = 1
while i < len(s):
	dec += s[i]
	i += rep
	rep += 1
print(dec)


try:
	t = int(input())
	s = input()
	_ = 1
	i = 0
	l = []
	while i <= len(s) - 1:
		l.append(s[i])
		_ += 1
		i = i + _
	s = ''.join(l)
	print(s)
except:
	pass


n = int(input())
a = input()
b = ''
c = 0
for i in range(0, 100000):
	if c + i + 1 >= len(a):
		break
	else:
		c += i
		b += a[c]
if len(a) != 1:
	print(b)
else:
	print(a)


n = int(input())
i = 0
k = 1
x = input()
while i < n:
	print(x[i], end='')
	i += k
	k += 1


n = int(input())
encrypted = input()
decrypt = ''
delta = 0
start = 0
for i in range(n):
	if start + delta == i:
		decrypt += encrypted[i]
		delta += 1
		start = i
print(decrypt)


n = int(input())
l = (-1 + int((1 + 8 * n) ** 0.5 + 0.0001)) // 2
s = input()
st = ''
for i in range(1, l + 1):
	tri = i * (i + 1) // 2
	st += s[tri - 1]
print(st)


alpha_dict = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
prime = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]
p = int(input())
t = list(input())
j = 0
ans = ''
counter = 1
while j < p:
	ans = ans + t[j]
	j = j + counter
	counter = counter + 1
print(ans)


a = int(input())
b = input()
ans = ''
x = 0
i = 0
while i < a:
	ans += b[i]
	x += 1
	i += x
print(ans)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(n,) = I()
s = input()
res = ''
i = 0
j = 2
while i < n:
	print(s[i], end='')
	i += j
	j += 1


n = int(input())
string = input()
i = 0
num = 1
req_string = ''
while i < n:
	req_string += string[i]
	i += num
	num += 1
print(req_string)


sy = int(input())
st = input()
i = 0
k = 0
while i < sy:
	print(st[i], end='')
	k += 1
	i += k


n = int(input())
s = input()
res = ''
count = 1
i = 0
while i < n:
	res += s[i]
	i += count
	count += 1
print(res)


n = int(input())
num = int((1 + 8 * n) ** 0.5 - 1)
s = input()
ans = []
start = 0
for i in range(1, num + 1):
	if n - 1 < start:
		break
	else:
		ans.append(s[start])
		start += i
print('{}'.format(''.join(ans)))


cipherlen = input()
cipher = input()
string = ''
index = 0
try:
	while len(cipher) != 0:
		string += cipher[index]
		cipher = cipher[index:]
		index += 1
except IndexError:
	print(string)


from sys import stdin, stdout
import cProfile, math
from collections import Counter
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10000000)

class Operation:

	def __init__(self, name, function, function_on_equal, neutral_value=0):
		self.name = name
		self.f = function
		self.f_on_equal = function_on_equal

def add_multiple(x, count):
	return x * count

def min_multiple(x, count):
	return x

def max_multiple(x, count):
	return x
sum_operation = Operation('sum', sum, add_multiple, 0)
min_operation = Operation('min', min, min_multiple, 1000000000.0)
max_operation = Operation('max', max, max_multiple, -1000000000.0)

class SegmentTree:

	def __init__(self, array, operations=[sum_operation, min_operation, max_operation]):
		self.array = array
		if type(operations) != list:
			raise TypeError('operations must be a list')
		self.operations = {}
		for op in operations:
			self.operations[op.name] = op
		self.root = SegmentTreeNode(0, len(array) - 1, self)

	def query(self, start, end, operation_name):
		if self.operations.get(operation_name) == None:
			raise Exception('This operation is not available')
		return self.root._query(start, end, self.operations[operation_name])

	def summary(self):
		return self.root.values

	def update(self, position, value):
		self.root._update(position, value)

	def update_range(self, start, end, value):
		self.root._update_range(start, end, value)

	def __repr__(self):
		return self.root.__repr__()

class SegmentTreeNode:

	def __init__(self, start, end, segment_tree):
		self.range = (start, end)
		self.parent_tree = segment_tree
		self.range_value = None
		self.values = {}
		self.left = None
		self.right = None
		if start == end:
			self._sync()
			return
		self.left = SegmentTreeNode(start, start + (end - start) // 2, segment_tree)
		self.right = SegmentTreeNode(start + (end - start) // 2 + 1, end, segment_tree)
		self._sync()

	def _query(self, start, end, operation):
		if end < self.range[0] or start > self.range[1]:
			return None
		if start <= self.range[0] and self.range[1] <= end:
			return self.values[operation.name]
		self._push()
		left_res = self.left._query(start, end, operation) if self.left else None
		right_res = self.right._query(start, end, operation) if self.right else None
		if left_res is None:
			return right_res
		if right_res is None:
			return left_res
		return operation.f([left_res, right_res])

	def _update(self, position, value):
		if position < self.range[0] or position > self.range[1]:
			return
		if position == self.range[0] and self.range[1] == position:
			self.parent_tree.array[position] = value
			self._sync()
			return
		self._push()
		self.left._update(position, value)
		self.right._update(position, value)
		self._sync()

	def _update_range(self, start, end, value):
		if end < self.range[0] or start > self.range[1]:
			return
		if start <= self.range[0] and self.range[1] <= end:
			self.range_value = value
			self._sync()
			return
		self._push()
		self.left._update_range(start, end, value)
		self.right._update_range(start, end, value)
		self._sync()

	def _sync(self):
		if self.range[0] == self.range[1]:
			for op in self.parent_tree.operations.values():
				current_value = self.parent_tree.array[self.range[0]]
				if self.range_value is not None:
					current_value = self.range_value
				self.values[op.name] = op.f([current_value])
		else:
			for op in self.parent_tree.operations.values():
				result = op.f([self.left.values[op.name], self.right.values[op.name]])
				if self.range_value is not None:
					bound_length = self.range[1] - self.range[0] + 1
					result = op.f_on_equal(self.range_value, bound_length)
				self.values[op.name] = result

	def _push(self):
		if self.range_value is None:
			return
		if self.left:
			self.left.range_value = self.range_value
			self.right.range_value = self.range_value
			self.left._sync()
			self.right._sync()
			self.range_value = None

	def __repr__(self):
		ans = '({}, {}): {}\n'.format(self.range[0], self.range[1], self.values)
		if self.left:
			ans += self.left.__repr__()
		if self.right:
			ans += self.right.__repr__()
		return ans

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer / denom

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True

def test_print(*args):
	if testingMode:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result
TestCases = False
testingMode = False
optimiseForReccursion = False

def main():
	n = get_int()
	(res, i, k) = ('', 0, 1)
	st = list(input())
	while i < n:
		res += st[i]
		i += k
		k += 1
	print(res)
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if testingMode else main()
else:
	(cProfile.run('main()') if testingMode else main()) if not optimiseForReccursion else threading.Thread(target=main).start()


s = int(input())
str1 = input()
str2 = ''
k = int((s * 2) ** 0.5)
for i in range(k):
	str2 += str1[i * (i + 1) // 2]
print(str2)


import math
n = int(input())
s = input()
k = (-1 + int(math.sqrt(1 + 8 * n))) // 2
res = ''
for i in range(k):
	res += s[i * (i + 1) // 2]
print(res)


len_t = int(input())
t = input()
Index = 0
Jnd = 1
while Index < len_t:
	print(t[Index], end='')
	Index += Jnd + 1
	Jnd += 1
print()


from math import floor, sqrt
n = int(input())
s = input()
for i in [x * (x + 1) // 2 for x in range(floor(sqrt(8 * n + 1 - 1) / 2))]:
	print(s[i], end='')


lent = int(input())
st = input()
i = 0
j = 1
s = ''
while i < lent:
	s += st[i]
	i += j
	j += 1
print(s)


s = list(input())
s2 = []
if len(s) % 2 == 0:
	for i in range(len(s)):
		if i % 2 == 0:
			s2.append(s[-1])
			del s[-1]
		else:
			s2.append(s[0])
			del s[0]
else:
	for i in range(len(s)):
		if i % 2 == 1:
			s2.append(s[-1])
			del s[-1]
		else:
			s2.append(s[0])
			del s[0]
s2.reverse()
print(''.join(s2))


n = int(input())
w = input()
ans = ''
(i, cnt) = (0, 1)
while i < n:
	ans += w[i]
	for _ in range(0, cnt):
		i += 1
	cnt += 1
print(ans)


def decrypt(length, encrypted):
	u = 0
	i = 0
	decrypted = ''
	while i < int(length):
		decrypted += encrypted[i]
		u += 1
		i += u
	return decrypted
print(decrypt(input(), input()))


a = int(input())
x = input()
s = 1
q = 0
ans = []
while q < a:
	q += s
	ans.append(x[q - 1])
	s += 1
print(''.join(ans))


import sys
sys.setrecursionlimit(10 ** 6)

def main():
	taille = int(input())
	chaine = input()
	indice = 0
	increment = 1
	reponse = ''
	while indice < taille:
		reponse += chaine[indice]
		indice += increment
		increment += 1
	print(reponse)
main()


n = int(input())
s = [x for x in input()]
i = 0
count = 1
result = []
while i < len(s):
	result.append(s[i])
	i += count
	count += 1
print(''.join(result))


n = int(input())
s = input()
count = 0
a = []
j = 1
a.append(s[0])
for i in range(1, n - 1):
	if s[i + 1] == s[i]:
		count += 1
	if count == j:
		a.append(s[i])
		count = 0
		j += 1
for i in a:
	print(i, end='')


n = int(input())

def split(word):
	return [char for char in word]
q = []
summation = 0
s = input()
s = split(s)
for i in range(1, n + 1):
	summation += i
	if summation <= n:
		q.append(s[summation - 1])
	else:
		break
print(''.join(q))


list1 = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45]
s = ''
num = int(input())
str1 = input()
for i in range(num):
	if i in list1:
		s += str1[i]
print(s)


n = int(input())
wrd = input()
index = 0
gap = 1
while index < n:
	print(wrd[index], end='')
	index += gap
	gap += 1


def decode(list_faktor, t):
	pos = 0
	for i in range(len(list_faktor)):
		t.replace(t[pos], '', list_faktor[i])
		pos += 1
	return t

def faktorial(num):
	list_faktor = []
	faktor = 1
	i = 1
	while faktor < num:
		faktor *= i
		list_faktor.append(i)
		i += 1
	return list_faktor
n = int(input())
t = str(input())
if n < 1 or n > 55:
	raise ValueError('1<=n<=55')
answer = t[:1]
i = 1
while len(t) != 0:
	if i > 1:
		answer += t[:1]
	t = t[i:]
	i += 1
print(answer)


a = int(input())
b = input()
c = ''
d = 0
e = 1
while d < a:
	c += b[d]
	d += e
	e += 1
print(c)


import math
n = int(input())
s = input()
p = (-1 + math.floor(math.sqrt(1 + 8 * n))) // 2
j = 0
for i in range(p):
	print(s[j + i], end='')
	j += i


n = int(input())
st = []
st = input()
s = ''
j = 0
if n == 1:
	s = st[0]
else:
	for i in range(1, n):
		if j < n:
			s += st[j]
			j += i
print(s)


t = int(input())
s = input()
new = ''
count = len(new)
while count != len(s):
	new = new + s[count]
	count = count + len(new)
print(new)


n = int(input())
t = input()
suma = []
for i in range(n):
	if sum(suma) == n:
		break
	suma.append(i)
s = ''
j = 0
for i in suma[:-1]:
	j += i
	s += t[j]
if len(s) == 0:
	print(t)
else:
	print(s)


n = int(input())
s = input()
a = 0
for i in range(10):
	try:
		print(s[i + a], end='')
		a += i
	except:
		break
print()


string = input()
n = len(string)
if n % 2 == 0:
	(i, j) = (n // 2 - 1, n // 2)
	while i > -1 and j < n:
		print(string[i] + string[j], end='')
		i -= 1
		j += 1
elif n == 1:
	print(string)
else:
	(i, j) = (n // 2, n // 2 + 1)
	while i > -1 and j < n:
		print(string[i] + string[j], end='')
		i -= 1
		j += 1
	print(string[0])


from sys import stdin, stdout
import collections
import math
N = int(input())
s = input()
if N == 1:
	print(s)
elif N == 3:
	print(s[0], s[1], sep='')
elif N == 6:
	print(s[0], s[1], s[3], sep='')
elif N == 10:
	print(s[0], s[1], s[3], s[6], sep='')
elif N == 15:
	print(s[0], s[1], s[3], s[6], s[10], sep='')
elif N == 21:
	print(s[0], s[1], s[3], s[6], s[10], s[15], sep='')
elif N == 28:
	print(s[0], s[1], s[3], s[6], s[10], s[15], s[21], sep='')
elif N == 36:
	print(s[0], s[1], s[3], s[6], s[10], s[15], s[21], s[28], sep='')
elif N == 45:
	print(s[0], s[1], s[3], s[6], s[10], s[15], s[21], s[28], s[36], sep='')
elif N == 55:
	print(s[0], s[1], s[3], s[6], s[10], s[15], s[21], s[28], s[36], s[45], sep='')


length = input('')
encrypted = input('')
length = int(length)
final = 1
while final * (final + 1) / 2 != length:
	final += 1
final_string = ''
k = 0
for i in range(final):
	final_string = final_string + encrypted[k]
	k = k + i + 1
print(final_string)


x = input()

def do(inp):
	a = []
	for i in range(int(inp / 2)):
		a.append(x[inp - 1 - i])
		a.append(x[i])
	return a

def deas(inp):
	a = []
	for i in range(int(inp / 2)):
		a.append(x[i])
		a.append(x[inp - 1 - i])
	a.append(x[int(inp / 2)])
	return a
if len(x) > 1:
	if len(x) % 2 == 0:
		st = do(len(x))
	else:
		st = deas(len(x))
	st.reverse()
	print(''.join(st))
else:
	print(x)


def stroka(s, s1):
	while len(s) > 0:
		s1 = s[0] + s[-1] + s1
		s = s[1:-1]
	return s1
s = input()
s1 = ''
if len(s) % 2 == 0:
	s1 = stroka(s, s1)
else:
	s1 = s[0]
	s = s[1:]
	s1 = stroka(s, s1)
print(s1)


import sys
t = int(input())
word = sys.stdin.readline().replace('\n', '')
pos = 0
out = ''
add = 2
while pos < t:
	out += word[pos]
	pos += add
	add += 1
print(out)


string = input()
i = (len(string) - 1) // 2
j = 0
ans = ''
while i - j >= 0 or i + j < len(string):
	if i + j < len(string):
		ans += string[i + j]
	if i - j >= 0:
		ans += string[i - j]
	j += 1
print(ans[1:])


n = int(input())
l = input()
m = [int(i) for i in range(1, 11)]
c = 0
h = 0
s = ''
while c < n:
	c += m[h]
	h += 1
	s += l[c - 1]
print(s)


n = int(input())
s = input()
(i, t) = (0, 1)
ns = ''
while i < n:
	ns = ns + s[i]
	i = i + t
	t = t + 1
print(ns)


s = input()
k = []
n = len(s)
if n % 2 == 0:
	m = n // 2 - 1
else:
	m = n // 2
k.append(s[m])
j = m + 1
t = m - 1
i = n - 2
p = 0
while i >= 0:
	if p % 2 == 0:
		k.append(s[j])
		j = j + 1
	else:
		k.append(s[t])
		t = t - 1
	p = p + 1
	i = i - 1
for i in k:
	print(i, end='')


length = int(input())
s = input()
answer = ''
space = 0
if length == 1:
	print(s)
else:
	for i in range(1, length):
		answer += s[space]
		space += i
		if space >= length:
			break
	print(answer)


i = 0
a = []
n = int(input())
for k in range(n):
	i = i + k
	if i >= n:
		break
	a.append(i)
s = input()
for elm in a:
	print(s[elm], end='')


s = input()
n = len(s)
a = []
if n % 2 == 0:
	f = n // 2 - 1
else:
	f = n // 2
a.append(s[f])
i = f - 1
j = f + 1
t = 0
if j < n or i >= 0:
	t = 1
while t == 1:
	if j < n:
		a.append(s[j])
		j += 1
	if i >= 0:
		a.append(s[i])
		i -= 1
	if j < n or i >= 0:
		t = 1
	else:
		t = 0
print(''.join(a))


s = input()
a = []
if len(s) == 1 or len(s) == 2:
	print(s)
elif len(s) % 2 == 0:
	for i in range(len(s) // 2):
		a.append(s[-i - 1])
		a.append(s[i])
	a.reverse()
	print(*a, sep='')
else:
	a.append(s[0])
	for i in range(1, len(s) // 2 + 1):
		a.append(s[-i])
		a.append(s[i])
	a.reverse()
	print(*a, sep='')


str = input()
mm = len(str) - 1
ss = 0
st = [len(str)]
for i in range(len(str)):
	st.append(0)
if len(str) > 1:
	if len(str) % 2 == 0:
		for i in range(0, int(len(str)), 2):
			if len(str) - 1 == i:
				break
			st[i] = str[mm]
			st[i + 1] = str[ss]
			mm -= 1
			ss += 1
	else:
		for i in range(0, int(len(str)), 2):
			st[i] = str[ss]
			if len(str) - 1 == i:
				break
			st[i + 1] = str[mm]
			mm -= 1
			ss += 1
	for i in reversed(st):
		if i != 0:
			print(i, end='')
else:
	print(str)


n = int(input())
k = input()
m = (-1 + (1 + 8 * n) ** 0.5) / 2
o = (-1 - (1 + 8 * n) ** 0.5) / 2
if m > 0:
	m = int(m)
	li = []
	a = 0
	for i in range(m):
		a += 1
		b = a * (a + 1) / 2 - 1
		b = int(b)
		li.append(k[b])
		p = ''.join(map(str, li))
	print(p)
elif o > 0:
	o = int(o)
	li = []
	a = 0
	for i in range(m):
		a += 1
		b = a * (a + 1) / 2 - 1
		b = int(b)
		li.append(k[b])
		p = ''.join(map(str, li))
	print(p)


a = str(input())
l = list(a)
b = []
if len(l) == 1 or all((x == l[0] for x in l)):
	print(a)
else:
	c = len(l) // 2
	if len(l) % 2 == 0:
		b = l[c - 1]
		c = c - 1
	else:
		b = l[c]
	if len(l) % 2 == 0:
		for i in range(1, len(l) // 2):
			b = b + l[c + i] + l[c - i]
		b = b + l[len(l) - 1]
		print(b)
	else:
		for i in range(1, len(l) // 2 + 1):
			b = b + l[c + i] + l[c - i]
		print(b)


a = []
xrenovo = input()
for i in xrenovo:
	a.append(i)
kok = 1
lef = len(a) // 2 + len(a) % 2 - 1
rih = len(a) // 2 + len(a) % 2
for i in range(len(a)):
	if kok % 2 == 1:
		print(str(a[lef]), end='')
		lef += -1
		kok += 1
	else:
		print(str(a[rih]), end='')
		rih += 1
		kok += 1


n = int(input())
t = list(input())
if n == 1:
	print(*t)
else:
	s = ''
	i = 1
	summ = 1
	while i < n:
		s += t[i - 1]
		i += summ
		summ += 1
	print(s)


n = int(input())
word = input()
i = 0
aux = 2
res = ''
while i < n:
	res += word[i]
	i += aux
	aux += 1
print(res)


i = 0
lens = int(input())
ins = input()
decoded = ''
nexts = 0
while nexts < lens:
	nexts = i * (i + 1) // 2
	if nexts < lens:
		decoded += ins[nexts]
	else:
		break
	i += 1
print(decoded)


n = int(input())
s = input()
x = ((1 + 8 * n) ** 0.5 - 1) / 2
p = ''
k = 0
for i in range(1, int(x) + 1):
	p = p + s[k]
	k = k + i
print(p)


n = int(input())
I = input()
(k, M) = (1, [0])
w = I[0]
for i in range(1, 11):
	k += i
	M.append(k)
for i in M[1:]:
	if i < len(I):
		w += I[i]
print(w)


n = int(input())
s = input()
ind = 0
for i in range(1, 11):
	if ind < n:
		print(s[ind], end='')
		ind += i
	else:
		break


n = int(input())
a = input()
b = ''
i = 0
sum = 0
while sum < len(a):
	b = b + a[sum]
	i += 1
	sum = sum + i
print(b)


x = int(input())
i = input()
s = 1
l = 0
arr = []
while s + l <= x:
	s = s + l
	arr.append(i[s - 1])
	l += 1
print(*arr, sep='')


l = int(input())
w = input()
i = 0
step = 1
for _ in range(l):
	try:
		print(w[i], end='')
		i += step
		step += 1
	except:
		break


n = int(input())
s = input()
l = ''
i = 0
k = 0
while i < len(s):
	l = l + s[i]
	k += 1
	i = i + k
print(l)


n = int(input())
t = input()
index = 0
s = ''
jump = 1
while index < n:
	s += t[index]
	index += jump
	jump += 1
print(s)


def pravo_levo():
	from itertools import zip_longest
	s = input()
	n = len(s)
	m = (n + 1) // 2
	odd = list(s[:m])[::-1]
	even = list(s[m:])
	res = list(zip_longest(odd, even))
	ans = ''
	for j in res:
		for i in j:
			if i is not None:
				ans += i
	return ans
print(pravo_levo())


n = int(input())
s = input()
t = ''
x = 0
for i in range(1, len(s) + 1):
	x += i
	if x <= len(s):
		t += s[x - 1]
	else:
		break
print(t)


def decrypt(n, t):
	result = ''
	index = 0
	diff = 1
	while index < n:
		result += t[index]
		index += diff
		diff += 1
	return result
n = int(input().rstrip())
t = input().rstrip()
print(decrypt(n, t))


n = int(input())
s = input()
k = 0
i = 2
s1 = ''
while k < n:
	s1 += s[k]
	k += i
	i += 1
print(s1)


n = int(input())
s = input()
c = []
q = 2
o = 0
while o <= n:
	c.append(s[o])
	o += q
	q += 1
print(''.join(c))


n = int(input())
t = input()
index = 0
gap = 1
while index < n:
	print(t[index], end='')
	index += gap
	gap += 1


a = input()
result = ''
p = -1
if len(a) % 2 == 0:
	p = 1
else:
	p = 0
ul = 0
ur = len(a) - 1
while len(result) < len(a):
	if p == 1:
		result += a[ur]
		ur -= 1
		p = 0
	else:
		result += a[ul]
		ul += 1
		p = 1
print(result[::-1])


n = input()
str = input()
k = 0
i = 0
while i < int(n):
	print(str[i], end='')
	k += 1
	i += k


n = int(input())
s = input()
i = 0
d = 1
t = []
while i < n:
	t.append(s[i])
	i += d
	d += 1
print(''.join(t))


a = int(input())
b = input()
index = 0
counter = 0
while index < len(b):
	print(b[index], end='')
	counter += 1
	index = index + counter


cantidad = list(input())
cadena = list(input())
i = 1
r = ''
for char in cadena:
	r += char
	del cadena[0:i]
	i += 1
print(r)


s = input()
n = len(s)
a = []
i = 0
j = n - 1
while i <= j:
	if n % 2 == 0:
		a.append(s[j])
		j -= 1
		n -= 1
	else:
		a.append(s[i])
		i += 1
		n -= 1
print(*reversed(a), sep='')


n = int(input().strip())
t = str(input().strip())
strlist = ''
step = 1
k = 0
while k < n:
	strlist += t[k]
	step += 1
	k += step
print(strlist)


t = int(input())
s = input()
result = ''
i = 0
count = 2
while i < t:
	result = result + s[i]
	i = i + count
	count += 1
print(result)


string = input()
new_string = ''
if len(string) % 2 == 0:
	start_pos = len(string) // 2 - 1
	new_string += list(string)[start_pos]
else:
	start_pos = len(string) // 2
	new_string += list(string)[start_pos]
k = 1
while k != len(string):
	string = list(string)
	try:
		new_string += string[start_pos + k]
	except:
		break
	new_string += string[start_pos - k]
	k += 1
if len(string) % 2 == 1:
	print(new_string)
else:
	print(new_string[:len(new_string) - 1])


n = int(input())
s = input()
i = 1
j = 1
ns = ''
while j <= len(s):
	ns += s[j - 1]
	i += 1
	j += i
print(ns)


n = int(input().strip())
s = input().strip()
c = 0
m = 1
while c < n:
	print(s[c], end='')
	c += m
	m += 1
print()


n = int(input())
st = input()
ans = ''
ans = ans + st[0]
i = 2
z = 3
while i <= n and n > 0:
	ans = ans + st[i]
	i = i + z
	z += 1
print(ans)


t = list(input())
s = ''
if len(t) % 2 == 0:
	pass
else:
	s += t.pop(0)
i = 0
while i < len(t) // 2:
	s = t.pop(len(t) - 1 - i) + s
	s = t.pop(i) + s
print(s)


n = int(input())
t = input()
i = 0
temp = n
l = []
while n:
	i += 1
	n -= i
	l.append(t[temp - n - 1])
print(''.join(l))


N = int(input())
S = input()
now = 0
ans = ''
for i in range(0, 10):
	ans = ans + S[now]
	now += i + 1
	if now >= N:
		break
print(ans)


def make(x):
	if len(x) % 2 == 0:
		return [x[-1], x[:len(x) - 1]]
	else:
		return [x[0], x[1:]]
y = input()
res = ''
while y:
	j = make(y)
	(res, y) = (j[0] + res, j[1])
print(res)


n = int(input())
t = input()
u = [t[0]]
i = 0
j = 0
if n > 1:
	while i < n:
		j = j + 1
		i = j + i
		if i < n:
			u.append(t[i])
print(*u, sep='')


n = int(input())
s = input()
r = []
index = 0
step = 1
while True:
	r.append(s[index:index + 1])
	index += step
	step += 1
	if index >= n:
		break
print(''.join(r))


def m():
	n = int(input())
	s = input()
	ind = 0
	i = 1
	k = ''
	while ind <= n:
		try:
			k += s[ind]
			ind += i
			i += 1
		except IndexError:
			break
	print(k)
m()


a = int(input())
s = input()
i = 0
j = 1
b = ''
while i <= a - 1:
	i = i + j
	j = j + 1
	b = b + s[i - 1]
print(b)


n = int(input())
l = input()
i = 0
c = 1
while i < n:
	print(l[i], end='')
	i = i + c
	c = c + 1


s = input()
n = len(s)

def st(s, k):
	m = []
	j = -(k + 1)
	q = -1 if k == -1 else 1
	g = -1 if j == -1 else 1
	i = -1
	while i >= -n:
		m.append(s[k])
		k += q
		i -= 1
		if i >= -n:
			m.append(s[j])
			j += g
			i -= 1
	print(''.join(m[-1::-1]))
if n % 2 == 0:
	st(s, -1)
else:
	st(s, 0)


n = int(input())
s = list(input())
t = ''
count = 1
place = 0
while count <= n:
	if place <= n - 1:
		t = t + s[place]
	else:
		break
	place += count
	count += 1
print(t)


n = int(input())
s = input()
c = 0
ans = ''
for i in range(1, len(s) + 1):
	try:
		ans += s[c]
	except:
		pass
	c += i
print(ans)


n = int(input())
string = input()
x = 1
returner = ''
while True:
	try:
		returner += string[0]
		string = string[x:]
		x += 1
	except IndexError:
		break
print(returner)


n = int(input())
s = input().strip()
a = []
d = 0
x = []
b = [0, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65]
i = 0
while b[d] <= len(s):
	x.append(s[b[d]])
	d += 1
p = ''.join(x)
print(p)


s = input()
k = len(s) // 2 + (len(s) % 2 - 1)
o = ''
i = 0
while len(o) != len(s):
	o += s[k + i]
	if i > 0:
		i *= -1
	else:
		i = -i + 1
print(o)


n = int(input())
s = input()
b = 0
l = int((pow(1 + 8 * n, 0.5) - 1) / 2)
for i in range(l):
	print(s[i * (i + 1) // 2], end='')


n = int(input())
s = input()
i = 1
sm = 0
while sm < n:
	sm += i
	i += 1
new_len = i - 1
b = ''
ni = 1
for i in range(1, new_len + 1):
	b += s[ni - 1]
	ni += i
print(b)


n = int(input())
l = list(input())
inc = 1
i = 0
s = ''
while i < len(l):
	s += l[i]
	i += inc
	inc += 1
print(s)


def cipher(s, le):
	s2 = ''
	i = 1
	x = 0
	while x < le:
		s2 += s[x]
		x = x + i
		i += 1
	print(s2)
l = int(input())
a = input()
cipher(a, l)


def polycarp(cipher):
	l = len(cipher)
	out_str = ''
	i = 0
	cnt = 0
	while i < l:
		out_str = out_str + cipher[i]
		cnt += 1
		i = cnt * (cnt + 1) // 2
	return out_str
l = int(input())
cipher = str(input())
print(polycarp(cipher))


n = int(input())
ar = input()
k = (-1 + int(pow(1 + 8 * n, 0.5))) // 2
ans = ''
for i in range(1, k + 1):
	t = i * (i + 1) // 2
	ans += ar[t - 1]
print(ans)


def f():
	t = int(input())
	string = input()
	i = 0
	out = ''
	increment = 2
	while i < t:
		out += string[i]
		i += increment
		increment += 1
	print(out)
f()


t = int(input())
s = input()
k = 1
n = 1
while n <= t:
	subS = s[n - k:n]
	print(subS[0], end='')
	k += 1
	n += k


s = input()
ss = ''
a = len(s) // 2 - 1
if len(s) % 2 != 0:
	a = len(s) // 2
for i in range(len(s)):
	ss += s[a]
	a += pow(-1, i) * (i + 1)
print(ss)


n = int(input())
s = '$' + input()
t = ''
i = 1
j = 1
if n == 1:
	print(s[1])
else:
	while i <= n:
		t += s[i]
		i += j + 1
		j += 1
	print(t)


t = int(input())
s = input()
i = 0
g = 0
ans = []
while i <= t:
	g += 1
	i += g
	try:
		ans.append(s[i - 1])
	except IndexError:
		break
print(''.join(ans))


y = int(input())
s = input()
x = []
count = 0
i = 0
while i < y:
	x.append(s[i])
	count += 1
	i += count
print(''.join(x))


x = input()
t = len(x) - 1
if len(x) % 2 == 0:
	h = 0
else:
	h = 1
res = ''
for i in range(len(x) // 2):
	res = x[h] + x[t] + res
	h += 1
	t -= 1
if len(x) % 2 != 0:
	res += x[0]
print(res)


from math import *
s = input()
cen = floor(len(s) / 2) - (len(s) - 1) % 2
newStr = s[cen]
step = 1
for i in range(0, cen):
	newStr = newStr + s[cen + step] + s[cen - step]
	step += 1
if cen + step < len(s):
	newStr += s[cen - step]
print(newStr)


n = input()
t = input()
tlst = list(t)
if n == 1:
	print(t)
else:
	x = 0
	ans = [tlst[x:x + 1]]
	x += 1
	for i in range(1, len(tlst) + 1):
		ans.append(tlst[x:x + i + 1:1])
		x += i + 1
	ans = tuple(ans)
	l = []
	for i in range(len(ans)):
		if not ans[i]:
			pass
		else:
			l.append(ans[i][0])
	s = ''.join(l)
	print(s)


t = input()
l = len(t)
if l % 2 == 0:
	l += 1
	t = ' ' + t
a = l // 2
print(t[a], end='')
b = 1
for i in range(l // 2):
	pr = t[a + b]
	l = t[a - b]
	if pr != ' ':
		print(pr, end='')
	if l != ' ':
		print(l, end='')
	b += 1


n = int(input())
s = input()
print(*[s[i - 1] for i in filter(lambda x: x <= n, map(lambda x: x * (x + 1) // 2, range(1, n + 1)))], sep='')


n = int(input())
t = input()
s = str()
for i in range(1, n + 1):
	if t:
		s = f'{s}{t[:i][0]}'
		t = t[i:]
		continue
	break
print(s)


t = str(input())
g = len(t)
s1 = ''
if g == 1:
	s1 += t[0]
else:
	if g % 2 != 0:
		e = int((g + 1) / 2) - 1
		s1 = t[e]
		(i, j) = (1, 1)
		while len(s1) != g:
			s1 = s1 + t[e + i]
			i += 1
			s1 = s1 + t[e - j]
			j += 1
	if g % 2 == 0:
		f = int(g / 2) - 1
		s1 = t[f]
		(i, j) = (1, 1)
		while len(s1) != g:
			s1 = s1 + t[f + i]
			i += 1
			if f - j >= 0:
				s1 = s1 + t[f - j]
				j += 1
print(s1)


n = int(input())
encrypt = input()
idx = 0
i = 1
decrypt = ''
while idx < n:
	decrypt += encrypt[idx]
	idx = idx + i
	i += 1
print(decrypt)


l = list(input())
r = []
if len(l) % 2 == 0:
	for i in range(len(l) // 2, 0, -1):
		r.append(l[i - 1])
		r.append(l[len(l) - i])
else:
	for i in range(len(l) // 2 + 1, 0, -1):
		r.append(l[len(l) - i])
		r.append(l[i - 1])
	r.pop(0)
for i in r:
	print(i, end='')


import math
n = int(input())
s = input()
m = int(math.sqrt(2 * n))
ret = ''
while m > 0:
	ret += s[n - 1]
	n -= m
	m -= 1
print(ret[::-1])


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	s = S()
	r = []
	t = 0
	for i in range(1, 100):
		r.append(s[t])
		t += i
		if t >= n:
			break
	return ''.join(r)
print(main())


n = int(input())
s = input()
k = 0
string = ''
for j in range(n):
	if k != n:
		k += j + 1
		string += s[k - 1]
print(string)


def solution(a):
	start = int(len(a) / 2) - int(len(a) % 2 == 0)
	i = 0
	c_out = ''
	j = 1
	k = 0
	while i <= start:
		if i == 0:
			c_out += a[start]
		else:
			c_out += a[start + i]
			c_out += a[start - i]
		i += 1
	if len(a) % 2 == 0:
		c_out += a[-1]
	return c_out

def answer():
	a = list(input())
	print(solution(a))
answer()


n = int(input())
s = input()
i = cnt = 1
t = ''
while i <= n:
	t += s[i - 1]
	cnt += 1
	i += cnt
print(t)


n = int(input())
s = input()
s_new = ''
k = 0
lim = 1
for i in range(0, len(s)):
	if k == 0:
		s_new += s[i]
	k += 1
	if k == lim:
		k = 0
		lim += 1
print(s_new)


a = int(input())
s = input()[:a]
l = []
x = 1
p = 1
y = 0
while y < len(s):
	j = s[y:x]
	l.append(j[0])
	y = x
	p += 1
	x += p
print(''.join(l))


s = input()
news = ''
f = ''
if len(s) % 2 == 0:
	for i in range(int(len(s) / 2)):
		news = news + s[-1] + s[0]
		s = s[1:-1]
else:
	for i in range(int(len(s) / 2)):
		news = news + s[0] + s[-1]
		s = s[1:-1]
	news = news + s[0]
for char in reversed(news):
	f = f + char
print(f)


s0 = input()
n = len(s0) // 2
m = len(s0)
if not m % 2:
	s1 = s0[n - 1:n + 1]
	i = n - 2
	j = n + 1
	n -= 1
else:
	s0 += ' '
	s1 = s0[n:n + 2]
	i = n - 1
	j = n + 2
for k in range(n):
	s1 += s0[i] + s0[j]
	i -= 1
	j += 1
print(s1.split()[0])


n = int(input())
string = input()
i = 1
j = 1
while i <= n:
	print(string[i - 1], end='')
	i += j
	j += 1


n = int(input())
t = input()
res = []
i = 0
j = 1
while i <= n:
	res.append(t[i])
	j = j + 1
	i = i + j
for i in res:
	print(i, end='')


import math
n = int(input())
s = input()
ii = 0
ss = ''
nn = list(range(int(math.sqrt(2 * n + 1 / 4) - 1 / 2)))
index = 0
for i in nn:
	index = index + nn[i]
	ss += s[index]
print(ss)


n = int(input())
s = str(input())
x = 0
x1 = 1
t = ''
while x < n:
	t += s[x]
	x += x1
	x1 += 1
print(t)


a = str(input())
m = (len(a) - 1) // 2
result = ''
k = 1
znak = '+'
result = result + a[m]
if len(a) % 2 == 0:
	while m != len(a) - 1:
		if znak == '+':
			m += k
			result = result + a[m]
			k += 1
			znak = '-'
		elif znak == '-':
			m -= k
			result = result + a[m]
			k += 1
			znak = '+'
else:
	while m != 0:
		if znak == '+':
			m += k
			result = result + a[m]
			k += 1
			znak = '-'
		elif znak == '-':
			m -= k
			result = result + a[m]
			k += 1
			znak = '+'
print(result)


n = int(input())
s = input()
y = 0
i = 1
x = []
a = ''
while y < n:
	x.append(s[y])
	y = y + i - 1
	i += 1
del x[0]

def c(x):
	return a.join(x)
x = c(x)
print(x)


n = int(input())
t = input()
a = 0
b = 1
while n > a:
	print(t[a], end='')
	a += b
	b += 1


s = input()
o = ''
if len(s) % 2:
	for i in range(len(s) // 2):
		o = s[-1 - i] + s[i] + o
	print(s[len(s) // 2] + o)
else:
	for i in range(len(s) // 2):
		o = s[i] + s[-1 - i] + o
	print(o)


t = input()
s = ''
if len(t) % 2 == 0:
	s1 = t[:int(len(t) / 2)]
	s1 = s1[::-1]
	s2 = t[int(len(t) / 2):]
	for i in range(int(len(t) / 2)):
		s += s1[i] + s2[i]
else:
	s_extra = t[0]
	t = t[1:]
	s1 = t[:int(len(t) / 2)]
	s1 = s1[::-1]
	s2 = t[int(len(t) / 2):]
	for i in range(int(len(t) / 2)):
		s += s1[i] + s2[i]
	s += s_extra
print(s)


n = int(input())
s = input()
co = 0
new_s = ''
l = 0
while co < n:
	new_s += s[co]
	l += 1
	co += l
print(new_s)


n = int(input())
t = input()
s = ''
a = 0
j = 2
while a < n:
	s = s + t[a]
	a = a + j
	j = j + 1
print(s)


input()
string = list(input())
res = list()
if len(string) > 4:
	for i in range(len(string) // 2):
		a = string[:i + 1]
		if len(a) > 0:
			res.append(a[0])
		del string[:i + 1]
elif len(string) == 1:
	res.append(string[0])
else:
	res.append(string[0])
	res.append(string[1])
[print(i, end='') for i in res]


n = int(input())
text = input().strip()
b = 0
c = []
for i in range(n):
	b += i
	c.append(b)
for i in c:
	if i < n:
		print(text[i], end='')


s = input()
n = len(s)
ret = [None] * n
i = n - 2 if n % 2 == 0 else n - 1
k = 0
while i >= 0:
	ret[i] = s[k]
	k += 1
	i -= 2
i = 0 if i == -1 else 1
while i <= n - 1:
	ret[i] = s[k]
	k += 1
	i += 2
print(''.join(ret))


n = int(input())
t = input()
z = ''
i = 0
while i < len(t):
	z += t[i]
	i += len(z) + 1
print(z)


n = int(input())
s = input()
pos = 0
k = 1
ans = ''
while pos < n:
	ans = ans + s[pos]
	pos += k
	k += 1
print(ans)


n = int(input())
s = input()
i = 0
c = 1
S = ''
while i < len(s):
	S += s[i]
	c += 1
	i += c
print(S)


n = int(input())
s = input()
j = 0
import math
ans = []
a = math.sqrt(1 + 8 * n)
b = a - 1
x = int(b / 2)
for i in range(1, x + 1):
	ans.append(s[j])
	j = j + i
print(''.join(ans))


t = input()
g = len(t)
k = g // 2 + g % 2 - 1
s = t[k]
if g % 2 == 0:
	d = 0
else:
	d = 1
for h in range(1, g // 2 + d):
	s += t[k + h]
	s += t[k - h]
if g % 2 == 0:
	s += t[-1]
print(s)


input()
s = input()
i = 1
idx = 0
while idx < len(s):
	print(s[idx], end='')
	idx += i
	i += 1


s = input()
ns = ''
pos = len(s) // 2 + len(s) % 2 - 1
b = 1
while True:
	try:
		if pos < 0:
			break
		ns += s[pos]
		pos += b
		b *= -1
		if b < 0:
			b -= 1
		else:
			b += 1
	except:
		break
print(ns)


a = input()
(i, j) = (0, 1)
v = []
xd = len(a) // 2 - 1 if len(a) % 2 == 0 else len(a) // 2
for x in range(len(a)):
	if x % 2 == 0:
		v.append(a[xd - i])
		i += 1
	else:
		v.append(a[xd + j])
		j += 1
print(''.join(v))


n = int(input())
s = str(input())
for i in range(11):
	if i * (i + 1) == n * 2:
		m = i
ans = []
for i in range(1, m + 1):
	id = (i - 1) * i // 2
	ans.append(s[id])
print(''.join(ans))


n = int(input())
p = list(input())
l = []
pa = 1
for item in p:
	l.append(item)
	for y in range(pa):
		p.remove(item)
	pa += 1
print(''.join(l))


length = int(input())
en_word = input()
i = 0
inc = 1
while i < length:
	print(en_word[i], end='')
	i += inc
	inc += 1
print()


n = int(input())
s = input()
t = ''
i = 0
e = 0
while e < n:
	t += s[e]
	i += 1
	e += i
print(t)


from sys import stdout, stdin
import math
n = int(input())
s = input()
i = 0
step = 0
erg = ''
while True:
	i += step
	try:
		erg += s[i]
	except:
		break
	step += 1
print(erg)


a = int(input())
b = input()
count = 1
while count * (count + 1) <= a * 2:
	print(b[count * (count + 1) // 2 - 1], end='')
	count += 1


input()
str = input()
s = 0
p = 0
string = ''
while p < len(str):
	string += str[p]
	s += 1
	p += s
print(string)


lent = int(input())
inp = input()
i = 0
j = 0
while i < lent:
	print(inp[i], end='')
	j += 1
	i += j


a = list(input())
b = len(a)
c = b % 2
d = ''
e = b // 2
if c == 0:
	for i in range(e):
		d = d + str(a[e - 1 - i])
		d = d + str(a[e + i])
else:
	d = d + str(a[e])
	for i in range(e):
		d = d + str(a[e + 1 + i])
		d = d + str(a[e - 1 - i])
print(d)


n = int(input())
a = input()
for i in range(1, n + 1):
	s = i * (i + 1) // 2
	print(a[s - 1], end='')
	if s - 1 == len(a) - 1:
		break


number = int(input())
str = input()
i = 0
ans = ''
j = 1
while i < number:
	ans += str[i]
	j += 1
	i += j
print(ans)


k = int(input())
a = input()
c = len(a)
i = 0
c = 0
d = []
while c < len(a):
	d.append(a[c])
	i += 1
	c += i
d = ''.join(d)
print(d)


s = input()
s1 = []
if len(s) % 2 == 1:
	s1.append(s[len(s) // 2])
	for i in range(1, len(s) // 2 + 1):
		s1.append(s[len(s) // 2 + i])
		s1.append(s[len(s) // 2 - i])
else:
	for i in range(len(s) // 2):
		s1.append(s[len(s) // 2 - i - 1])
		s1.append(s[len(s) // 2 + i])
s2 = ''.join(s1)
print(s2)


import itertools
import math
from collections import defaultdict

def input_ints():
	return list(map(int, input().split()))

def solve():
	s = input()
	n = len(s)
	x = (n - 1) // 2
	y = x + 1
	ans = ''
	for i in range(n):
		if i % 2 == 0:
			ans += s[x]
			x -= 1
		else:
			ans += s[y]
			y += 1
	print(ans)
solve()


t = input()
z = ''
while len(t) > 0:
	if len(t) % 2 == 0:
		z = t[len(t) - 1] + z
		t = t[0:len(t) - 1]
	else:
		z = t[0] + z
		t = t[1:len(t)]
print(z)


w = int(input())
s = input()
k = 1
list1 = []
for i in range(len(s)):
	k += i
	i += k
	if i <= len(s):
		list1.append(i)
for ele in list1:
	print(s[ele - 1], end='')


n = int(input())
s = input()
i = 1
a = ''
while i * (i + 1) // 2 <= n:
	f = i * (i + 1) // 2
	a = a + s[f - 1]
	i += 1
print(a)


a = int(input())
b = input()
i = 0
t = 1
for f in range(a):
	if i + 1 <= a:
		print(b[i], end='')
		i += t
		t += 1


n = int(input())
t = str(input())
a = ''
i = 0
inc = 1
while i < n:
	i += inc
	a = a + t[i - 1]
	inc += 1
print(a)


import math
from collections import *
import sys
from functools import reduce

def get_ints():
	return map(int, input().strip().split())

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0)
n = int(input())
s = input()
start = 0
i = 2
while start < n:
	print(s[start], end='')
	start += i
	i += 1


x = eval(input())
y = input()
i = 0
j = 1
c = ''
while i < len(y):
	c += y[i]
	j += 1
	i += j
print(c)


n = int(input())
a = input()
value = 1
i = 0
x = ''
while i < n:
	x += a[i]
	i += value
	value += 1
print(x)


n = int(input())
s = input()
ans = ''
count = 1
i = 0
while i <= len(s) - 1:
	k = s[i:i + count]
	ans += k[0]
	i += count
	count += 1
print(ans)


n = int(input())
k = input()
step = 1
ansewer = ''
while n > 0:
	ansewer += k[0]
	k = k[step:len(k)]
	n -= step
	step += 1
print(ansewer)


x = int(input())
i = 0
string = input()
ans = ''
n = 1
while True:
	if i >= x:
		break
	print(string[i], end='')
	n += 1
	i += n - 1


l = int(input())
s = list(input())
i = 0
k = 0
while i < l:
	k += 1
	print(s[i], end='')
	i += k


num = int(input())
string = list(input())
output = ''
idx = 0
for i in range(num):
	idx += i
	if idx >= num:
		break
	output += string[idx]
print(output)


n = int(input())
s = input()
res = ''
i = 0
x = 1
while i < n:
	res += s[i]
	i += x
	x += 1
print(res)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	s = S()
	n = len(s)
	i = (n + 1) // 2 - 1
	l = i - 1
	r = i + 1
	ans = s[i]
	f = True
	while True:
		if f:
			if n <= r:
				return ans
			ans += s[r]
			r += 1
		else:
			if l < 0:
				return ans
			ans += s[l]
			l -= 1
		f = not f
print(main())


_ = input()
line = input()
d = 0
i = 0
res = []
while i < len(line):
	res.append(line[i])
	i += 1
	d += 1
	i += d
print(''.join(res))


from math import ceil
s = input()
n = len(s)
r = []
if n % 2:
	for i in range(n // 2):
		r.append(s[i])
		r.append(s[n - i - 1])
else:
	for i in range(n // 2):
		r.append(s[n - i - 1])
		r.append(s[i])
if n % 2:
	r.append(s[n // 2])
if n == 1:
	print(s)
else:
	print(''.join(r[::-1]))


n = int(input())
s = input()
p = (-1 + int((1 + 8 * n) ** 0.5)) // 2
result = ''
cur = 0
for i in range(p):
	result += s[cur]
	cur += i + 1
print(result)


n = int(input())
s = str(input())
m = 1
b = 0
l = []
p = []
while b != n:
	b = b + m
	m = m + 1
m = m - 1
for i in range(1, m + 1):
	l.append(s[:i])
	s = s[i:]
for i in range(len(l)):
	print(l[i][0], sep='', end='')


n = input()
tmp = ''
ln = len(n)
if ln % 2 == 0:
	i = ln // 2 - 1
else:
	i = ln // 2
switcher = True
while len(tmp) != ln:
	tmp += n[i]
	if switcher:
		i += len(tmp)
		switcher = False
	else:
		i -= len(tmp)
		switcher = True
print(tmp)


from collections import deque as dd
x = dd(input())
a = []
if len(x) % 2 == 1:
	a.append(x.popleft())
while x:
	a.append(x.pop())
	a.append(x.popleft())
a.reverse()
print(''.join([str(i) for i in a]))


def main():
	n = int(input())
	s = input()
	(t, xt) = (0, 0)
	while t < n:
		xt += 1
		t += xt
		print(s[t - 1], end='')
main()


n = int(input())
cipher = input()
message = ''
(i, ind) = (1, 0)
while ind < n:
	message += cipher[ind]
	ind += i
	i += 1
print(message)


n = int(input())
s = input()
decrypted = ''
i = 1
while len(s) > 0:
	char = s[0]
	s = s[i:]
	decrypted += char
	i += 1
print(decrypted)


size = int(input())
encrypted = input()
decrypted = ''
current_idx = 0
current_jump = 1
while current_idx < size:
	decrypted += encrypted[current_idx]
	current_idx += current_jump
	current_jump += 1
print(decrypted)


n = int(input())
s = input()
k = 0
if n == 1:
	print(s[0])
elif n > 1:
	for i in range(n):
		k += i
		if k < n:
			print(s[k], end='')


n = int(input())
x = input()
i = 0
p = 0
while p + i <= n:
	print(x[p + i], end='')
	p = p + i
	if i == 0:
		i = 2
	else:
		i = i + 1


n = map(int, input())
s = input()
output = []
length = len(s)
num = 1
i = 0
while i < length:
	output.append(s[i])
	i += num
	num += 1
print(''.join(output))


n = int(input())
inp = str(input())
s = ''
p = 0
for i in range(0, 10):
	s += inp[p]
	p += i + 1
	if p >= n:
		break
print(s)


t = list(input())
decrypted = []
if len(t) % 2 == 0:
	flag = True
else:
	flag = False
for i in range(len(t)):
	if flag:
		decrypted.append(t[-1])
		del t[-1]
	else:
		decrypted.append(t[0])
		del t[0]
	flag = not flag
decrypted.reverse()
print(''.join(decrypted))


t = input()
n = len(t)
if n % 2 == 0:
	t = ' ' + t
	n += 1
m = n // 2
s = t[m]
l = 1
while l <= n // 2:
	s = s + t[m + l] + t[m - l]
	l += 1
print(s)


n = int(input())
m = input()
a = ''
i = j = 0
while i < n:
	a += m[i]
	j += 1
	i += j
print(a)


l = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
n = int(input())
s = input()
for i in range(10):
	if l[i] == n:
		i += 1
		break
ans = ''
k = 0
for j in range(i):
	ans += s[k]
	k += j + 1
print(ans)


input()
(prev, s, step_number) = (None, '', 1)
t = input()

def get_t_n(n):
	return int(n * (n + 1) / 2)
while True:
	i = get_t_n(step_number)
	if len(t) >= i:
		s += t[i - 1]
		step_number += 1
	else:
		break
print(s)


n = int(input())
s = input()
i = 1
ptr = 0
res = ''
while ptr < n:
	res += s[ptr]
	i += 1
	ptr += i
print(res)


n = int(input())
s = str(input())
i = 0
x = 1
re = ''
while i < n:
	re += s[i]
	x += 1
	i += x
print(re)


k = int(input())
s = input()
step = 0
step2 = 1
q = []
while step <= k:
	q.append(s[step])
	step2 += 1
	step += step2
print(*q, sep='')


n = int(input())
a = input()
k = 1
i = 0
f = ''
while i < n:
	f += a[i]
	i += k
	k += 1
print(f)


s = input()
t = ''
if len(s) == 1:
	t = s
elif len(s) % 2 == 0:
	while s != '':
		t += s[-1]
		s = s[:-1]
		if s == '':
			break
		t += s[0]
		s = s[1:]
elif len(s) % 2 == 1:
	while s != '':
		t += s[0]
		s = s[1:]
		if s == '':
			break
		t += s[-1]
		s = s[:-1]
t = t[::-1]
print(t)


x = input()
if len(x) % 2 == 0:
	y = len(x) // 2 - 1
else:
	y = len(x) // 2
c = 0
f = 1
l = [x[y]]
c = c + 1
j = 0
while c != len(x):
	if j % 2 == 0:
		l = l + [x[y + f]]
		c = c + 1
		if c == len(x):
			break
	else:
		l = l + [x[y - f]]
		c = c + 1
		if c == len(x):
			break
	if j % 2 != 0:
		f = f + 1
	j = j + 1
print(''.join(map(str, l)))


t = int(input())
s = input()
ans = ''
i = 0
k = 0
while i < len(s):
	ans += s[i]
	for j in range(k):
		i += 1
	i += 1
	k += 1
print(ans)


import string
s = input()
ss = ''
if len(s) & 1:
	for i in range(len(s) // 2):
		ss = s[len(s) - i - 1] + s[i] + ss
	ss = s[len(s) // 2] + ss
else:
	for i in range(len(s) // 2):
		ss = s[i] + s[len(s) - i - 1] + ss
print(ss)


lenght = int(input())
string = input()
out = ''
summ = 1
now = 1
while summ <= lenght:
	out += string[summ - 1]
	summ += now
	now += 1
print(out)


from math import sqrt, floor
n = int(input())
q = 0
k = input()
strlen = int(floor(sqrt(n * 2)))
for i in range(1, strlen + 1):
	print(k[q], end='')
	q += i


s = input()
n = len(s)
st = (n - 1) // 2
ans = s[st]
i = 1
while len(s) != 1 and (n % 2 == 0 and st + i != n - 1 or (n % 2 == 1 and st - i >= 0)):
	ans += s[st + i]
	ans += s[st - i]
	i += 1
if n % 2 == 0:
	ans += s[n - 1]
print(ans)


n = int(input())
s = input()
inverse = {1: 1, 3: 2, 6: 3, 10: 4, 15: 5, 21: 6, 28: 7, 36: 8, 45: 9, 55: 10}
out = ''
seen = 0
for i in range(inverse[n]):
	out += s[seen]
	seen += i + 1
print(out)


s = input()
j = 0
n = ''
b = len(s)
if len(s) % 2 == 0:
	n += s[len(s) // 2 - 1]
	j = len(s) // 2 - 1
else:
	n += s[(len(s) - 1) // 2]
	j = (len(s) - 1) // 2
k = 1
if b % 2 == 0:
	for i in range(j + 1, b - 1):
		n += s[i]
		n += s[i - 2 * k]
		k += 1
	n += s[b - 1]
else:
	for i in range(j + 1, b):
		n += s[i]
		n += s[i - 2 * k]
		k += 1
print(n)


import math
n = int(input())
s = input()
k = 0
d = ''
for i in range(1, int(math.sqrt(n * 2)) + 1):
	d += s[k]
	k += i
print(d)


a = input()
k = len(a)
ans = ''
res = ''
if k % 2 == 0:
	for i in range(k // 2):
		res = a[i] + a[k - i - 1] + res
else:
	for i in range(k // 2):
		res = a[k - i - 1] + a[i] + res
	res = a[k // 2] + res
print(res)


t = input()
i = 0
j = len(t) - 1
l = []
if len(t) == 1:
	print(t)
else:
	if len(t) % 2 == 0:
		while i < j:
			l.append(t[j])
			j = j - 1
			l.append(t[i])
			i = i + 1
	else:
		while i <= j:
			if i == j:
				l.append(t[i])
				break
			else:
				l.append(t[i])
				i = i + 1
				l.append(t[j])
				j = j - 1
	l = l[::-1]
	s = ''
	for i in l:
		s = s + i
	print(s)


N = int(input())
T = input()
i = 1
ans = ''
while T != '':
	ans += T[0]
	T = T[i:]
	i += 1
print(ans)


def rahul(word):
	return [char for char in word]
a = int(input())
b = rahul(input())
c = list()
r = 0
n = 0
while r < a:
	r = r + n
	c.append(b[r])
	r = r + 1
	n = n + 1
print(''.join([char for char in c]))


l = int(input())
s = input().strip()
i = 0
c = 0
while i < l:
	print(s[i], end='')
	c += 1
	i += c
print('')


s = str(input())
so = ''
if len(s) == 1:
	print(s)
elif len(s) % 2 == 0:
	j = len(s) // 2 - 1
	i = j + 1
	while j >= 0 and i < len(s):
		so = so + s[j]
		so = so + s[i]
		i += 1
		j -= 1
	print(so)
else:
	j = len(s) // 2
	i = j + 1
	while j >= 0:
		if i < len(s):
			so = so + s[j]
			so = so + s[i]
			i += 1
			j -= 1
		else:
			so = so + s[j]
			j -= 1
	print(so)


n = input()
s = input()
p = 0
a = 1
while p < len(s):
	print(s[p], end='')
	p += a
	a += 1
print()


c = input()
Str = input()
mainString = ''
x = 0
a = Str.__len__()
i = 0
while i < a:
	mainString += Str[i]
	x += 1
	i += x
print(mainString)


(n, s) = (int(input()), input())
print(''.join((s[i * (i + 1) // 2] for i in range((int((8 * n + 1) ** 0.5) - 1) // 2))))


def main():
	encrypted = input()
	plain = ''
	if len(encrypted) % 2 == 0:
		flag = 1
	else:
		flag = 0
	for i in range(len(encrypted)):
		if flag % 2 == 1:
			plain = encrypted[-1] + plain
			if len(encrypted) != 1:
				encrypted = encrypted[:-1]
		else:
			plain = encrypted[0] + plain
			if len(encrypted) != 1:
				encrypted = encrypted[1:]
		flag += 1
	print(plain)
main()


n = int(input())
t = input()
i = 2
s = ''
s += t[:1]
c = 2
while i < n:
	s += t[i]
	i += c
	c += 1
print(s)


n = int(input())
s = input()
res = ''
k = 0
for i in range(n):
	if k >= n:
		break
	else:
		char = s[k]
		res += char
		k += i + 1
print(res)


z = int(input())
a = str(input())
n = 0
b = 1
while z > n:
	print(a[n], end='')
	n = b + n
	b = b + 1


cases = int(input())
string = str(input().rstrip())
real_str = ''
n = 0
m = 1
while n < len(string):
	real_str += string[n]
	n += m
	m += 1
print(real_str)


s = input()
l = len(s)
ans = list()
if l % 2 == 0:
	i = 0
	while i < l // 2:
		ans.append(s[l - 1 - i])
		ans.append(s[i])
		i += 1
else:
	i = 0
	while i < l // 2:
		ans.append(s[i])
		ans.append(s[l - 1 - i])
		i += 1
	ans.append(s[l // 2])
print(''.join(reversed(ans)))


n = int(input())
s = input()
t = ''
i = 0
sum1 = 0
while sum1 < n:
	sum1 += i
	i += 1
	t += s[sum1:sum1 + 1]
print(t)


l = int(input())
n = input()
i = 0
j = 1
h = 1
ans = ''
while j <= l:
	nN = n[i:j]
	ans += nN[0]
	i = j
	h += 1
	j += h
print(ans)


n = int(input())
s = input()
count = 0
try:
	for i in range(n // 2 + 1):
		count += i
		print(s[count], end='')
except IndexError:
	pass


n = int(input())
s = input()
(idx, cur) = (0, 1)
d = ''
while idx < n:
	d += s[idx]
	idx += cur
	cur += 1
print(d)


s = input()
s = list(s)
l = len(s)
a = 0
decoded = []
if l % 2 != 0:
	a = l // 2
	decoded.append(s[a])
	for i in range(1, l // 2 + 1):
		decoded.append(s[a + i])
		decoded.append(s[a - i])
if l % 2 == 0:
	a = l // 2 - 1
	decoded.append(s[a])
	for i in range(1, l // 2):
		decoded.append(s[a + i])
		decoded.append(s[a - i])
	decoded.append(s[l - 1])
for i in range(l):
	print(decoded[i], end='')


n = int(input())
st = input()
i = 0
j = 1
while i < n:
	print(st[i], end='')
	for _ in range(j):
		i += 1
	j += 1


n = input()
s = input()
i = 0
c = 1
ans = ''
while i < len(s):
	ans += s[i]
	i += c
	c += 1
print(ans)


n = int(input())
s = list(input())
ans = []
x = 0
d = 2
while x <= n - 1:
	ans.append(s[x])
	x += d
	d += 1
print(''.join(ans))


str = input()
str1 = str[0:(len(str) + 1) // 2]
str2 = str[(len(str) + 1) // 2:]
str1 = str1[::-1]
output = []
for i in range((len(str) + 1) // 2):
	output.append(str1[i])
	try:
		output.append(str2[i])
	except:
		break
for a in output:
	print(a, end='')
print()


s = input()
l = len(s)
t = [0] * l
(t[::2], t[1::2]) = (s[(l - 1) // 2::-1], s[(l + 1) // 2:])
print(''.join(t))


a = input()
itog = ''
chet = 0
chet1 = 0
chet2 = -1
it = 0
if len(a) % 2 == 0:
	chet = -1
for i in a:
	if chet == 0:
		it = chet1
	else:
		it = chet2
	itog = itog + a[it]
	if chet == 0:
		chet = -1
		chet1 += 1
	else:
		chet = 0
		chet2 -= 1
itog = itog[::-1]
print(itog)


j = eval(input())
c = input()
c = list(c)
k = 0
n = 0
for m in range(j):
	n += k
	k += 1
	if n + 1 > j:
		break
	print(c[n], end='')


n = int(input())
S = input()
i = 0
b = 1
nS = ''
while True:
	try:
		nS += S[i]
		i += b
		b += 1
	except:
		break
print(nS)


st = input()
s = ''
if len(st) % 2 == 0:
	n = len(st) // 2
else:
	n = len(st) // 2 + 1
s3 = st[:n]
s2 = st[n:]
s1 = ''
for i in s3:
	s1 = i + s1
for i in range(len(s1)):
	s += s1[i]
	if i != len(s2):
		s += s2[i]
print(s)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
s = get_string()
result = ''
n = len(s)
if n % 2 == 0:
	for i in range(n // 2):
		result = s[i] + s[~i] + result
else:
	for i in range(n // 2):
		result = s[~i] + s[i] + result
	result = s[n // 2] + result
print(result)


a = input()
b = ''
if len(a) % 2 == 1:
	b = a[len(a) // 2]
	w = len(a) // 2
	for i in range(1, len(a) // 2 + 1):
		b += a[w + i]
		b += a[w - i]
	print(b)
if len(a) % 2 == 0:
	b = a[len(a) // 2 - 1]
	w = len(a) // 2 - 1
	for i in range(1, len(a) // 2):
		b += a[w + i]
		b += a[w - i]
	b += a[-1]
	print(b)


s = input()
ln = len(s)
res = ''
while ln != 0:
	pos = ln % 2 - 1
	current = s[pos]
	if pos == 0:
		s = s[1:]
	else:
		s = s[:-1]
	ln = len(s)
	res = current + res
print(res)


n = int(input())
s = input().rstrip()
x = list(s)
q = []
a = 1
i = 0
while i < len(x):
	t = x[i:i + a]
	i += a
	a += 1
	q.append(t[0])
C = ''.join(q)
print(C)


gi = lambda : list(map(int, input().split()))
gi()
s = input()
ans = s[0]
s = s[1:]
c = 1
while s:
	c += 1
	ans += s[0]
	s = s[c:]
print(ans)


n = input()
s = [c for c in n]
l = len(n)
d = (l >> 1) + (l & 1)
k = -1
for i in range(l):
	d += k * i
	s[i] = n[d - 1]
	k = -k
ans = ''
for i in s:
	ans += i
print(ans)


n = int(input())
s = input()
(c, k) = (0, 1)
while c < len(s):
	print(s[c:c + k][0], end='')
	(k, c) = (k + 1, c + k)


n = int(input())
st = input()
res = st[0]
i = 2
t = 1
if len(st) > 1:
	while t < n:
		res = res + st[t]
		t = t + i
		i = i + 1
print(res)


n = int(input())
s = input()
i = 0
j = 1
o = ''
while i < n:
	o += s[i]
	i += j
	j += 1
print(o)


n = int(input())
a = list(input())
b = []
s = 1
i = 1
while s <= n:
	i = i + 1
	b.append(a[s - 1])
	s = s + i
for i in b:
	print(i, end='')


t = int(input())
s = input()
a = []
(s1, i, j) = ('', 0, 1)
while i < t:
	s1 += s[i]
	j += 1
	i += j
print(s1)


n = int(input())
s = input()
x = s[0]
m = 2
sum = 1
while sum < n:
	x += s[sum]
	sum += m
	m += 1
print(x)


n = int(input())
s = input().rstrip()
i = 1
c = 0
ans = ''
while c < n:
	ans += s[c]
	c += i
	i += 1
print(ans)


n = int(input())
a = input()
index = 0
s = ''
gap = 1
while index < n:
	s += a[index]
	index += gap
	gap += 1
print(s)


s = input()
j = len(s) // 2 if len(s) % 2 != 0 else len(s) // 2 - 1
k = j
for i in range(len(s)):
	if i % 2 is 0:
		print(s[k], end='')
		j += 1
	else:
		print(s[j], end='')
		k -= 1


n = int(input())
s = input()
f = ''
a = 0
m = 1
while a < n:
	a = m * (m + 1) // 2
	f += s[a - 1]
	m += 1
print(f)


import math
n = int(input())
s = input()
z = math.sqrt(1 + 8 * n) - 1
y = int(z // 2)
x = 0
for i in range(y):
	print(s[x + i], end='')
	x = x + i


def shifrovanie(s):
	if len(s) == 1:
		return s
	(result, count) = ('', 1)
	a = [0] * len(s)
	for i in range(1, len(s)):
		a[i] = a[i - 1] + i
	for i in range(len(s)):
		if i + 1 == a[count]:
			result += s[i]
			count += 1
	return result
n = int(input())
t = input()
print(shifrovanie(t))


n = int(input())
a = input()
l = []
m = []
b = []
if n == 1:
	print(a)
else:
	for i in range(1, n):
		s = i * (i + 1) // 2
		l.append(s)
	for j in l:
		if j < n + 1:
			b.append(j)
	for k in b:
		m.append(a[k - 1])
	print(''.join([str(e) for e in m]))


palabra = input()
tam = len(palabra)
palabraObjetivo = ''
if tam % 2 == 0:
	for i in range(0, len(palabra)):
		if i % 2 == 0:
			palabraObjetivo = palabra[-1] + palabraObjetivo
			palabra = palabra[:-1]
		else:
			palabraObjetivo = palabra[0] + palabraObjetivo
			palabra = palabra[1:]
else:
	for i in range(0, len(palabra)):
		if i % 2 == 0:
			palabraObjetivo = palabra[0] + palabraObjetivo
			palabra = palabra[1:]
		else:
			palabraObjetivo = palabra[-1] + palabraObjetivo
			palabra = palabra[:-1]
print(palabraObjetivo)


n = int(input(''))
s = input('')
last = ''
k = 0
p = 1
while k != n:
	last = last + s[k]
	k += p
	p += 1
print(last)


import os
import sys
from io import BytesIO, IOBase

def solve():
	ans = ''
	n = int(input())
	s = input()
	l = 0
	i = 0
	while l < n:
		ans = ans + s[l]
		l = l + i + 1
		i += 1
	print(ans)

def main():
	solve()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
a = input()
i = 1
s = 1
new = []
while s <= n:
	new.append(a[s - 1])
	i += 1
	s += i
str = ''.join(new)
print(str)


s = input()
lst = list(s)
templst = []
n = len(s)
if n % 2 == 0:
	for i in range(n // 2):
		templst.append(s[n // 2 - i - 1])
		templst.append(s[n // 2 + i])
if n % 2 == 1:
	for i in range(n // 2 + 1):
		if i == 0:
			templst.append(s[n // 2])
		else:
			templst.append(s[n // 2 + i])
			templst.append(s[n // 2 - i])
print(''.join(templst))


s = list(input())
if len(s) == 1:
	print(''.join(s))
elif len(s) % 2 == 0:
	first = s[0:len(s) // 2]
	f = list(first)
	f.reverse()
	first = ''.join(f)
	last = s[len(s) // 2:]
	rem = ''
	for i in range(len(s) // 2):
		rem += first[i]
		rem += last[i]
	print(rem)
else:
	first = s[0:len(s) // 2]
	last = s[len(s) // 2 + 1:]
	f = list(first)
	f.reverse()
	first = ''.join(f)
	rem = ''
	rem += s[len(s) // 2]
	for i in range(len(first)):
		rem += last[i]
		rem += first[i]
	print(rem)


input()
n = list(input())
t = []
i = 1
ln = len(n)
while ln != 0:
	t.append(n[0])
	i += 1
	for __ in range(i - 1):
		n.remove(n[0])
		ln -= 1
print(*t, sep='')


n = int(input())
a = input()
i = 0
c = 1
while i < n:
	print(a[i], end='')
	i = i + c
	c = c + 1


n = int(input())
arr = list(input())
l = []
i = 0
while i < len(arr):
	l.append(arr[i])
	del arr[:i]
	i += 1
print(''.join(l))


n = int(input())
s = input()
ans = ''
j = 1
k = 0
for i in range(n):
	b = s[k:k + j]
	ans += b[0]
	k = k + j
	if k >= n:
		break
	j += 1
print(ans)


from sys import stdin
n = int(stdin.readline().strip())
s = input()
ans = ''
x = 0
y = 1
while x < n:
	ans += s[x]
	x += y
	y += 1
print(ans)


n = int(input())
tmp = input()
i = 0
k = 2
while 1:
	print(tmp[i], end='')
	if i == n - 1:
		break
	i += k
	k += 1


a = input()
s = ''
k = True
if len(a) % 2 == 0:
	k = True
else:
	k = False
q = len(a)
while q != 0:
	if k == True:
		s = a[-1] + s
		a = a[:len(a) - 1]
		q -= 1
		k = False
	else:
		s = a[0] + s
		a = a[1:]
		q -= 1
		k = True
print(s)


import math
n = int(input())
s = input()
ans = ''
p = 0
t = (-1 + math.sqrt(1 + 8 * n)) // 2
for i in range(int(t)):
	ans = ans + s[p + i]
	p = i + p
print(ans)


input()
a = input()
i = 0
j = 1
b = ''
while i < len(a):
	b += a[i]
	i += j
	j += 1
print(b)


in1 = int(input())
in2 = input()
i = 0
j = 1
s = ''
while i < in1:
	s = s + in2[i]
	j = j + 1
	i = i + j
print(s)


n = int(input())
s = input()
i = 0
di = 1
ans = ''
while True:
	if i >= n:
		break
	ans += s[i]
	i += di
	di += 1
print(ans)


a = input()
s = ''
k1 = len(a)
for i in range(k1):
	k = len(a)
	if k % 2 == 0:
		s += a[-1]
		a = a[:-1]
	else:
		s += a[0]
		a = a[1:]
print(s[::-1])


S = list(input())
N = len(S)
if N % 2 == 0:
	s = ''
	for i in range(N // 2):
		x = S[i]
		y = S[N - 1 - i]
		s = x + y + s
	print(s)
else:
	s = ''
	for i in range(N // 2):
		x = S[N - 1 - i]
		y = S[i]
		s = x + y + s
	s = S[N // 2] + s
	print(s)


s = input()
length = len(s)
new = ''
if length % 2 == 0:
	mid = length // 2 - 1
	for i in range(mid, -1, -1):
		new += s[i]
		new += s[length - 1 - i]
else:
	mid = length // 2
	new += s[mid]
	for i in range(mid - 1, -1, -1):
		new += s[length - 1 - i]
		new += s[i]
print(new)


n = int(input())
s = list(input())
s.reverse()
(res, count) = ([], 1)
while len(s) != 0:
	res.append(s[-1])
	for i in range(count):
		s.pop()
	count += 1
print(*res, sep='')


n = int(input())
s = input()
a = 0
new = ''
for i in range(n):
	a = a + i
	if a < n:
		new += s[a]
print(new)


i = input()
s = input()
e = 0
l = 1
r = 2
li = []
while l <= int(i):
	li.append(s[e:l])
	e = l
	l = l + r
	r += 1
for y in li:
	ind = li.index(y)
	li[ind] = y[0]
str = ''
for z in li:
	str += z
print(str)


n = int(input())
a = input()
ans = []
i = 1
while len(a) != 0:
	ans += [a[0]]
	a = a[i:]
	i += 1
print(*ans, sep='')


n = int(input())
s = input()
s = list(s)
minus = 1
counter = 0
while n != 0:
	n -= minus
	counter += 1
	minus += 1
jump = 0
x = []
cp = 0
while len(x) != counter:
	cp += jump
	x.append(s[cp])
	jump += 1
print(''.join(x))


n = int(input())
t = input()
count = 0
j = 1
while count < n:
	print(t[count], end='')
	count = count + j
	j += 1


s = input()
count = 0
i = 1
l = len(s)
if l == 1 or l == 2:
	print(s)
else:
	if l % 2 == 0:
		m = l // 2 - 1
	else:
		m = l // 2
	print(s[m], end='')
	count += 1
	m += count
	print(s[m], end='')
	count += 1
	while True:
		if count == l:
			break
		if count % 2 == 0:
			m -= count
			print(s[m], end='')
			count += 1
		else:
			m += count
			print(s[m], end='')
			count += 1


n = int(input())
lst = []
z = 0
n1 = input()
s = n1[:n]
for i in s:
	lst.append(i)
for i in range(n):
	s = lst[:i + 1]
	if lst == []:
		break
	print(s[0], end='')
	for j in s:
		lst.remove(j)


text = input()
rez = ''
if len(text) % 2 == 0:
	while len(text) != 0:
		rez = text[-1] + rez
		text = text[:-1]
		if len(text) != 0:
			rez = text[0] + rez
			text = text[1:]
else:
	while len(text) != 0:
		rez = text[0] + rez
		text = text[1:]
		if len(text) != 0:
			rez = text[-1] + rez
			text = text[:-1]
print(rez)


n = int(input())
s = input()
i = 0
cnt = 1
res = ''
while i < len(s):
	res += s[i]
	i += cnt
	cnt += 1
print(res)


import math
n = int(input())
t = input()
sl = (-1 + int(math.sqrt(1 + 8 * n))) // 2
s = ''
for i in range(sl):
	s = s + t[i * (i + 1) // 2]
print(s)


n = int(input())
string = str(input())
val = 0
for i in range(56):
	if i * (i + 1) // 2 == n:
		val = i
		break
temp = str()
string = string[::-1]
for i in range(val, 0, -1):
	temp += string[0]
	string = string[i:]
print(temp[::-1])


n = int(input())
s = input()
index = 0
ans = ''
temp = 1
while index < n:
	ans += s[index]
	for j in range(1, temp + 1):
		index += 1
	temp += 1
print(ans)


from collections import deque
Input = deque(input())
OutPut = deque()
if len(Input) % 2 == 0:
	for i in range(len(Input)):
		OutPut.appendleft(Input.pop() if i % 2 == 0 else Input.popleft())
else:
	for i in range(len(Input)):
		OutPut.appendleft(Input.pop() if i % 2 != 0 else Input.popleft())
print(*list(OutPut), sep='')


n = int(input())
p = input()
j = 0
x = 1
i = 0
a = ''
s = len(p)
while i < n:
	a = a + p[i]
	i = i + x
	x = x + 1
print(a)


l = input()
s = input()
i = 0
c = 1
while i < len(s):
	print(s[i], end='')
	i += c
	c += 1


n = int(input())
x = 1
y = 1
s = str(input())
while y <= n:
	print(s[y - 1], end='')
	x += 1
	y = (x * x + x) // 2


n = int(input())
s = input()
ans = ''
i = 0
ad = 1
while i < n:
	ans += s[i]
	i += ad
	ad += 1
print(ans)


n = int(input())
s = input()
o = ''
p = 0
i = 0
while p < n:
	try:
		p = i * (i + 1) // 2
		print(s[p], end='')
		i = i + 1
	except:
		pass


s = input()
result = []
for i in reversed(range(len(s))):
	if i % 2 == 0:
		result.append(s[0])
		s = s[1:]
	else:
		result.append(s[-1])
		s = s[:-1]
result.reverse()
print(''.join(result))


n = int(input())
s = input()
for i in range(1, n + 1):
	if i * (i + 1) == 2 * n:
		break
r = ''
j = 0
k = 1
while i > 0:
	r += s[j]
	j += k
	k += 1
	i -= 1
print(r)


import cmath

def calculate_sequence_number(i):
	res = 0
	for i in range(1, i + 1):
		res += i
	return res

def solve_quadratic_equation(c):
	a = 1
	b = 1
	c = -2 * c
	d = b ** 2 - 4 * a * c
	sol1 = (-b - cmath.sqrt(d)) / (2 * a)
	sol2 = (-b + cmath.sqrt(d)) / (2 * a)
	return (sol1.real, sol2.real)

def main():
	c = int(input())
	cipher = input()
	(sol1, sol2) = solve_quadratic_equation(c)
	decrypted_string = ''
	if sol1 > 0:
		for i in range(1, int(sol1 + 1)):
			increase_sequence = calculate_sequence_number(i)
			decrypted_string += cipher[increase_sequence]
	if sol2 > 0:
		for i in range(1, int(sol2 + 1)):
			increase_sequence = calculate_sequence_number(i)
			decrypted_string += cipher[increase_sequence - 1]
	print(decrypted_string)
main()


wordC = input()
n = len(wordC)
m = (n + 1) // 2 - 1
print(wordC[m], end='')
for i in range(1, n // 2):
	print(wordC[m + i], wordC[m - i], sep='', end='')
if n > 1:
	if n % 2 == 0:
		print(wordC[-1])
	else:
		print(wordC[-1], wordC[0], sep='')


n = int(input())
s = input()
a = 0
k = 1
while a < len(s):
	print(s[a], end='')
	a = a + k
	k += 1
print()


n = int(input())
s = input()
f = (1 + 8 * n) ** (1 / 2) - 1
j = int(f // 2)
l = []
for i in range(1, j + 1):
	t = (i ** 2 - i + 2) // 2
	l.append(s[t - 1])
a = ''.join(l)
print(a)


n = int(input())
s = input()
res = ''
(ind, i) = (0, 0)
while ind < n:
	res += s[ind]
	i += 1
	ind += i
print(res)


a = int(input())
p = input()
j = int(0)
pr = ''
while j * (j + 1) // 2 < a:
	pr = pr + p[j * (j + 1) // 2]
	j = j + 1
print(pr)


s = input()
s1 = ''
b = len(s) - 1
a = 0
if len(s) == 1:
	print(s)
elif len(s) % 2 == 0:
	while a - b != 1:
		s1 = s[a] + s[b] + s1
		b -= 1
		a += 1
else:
	while b >= a:
		s1 = s[b] + s[a] + s1
		b -= 1
		a += 1
if len(s) % 2 == 0:
	print(s1)
if len(s) % 2 == 1 and len(s) > 1:
	print(s1[1:])


import math
import os
import random
import re
import sys

def main():
	x = int(input())
	t = input().strip()
	n = int((-1 + math.sqrt(1 + 8 * x)) / 2)
	s = ''
	ind = 0
	for i in range(1, n + 1):
		s += t[ind]
		ind = ind + i
	print(s)
main()


n = int(input())
t = input()
L = [i for i in t]
i = 1
s = ''
while L != []:
	s += L[0]
	for k in range(i):
		L.remove(L[0])
	i += 1
print(s)


import math
A = list(str(input()))
B = A[:math.ceil(len(A) / 2)]
B = B[::-1]
C = A[math.ceil(len(A) / 2):]
res = ''
for i in range(len(B)):
	res += B[i]
	if i < len(C):
		res += C[i]
print(res)


n = int(input())
l = list(input())
n1 = n
p = 0
su = 0
l1 = []
while n != 0:
	p += 1
	n -= p
for i in range(p):
	su += i
	l1.append(l[su])
print(*l1, sep='')


import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
INF = 1 << 60
MOD = 10 ** 9 + 7
n = int(input())
t = input()
gap = 2
i = 0
ans = t[0]
while i + gap < n:
	ans += t[i + gap]
	i += gap
	gap += 1
print(ans)


x = int(input())
s = str(input())
s1 = str()
j = 1
n = 1
i = 0
while i <= x - 1:
	s1 += s[i]
	n += 1
	i += j * n
print(s1)


def process(A, n):
	temp = 1
	while True:
		a = temp * (temp + 1) // 2
		if a > len(A):
			break
		else:
			print(A[a - 1], end='')
			temp = temp + 1
n = int(input())
A = input()
process(A, n)


string = input()
result = ''
took_left = 0
took_right = 0
for i in range(len(string)):
	if (len(string) - i) % 2 == 0:
		result += string[-took_left - 1]
		took_left += 1
	else:
		result += string[took_right]
		took_right += 1
print(result[::-1])


n = int(input())
s = input()
begin = 1
i = 0
r = ''
while i < n:
	r += s[i]
	i += begin
	begin += 1
print(r)


n = int(input())
s = input()
s = '@' + s
ans = ''
a = []
for i in range(1, 56):
	a.append(i)
j = 0
i = 1
while i <= n:
	ans += s[i]
	i = i + a[j]
	j += 1
print(ans)


n = int(input())
s = input()
h = 0
for i in range(n):
	h += i
	if h < n:
		print(s[h], end='')


k = int(input())
s = input()
fin = ''
n = 0
n2 = 1
while n < k:
	fin = fin + s[n]
	n = n + n2
	n2 += 1
print(fin)


n = int(input())
s = input()
i = 0
k = 0
out = list()
while i < n:
	k += 1
	out.append(s[i])
	i += k
print(''.join(out))


import math

def main():
	s = input()
	l = len(s)
	string = ''
	for i in range(l):
		if l % 2 == 0:
			if i & 1:
				string += s[i // 2]
			else:
				string += s[l - i // 2 - 1]
		elif i & 1:
			string += s[l - i // 2 - 1]
		else:
			string += s[i // 2]
	for i in range(l):
		print(string[l - 1 - i], end='')
main()


n = int(input())
s = list(input())
new = []
j = 0
for i in range(n):
	new.append(s[j])
	j += 2 + i
	if j >= n:
		break
print(''.join(new))


import math
from decimal import Decimal
import heapq

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
s = input()
new = ''
d = len(s)
if d == 1:
	print(s)
	exit()
if d % 2 == 0:
	l = 0
	r = d - 1
	while l < d // 2:
		new += s[r]
		new += s[l]
		l += 1
		r -= 1
	print(new[::-1])
else:
	l = d - 1
	r = 0
	while r <= d // 2:
		new += s[r]
		new += s[l]
		l -= 1
		r += 1
	print(new[::-1][1:])


n = int(input())
s = input()
d = 1
p = 0
res = []
while p < len(s):
	res.append(s[p])
	p += d
	d += 1
print(''.join(res))


loncat = 1
idx = 0
n = int(input())
word = input()
akhir = ''
while idx < len(word):
	akhir = akhir + word[idx]
	idx = idx + loncat
	loncat += 1
print(akhir)


a = int(input())
s = str(input())
k = 2
i = 0
q = ''
q += s[i]
i = 2
while i <= len(s) - 1:
	q += s[i]
	i += k
	k += 1
print(q)


n = int(input())
L = list(map(str, input()))
k = 1
i = 0
while i < n:
	print(L[i], end='')
	i = i + k
	k += 1


n = int(input())
p = list(input())
q = []
i = 0
o = 1
while i < n:
	q.append(p[i])
	i += o
	o += 1
for i in q:
	print(i, end='')


n = int(input())
t = input()
c = 0
f = 0
res = ''
for i in t:
	if f == 0:
		c += 1
		res += i
		f += c
	else:
		f -= 1
print(res)


st = list(input())
if len(st) % 2 == 0:
	lf = []
	l1 = st[:len(st) // 2]
	l2 = st[len(st) // 2:]
	for i in range(len(st) // 2):
		lf.append(l1[-(i + 1)])
		lf.append(l2[i])
	print(''.join(lf))
else:
	lf = [st[len(st) // 2]]
	l1 = st[:len(st) // 2]
	l2 = st[len(st) // 2 + 1:]
	for i in range(len(st) // 2):
		lf.append(l2[i])
		lf.append(l1[-(i + 1)])
	print(''.join(lf))


s = input()
rev = False
if len(s) % 2 == 1:
	print(s[len(s) // 2], end='')
	rev = True
for i in range(len(s) // 2 - 1, -1, -1):
	if rev:
		(a, b) = (s[-i - 1], s[i])
	else:
		(a, b) = (s[i], s[-i - 1])
	print(a, b, sep='', end='')


k = input()
k = int(k)
s = input()
i = 0
ans = ''
t = 1
while i < k:
	ans += s[i]
	i += t
	t += 1
print(ans)


n = int(input())
S = input()
T = ''
d = 1
i = 0
while i < len(S):
	T += S[i]
	i += d
	d += 1
print(T)


k = int(input())
b = input()
n = (-1 + (1 + 8 * k) ** (1 / 2)) / 2
l = []
for i in range(int(n)):
	l.append(b[int((i * i + i) / 2)])
h = ''.join(l)
print(h)


x = int(input())
string = input()
result = ''
k = 0
n = 0
flag = False
while k < len(string):
	try:
		k += n
		result = result + string[k]
	except:
		print(result)
		flag = True
	n += 1
if flag == False:
	print(result)


n = int(input())
s = input()
ans = ''
(ind, inc) = (0, 1)
while ind < n:
	ans += s[ind]
	ind += inc
	inc += 1
print(ans)


s = input()
itg = ''
if len(s) % 2 == 0:
	itg1 = s[len(s) // 2 - 1]
	s = s[:len(s) // 2 - 1] + s[len(s) // 2:]
	i = 0
else:
	itg1 = s[len(s) // 2]
	s = s[:len(s) // 2] + s[len(s) // 2 + 1:]
	i = 1
while s:
	if i % 2 == 0:
		itg += s[-1]
		s = s[:-1]
	else:
		itg += s[0]
		s = s[1:]
	i += 1
print(itg1 + itg[::-1])


(n, s) = (int(input()), input())
(ind, turn) = (0, 1)
result = ''
while ind < n:
	result += s[ind]
	ind += turn
	turn += 1
print(result)


n = int(input())
t = input()
val = 0
for i in range(n):
	if i * (i + 1) / 2 == n:
		val = i
		break
c = 0
r = []
s = 1
re1 = 0
r.append(t[0])
for i in range(1, val + 1):
	re1 = s + i
	if re1 >= len(t):
		break
	r.append(t[re1])
	s = re1 + 1
res = ''.join(r)
print(res)


def decode(en_str, length):
	res = []
	(idx, cnt) = (0, 1)
	while idx < length:
		res.append(en_str[idx])
		idx += cnt
		cnt += 1
	return ''.join(res)
(n, s) = (int(input()), input())
print(decode(s, n))


x = int(input())
y = input()
z = []
l = y[0]
count = 1
for c in range(1, x):
	if c + count >= x:
		break
	z.append(c)
	p = z[c - 1] + count
	l = l + y[p - 1]
	count = count + c
print(l)


n = int(input())
s = input()
res = ''
t = 1
i = 1
while True:
	if t > len(s):
		break
	res += s[t - 1]
	t += i
	i += 1
print(res)


string = input()
ans = ''
if len(string) % 2 == 0:
	last = string[-1]
	mid = (len(string) - 1) // 2
	for i in range(1, mid + 1):
		ans += string[mid + i]
		ans += string[mid - i]
	print(string[mid] + ans + last)
else:
	mid = len(string) // 2
	for i in range(1, mid + 1):
		ans += string[mid + i]
		ans += string[mid - i]
	print(string[mid] + ans)


n = int(input())
word = input()
cnt = 1
i = 0
ans = ''
while i < len(word):
	ans += word[i]
	i += cnt
	cnt += 1
print(ans)


import math, sys
from fractions import *

def mp():
	return list(map(int, input().split()))

def f(q):
	if q == -1:
		return 0
	return -1

def main():
	a = input().strip()
	if len(a) % 2 == 0:
		q = -1
	else:
		q = 0
	ans = ''
	while len(a):
		ans = a[q] + ans
		if q == -1:
			a = a[:len(a) - 1]
		else:
			a = a[1:]
		q = f(q)
	print(ans)
deb = 0
if deb:
	file = open('input.txt', 'w')
else:
	input = sys.stdin.readline
main()


n = int(input())
s = input()
l = 0
r = 1
k = 1
w = ''
while r <= n:
	w += s[l:r][0]
	k += 1
	l = r
	r += k
print(w)


n = int(input())
crypt = input()
ans = crypt[0]
triangle = 0
increment = 1
while True:
	increment += 1
	triangle += increment
	if triangle < n:
		ans += crypt[triangle]
	else:
		break
print(ans)


n = int(input())
s = input()
ans = [''] * 10
dst = 0
i = 0
step = 1
while i < n:
	ans[dst] = s[i]
	dst += 1
	i += step
	step += 1
print(''.join(ans))


i = 0
ans = ''

def solve(s, i):
	global ans
	if s == '':
		return
	if i == 0:
		ans = s[i] + ans
		s = s[1:]
		solve(s, len(s) - 1)
	else:
		ans = s[i] + ans
		s = s[:i]
		solve(s, 0)
s = input()
if len(s) % 2 == 1:
	solve(s, 0)
else:
	solve(s, len(s) - 1)
print(ans)


a = int(input())
t = int((-1 + (1 + 8 * a) ** 0.5) / 2)
s = input()
for i in range(1, t + 1):
	k = int((1 + i) * i / 2)
	print(s[k - 1], end='')


s = input()
if len(s) % 2 != 0:
	st = s[len(s) // 2]
	start = len(s) // 2
else:
	st = s[len(s) // 2 - 1]
	start = len(s) // 2 - 1
i = True
left = 1
right = 1
while len(st) < len(s):
	if i:
		st += s[start + left]
		left += 1
	else:
		st += s[start - right]
		right += 1
	i = not i
print(st)


t = list(input())
length = len(t)
s = []
if length % 2 == 0:
	i = length // 2 - 1
	while i >= 0:
		s.append(t.pop(i))
		s.append(t.pop(i))
		i -= 1
else:
	i = length // 2
	while i >= 1:
		s.append(t.pop(i))
		s.append(t.pop(i))
		i -= 1
	s.append(t.pop(0))
print(''.join(s))


n = int(input())
en = input()
dcrpt = ''
indx = 0
increment = 0
while True:
	dcrpt += en[indx]
	increment += 1
	indx = indx + increment
	if indx >= n - 1:
		break
print(dcrpt)


n = int(input())
s = input()
k = 0
m = 0
f = ' '
for i in range(1, n + 1):
	for j in range(1, i + 1):
		if k != n:
			k += 1
		else:
			break
	if k != n:
		f += s[k - 1]
	else:
		f += s[k - 1]
		break
print(f)


n = int(input())
l = list(input())
j = 2
i = 0
s = []
while i < n:
	s.append(l[i])
	i = i + j
	j += 1
print(''.join(s))


t = int(input())
if t == 1:
	print(input())
else:
	g = input()
	count = 1
	pos = 0
	t -= 1
	while pos < t:
		print(g[pos], end='')
		pos += count
		count += 1


length = int(input())
string = input()
(gap, i) = (0, 0)
while gap + i < length:
	print(string[i + gap], end='')
	gap += i
	i += 1


l = input()
n = len(l)
l = l.replace('', ' ')
a = l.split()
ans = ''
f = a[0:(n + 1) // 2][::-1]
s = a[(n + 1) // 2:]
(i, j) = (0, 0)
while i < len(f) or j < len(s):
	if i < len(f):
		ans += f[i]
	if j < len(s):
		ans += s[j]
	i += 1
	j += 1
print(ans)


t = input()

def decrypt(t):
	l = len(t)
	if l == 1:
		return t
	elif l % 2 == 0:
		return t[-1] + decrypt(t[:l - 1])
	elif l % 2 != 0:
		return t[0] + decrypt(t[1:])
print(decrypt(t)[::-1])


from collections import deque
s = input()
n = len(s)
ans = [0] * len(s)
rev = []
for i in range(0, n, 2):
	ans[i] = s[i // 2]
	rev.append(s[i // 2])
for i in range(1, n, 2):
	ans[i] = s[len(rev) - 1 + i // 2 + 1]
for i in range(0, n, 2):
	ans[i] = rev.pop()
print(''.join(ans))


n = int(input())
str1 = input()
str2 = ' ' + str1
str3 = ''
i = 1
x = 0
while i <= n:
	str3 += str2[i]
	x += 1
	i += x
print(str3)


b = int(input())
a = input()
s = ''
jumlah = 1
index = 0
while True:
	if index == b:
		break
	s += a[index]
	index += jumlah
	jumlah += 1
print(s)


n = int(input())
s = input()
i = 0
g = (i for i in range(2, 12))
ans = ''
while i < n:
	ans = ans + s[i]
	i = i + next(g)
print(ans)


n = int(input())
s = input()
out = ''
i = 0
d = 1
while n > 0:
	out += s[i]
	d += 1
	i += d
	n -= d
print(out)


g = int(input())
n = list(input())
a = []
cnt = 0
for i in range(len(n)):
	cnt += i
	if cnt >= g:
		break
	a.append(n[cnt])
print(''.join(a))


l = int(input())
s = input()
ans = ''
i = 0
step = 1
while i < l:
	ans += s[i]
	i += step
	step += 1
print(ans)


n = int(input())
c = input()
m = str(c[0])
i = 0
v = 2
while i < n - 1:
	m += c[i + v]
	i += v
	v += 1
print(m)


n = int(input())
s = input()
k = ''
cs = 0
for i in range(n):
	try:
		k += s[cs + i]
	except IndexError:
		break
	cs += i + 1
print(k)


n = int(input())
s = input()
i = 0
j = 2
s1 = ''
while i <= len(s):
	s1 = s1 + s[i]
	i += j
	j += 1
print(s1)


from math import sqrt

def main():
	n = int(input())
	s = input()
	cur = 1
	res = ''
	while s != '':
		res += s[0]
		s = s[cur:]
		cur += 1
	print(res)
main()


def string(l, b):
	a = list(l)
	c = ''
	k = 2
	i = 0
	while i <= b:
		c += a[i]
		i += k
		k += 1
	return c
a = int(input())
n = input()
print(string(n, a))


def sumn(c):
	return int(c * (c + 1) / 2)
a = int(input())
b = int(((8 * a + 1) ** 0.5 - 1) / 2)
l = input()
for i in range(b):
	t = set(l[sumn(i):sumn(i + 1)])
	for i in t:
		print(i, end='')


s = input()
ans = ''
n = len(s)
m = 0
if n % 2 == 0:
	m = n // 2 - 1
	ans += s[m]
else:
	m = (n + 1) // 2 - 1
	ans += s[m]
r = m + 1
l = m - 1
for i in range(1, n):
	if l == -1:
		continue
	if r == n:
		continue
	if i % 2 == 1:
		ans += s[r]
		r += 1
	else:
		ans += s[l]
		l -= 1
if n != 1 and n % 2 == 0:
	ans += s[n - 1]
elif n != 1:
	ans += s[0]
print(ans)


n = int(input())
s = str(input())
decrypt = ['' for i in range(len(s))]
pointer = 0
for i in range(11):
	for j in range(i):
		if pointer >= len(s):
			break
		decrypt[i - 1] = s[pointer]
		pointer += 1
print(''.join(decrypt).strip())


def triangles():
	n = 0
	i = 1
	while True:
		yield n
		n += i
		i += 1
_ = input()
s = input()
o = ''
for i in triangles():
	if i >= len(s):
		break
	o += s[i]
print(o)


import math
n = int(input())
t = input()
s = []
j = 0
i = 0
while j < n:
	s.append(t[j])
	j = j + i + 1
	i += 1
str1 = ''.join(s)
print(str1)


n = int(input())
a = list(input())
ans = ''
pos = 0
count = 1
while pos < n:
	ans += a[pos]
	for i in range(count):
		pos += 1
	count += 1
print(ans)


n = int(input())
s = input()
i = 0
j = 0
while i < n:
	i = i + j
	j = j + 1
	if i < n:
		print(s[i], end='')


import math

def cypher(a):
	if len(a) == 1:
		print(a)
		return
	s1 = ''
	mid = math.ceil(len(a) / 2)
	if len(a) == 3:
		s1 += a[mid - 1] + a[mid] + a[mid - 2]
		print(s1)
		return
	for i in range(1, len(a)):
		if mid - i >= 0:
			s1 += a[mid - i]
		if mid + i <= len(a):
			s1 += a[mid - 1 + i]
	print(s1)
c = input().strip()
cypher(c)


def A():
	n = int(input())
	s = input()
	triang = lambda x: int(x * (x + 1) / 2)
	r = ''
	i = 0
	while triang(i) < n:
		r += s[triang(i)]
		i += 1
	print(r)
A()


stroka = input()
new_str = str()
if len(stroka) % 2 == 0:
	for i in range(len(stroka) // 2):
		new_str += stroka[len(stroka) - i - 1]
		new_str += stroka[i]
	new_str = new_str[::-1]
else:
	for i in range(len(stroka) // 2):
		new_str += stroka[i]
		new_str += stroka[len(stroka) - i - 1]
	new_str = new_str[::-1]
	new_str = stroka[len(stroka) // 2] + new_str
print(new_str)


input()
s = input()
ans = []
cur = 0
seg = 1
while cur + seg <= len(s):
	ans += s[cur]
	cur += seg
	seg += 1
print(''.join(ans))


c = 1
p = 2
n = int(input())
s = input()
ans = ''
while c <= n:
	ans += s[c - 1]
	c += p
	p += 1
print(ans)


x = int(input())
s = input()
st = ''
cnt = 0
i = 1
xopy = x
xopy = 0
xopy += x
while x != 0:
	x -= i
	i += 1
i -= 1
while xopy != 0:
	st = st + s[xopy - 1]
	xopy -= i
	i -= 1
print(st[::-1])


def cipher(s):
	l = len(s)
	ans = ''
	x = list(s)
	if l & 1 == 0:
		while x:
			try:
				ans += x.pop()
				ans += x.pop(0)
			except:
				pass
		return ans[::-1]
	else:
		while x:
			try:
				ans += x.pop(0)
				ans += x.pop()
			except:
				pass
		return ans[::-1]
s = input()
print(cipher(s))


def solve():
	n = int(input())
	s = input()
	ans = str()
	i = 0
	k = 1
	while i < n:
		ans += s[i]
		i += k
		k += 1
	print(ans)
solve()


N = int(input())
str = input()
index = 1
for begin in range(N):
	if begin + index > len(str):
		break
	else:
		str = str.replace(str[begin:begin + index], str[begin], 1)
		index += 1
print(str)


x = int(input())
s = input()
r = ''
z = 0
i = 0
while True:
	r += s[z]
	z += 1 + i
	i += 1
	if z >= x:
		break
print(r)


n = int(input())
s = str(input())
z = s[0]
i = 1
d = 1
while i < len(s):
	z = z + s[i]
	d = d + 1
	i = i + d
print(z)


def solve():
	n = int(input())
	s = input()
	res = []
	i = 0
	j = 0
	while i < n:
		res.append(s[i])
		i += j + 1
		j += 1
	print(''.join((k for k in res)))
solve()


q = int(input())
n = input()
l = k = 1
p = n[0]
while k < q:
	k = int(l * (l + 1) / 2)
	if k >= q:
		break
	p = p + n[k]
	l = l + 1
print(p)


s = input()
lh = len(s)
outstr = ['0'] * lh
if lh % 2 == 0:
	for i in range(lh // 2):
		outstr[lh - (i * 2 + 1) - 1] = s[i]
	for i in range(lh // 2):
		outstr[i * 2 + 1] = s[i + lh // 2]
else:
	for i in range(lh // 2 + 1):
		outstr[lh - (i * 2 + 1)] = s[i]
	for i in range(lh // 2):
		outstr[i * 2 + 1] = s[i + lh // 2 + 1]
print(*outstr, sep='')


n = int(input())
s = input()
new = ''
i = 0
tc = 1
while i < n:
	new += s[i]
	i += tc
	tc += 1
print(new)


string = input()
if len(string) % 2:
	middle = len(string) // 2
	couples = list(zip(string[middle + 1:], string[:middle][::-1]))
	string = string[middle] + ''.join([tupl[0] + tupl[1] for tupl in couples])
	print(string)
else:
	middle = len(string) // 2 - 1
	couples = list(zip(string[middle + 1:-1], string[:middle][::-1]))
	string = string[middle] + ''.join([tupl[0] + tupl[1] for tupl in couples]) + string[-1]
	print(string)


n = int(input())
k = input()
b = []
p = []
sum = 0
if n >= 4:
	for i in range(1, len(k)):
		if sum < n:
			sum = sum + i - 1
			b.append(sum)
	v = len(b)
	b.pop(v - 1)
	for i in b:
		p.append(k[i])
	s = ''.join(p)
elif n == 1:
	print(k[0])
elif n == 3:
	p.append(k[0])
	p.append(k[1])
s = ''.join(p)
print(s)


n = int(input())
s = input()
ind = 0
ans = ''
while True:
	if ind * (ind + 1) // 2 >= n:
		break
	ans += s[ind * (ind + 1) // 2]
	ind += 1
print(ans)


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
(amount, phrase, mult, i) = (int(f_input()), f_input(), 1, 0)
while i < amount:
	f_print(phrase[i])
	i += mult
	mult += 1


n = int(input())
t = input()
i = 0
y = 0
ans = ''
while i < n:
	ans += t[i]
	y += 1
	i += y
print(ans)


a = int(input())
x = input()
s = list(x)
i = 0
k = 1
while i <= a - 1:
	print(s[i], end='')
	i = i + k
	k = k + 1


n = int(input())
s = input()
a = [1, 2]
(i, j) = (1, 0)
k = 2
while a[i] < 56:
	i += 1
	a.append(a[i - 1] + k)
	k += 1
while a[j] < n:
	print(s[a[j] - 1], end='')
	j += 1
if n == 1:
	print(s)


n = int(input())
s = input()
t = ''
i = 0
k = 2
while i < len(s):
	t += s[i]
	j = 0
	while j < k:
		i += 1
		j += 1
	k += 1
print(t)


t = int(input())
n = input()
s = n[0]
ct = 1
i = 1
while i < t:
	s += n[i]
	ct += 1
	i += ct
print(s)


n = int(input())
str = input()
r = ''
sum = 0
i = 0
while i < n:
	r += str[i]
	sum += 1
	i += sum
print(r)


n = int(input())
if n >= 1 and n <= 55:
	Str = input()
	temp = Str[0]
	i = 0
	k = 0
	while i < n:
		for _ in range(k + 1):
			i += 1
		k += 1
		if i < n:
			temp += Str[i]
print(temp)


S = input()
s = list(map(str, S))
k = len(s)
k = int(k)
p = []
if k % 2 == 0:
	q = int(k / 2)
	for i in range(q):
		p.append(s[q - 1 - i])
		p.append(s[q + i])
else:
	r = 1 + k // 2
	r = int(r)
	for i in range(r):
		p.append(s[r - 1 - i])
		if r + i >= k:
			break
		else:
			p.append(s[r + i])
e = ''.join(p)
print(e)


def ans(arr):
	n = len(arr)
	s = ''
	if n % 2:
		stop = n // 2
		arr1 = arr[0:stop] + [''] * n
		arr2 = arr[stop + 1:][::-1] + [''] * n
		(j, k) = (0, 0)
		for i in range(n - 1):
			if i % 2 == 0:
				s += arr1[j]
				j += 1
			else:
				s += arr2[k]
				k += 1
		s += arr[stop]
		return s[::-1]
	else:
		stop = n // 2 - 1
		arr1 = arr[0:stop] + [''] * n
		arr2 = arr[stop + 1:][::-1] + [''] * n
		(j, k) = (0, 0)
		for i in range(n - 1):
			if i % 2 == 0:
				s += arr2[j]
				j += 1
			else:
				s += arr1[k]
				k += 1
		s += arr[stop]
		return s[::-1]
t = list(input())
print(ans(t))


s = input()
if len(s) == 1:
	print(s)
	exit()
if len(s) % 2 == 0:
	ans = ''
	begin = len(s) // 2 - 1
	ans += s[begin]
	for i in range(1, begin + 2):
		ans += s[begin + i]
		ans += s[begin - i]
	ans = ans[:-1]
	print(ans)
else:
	ans = ''
	begin = len(s) // 2
	s += '#'
	ans += s[begin]
	for i in range(1, begin + 2):
		ans += s[begin + i]
		ans += s[begin - i]
	ans = ans[:-2]
	print(ans)


st = input()
otv = ''
if len(st) % 2 == 0:
	i = 1
	while i <= len(st) // 2:
		otv = st[-i] + otv
		otv = st[i - 1] + otv
		i += 1
	print(otv)
else:
	i = 0
	while i < len(st) // 2:
		otv = st[i] + otv
		otv = st[-i - 1] + otv
		i += 1
	otv = st[len(st) // 2] + otv
	print(otv)


k = int(input())
s = input()
index = 0
gap = 1
while index < k:
	print(s[index], end='')
	index += gap
	gap += 1


s = input()
n = len(s)
i = n // 2
if n % 2:
	i += 1
even = s[i:]
odd = s[:i][::-1]
e = 0
o = 0
ans = ''
for i in range(1, n + 1):
	if i % 2:
		ans += odd[o]
		o += 1
	else:
		ans += even[e]
		e += 1
print(ans)


t = int(input())
n = str(input())
s = str()
sum = 0
count = 1
while sum < t:
	s += n[sum]
	sum += count
	count += 1
print(s)


n = int(input())
x = input()
a = 0
b = 1
res = x[a]
a += b
b += 1
while a < n:
	res += x[a]
	a += b
	b += 1
print(res)


n = int(input())
t = input()
s = []
k = 0
for i in range(n):
	k = k + i
	if k >= n:
		break
	s.append(t[k])
s1 = ''.join(s)
print(s1)


a = int(input())
l = list(map(str, input()))
i = 0
gap = 1
h = []
while i < a:
	h.append(l[i])
	i += gap
	gap += 1
print(''.join(h))


N = input()
k = len(N) // 2 - (1 if len(N) % 2 == 0 else 0)
res = N[k]
left = 0
right = 0
for i in range(len(N) - 1):
	if i % 2 == 0:
		right += 1
		res += N[k + right]
	else:
		left += 1
		res += N[k - left]
print(res)


s = int(input())
y = input()
a = list(y)
j = 0
k = 2
x = ''
while j < len(y):
	x = x + a[j]
	j = j + k
	k = k + 1
print(x)


n: int = int(input())
data = input()
mod = 1
i = 0
answer = []
while i < len(data):
	answer.append(data[i])
	i += mod
	mod += 1
print(''.join(answer))


s = input()
n = len(s)
t = ''
k = (n - 1) // 2
for c in zip(s[k::-1], s[k + 1:]):
	t += c[0] + c[1]
if n % 2 == 1:
	t += s[0]
print(t)


x = input()
y = input()
(i, cnt) = (0, 0)
st = ''
while i < len(y):
	st += y[i]
	cnt += 1
	i += cnt
print(st)


import sys
from io import StringIO
from atexit import register
BUFFER = StringIO(sys.stdin.read())

def input():
	return BUFFER.readline().rstrip()
sys.stdout = StringIO()
register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))

def Rdi():
	return int(input())

def Rd(f=int):
	return [f(x) for x in input().split()]

def PrintF(arr):
	return ' '.join(('{:.10f}'.format(x) for x in arr))

def Debug(x):
	print('\x1b[0;31m{}\x1b[0m'.format(x), file=sys.stderr)
n = Rdi()
s = input()
i = 0
j = 1
lst = []
while i < n:
	lst.append(s[i])
	i += j
	j += 1
print(''.join(lst))