w = input()
s = int(input())
S = ''
for i in range(0, len(w), s):
    S = S + w[i]
print(S)

14a1e86af802cefa46a12592064cfc738eafe323
<mask token>

<mask token>
for i in range(0, len(w), s):
    S = S + w[i]
print(S)

w = input()
s = int(input())
S = ''
for i in range(0, len(w), s):
    S = S + w[i]
print(S)
