Problem:
 Score : 200 points    Problem Statement You are given a string S consisting of lowercase English letters.
We will write down this string, starting a new line after every w letters. Print the string obtained by concatenating the letters at the beginnings of these lines from top to bottom.      Constraints  1 \leq w \leq |S| \leq 1000  S consists of lowercase English letters.  w is an integer.         Input Input is given from Standard Input in the following format:  S  w       Output Print the desired string in one line.        Sample Input 1 abcdefgh
3      Sample Output 1 adg  When we write down abcdefgh , starting a new line after every three letters, we get the following:  abc def gh  Concatenating the letters at the beginnings of these lines, we obtain adg .       Sample Input 2 lllll
1      Sample Output 2 lllll       Sample Input 3 souuundhound
2      Sample Output 3 suudon

Solution (Python):
s = input()
w = int(input())
n = len(s)

res = []
m = n // w
for i in range(m + 1):
    if w*i >= n: continue
    res.append(s[w*i])

print(''.join(res))

Solution (Python):
S = input()
w = int(input())

print(S[::w])

Solution (Python):
S,W = (input() for T in range(0,2))
print(''.join(S[TW] for TW in range(0,len(S),int(W))))

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
w = int(input())
for i in range(len(S)):
  if w != 1 and (i + 1) % w == 1 :
    print(S[i], end = "")
  elif w == 1:
    print(S[i], end = "")

Solution (Python):
S = input()
w = int(input())
ans = ""
i = 0
while i < len(S):
  ans += S[i]
  i += w
print(ans)

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
S = input()
w = int(input())
if len(S) % w == 0:
    r = len(S) // w
else:
    r = len(S) // w + 1
for i in range(r):
    print(S[i * w], end='')

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=input()
w=int(input())

print(s[0:len(s):w])

Solution (Python):
s = input()
w = int(input())
ans = []
if len(s)%w == 0:
  for i in range(len(s)//w):
    ans.append(s[w*i])
else:
  for i in range(len(s)//w+1):
    ans.append(s[w*i])
print("".join(ans))

Solution (Python):
s=input()
n=int(input())
k=len(s)
ans=""
for i in range(k):
  if i % n==0:
    ans+=s[i]
print(ans)

Solution (Python):
import math
s = input()
n = int(input())
news = ""
c = math.ceil(len(s)/n)
for i in range(c):
    news += s[(i)*n]
print(news)

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
s = str(input())
w = int(input())
word = "".join(s[h] for h in range(0,len(s),w))
print(word)

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
s =input()
w = int(input())
i = 0
while(i<len(s)):
  print(s[i],end="")
  i = i+w

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(0, len(s), w):
  ans += s[i]
print(ans)

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

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    S = input().rstrip('\n')
    w = int(input())
    print(S[::w])


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
n = int(input())

i = 0
while i*n < len(s):
    print(s[i*n],end = "")
    i +=1

Solution (Python):
s = input()
n = int(input())
a=''
for i in range(len(s)):
  if i%n==0:
    a+=s[i]
print(a)

Solution (Python):
s = input()
n = int(input())

ans = ""
for i in range(len(s)):
  if i % n == 0:
    ans += s[i]
    
print(ans)

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
S=input()
w=int(input())
print(S[::w])

Solution (Python):
def main():
    s = input()
    w = int(input())

    print(s[::w])


if __name__ == "__main__":
    main()

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    S = input()
    w = int(input())
    ans = ""
    for i in range(0, len(S), w):
        ans += S[i]
    print(ans)


def main():
    solve()


if __name__ == '__main__':
    main()

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    S = input()
    w = int(readline())

    print(S[::w])


if __name__ == '__main__':
    main()

Solution (Python):

S = input()
w = int(input())

word = ''

for i in range(0, len(S), w):
    word += S[i]

print(word)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
w = I()
ans = s[::w]
print(ans)

Solution (Python):
S=input()
W=int(input())
print(S[::W])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = input()
w = int(input())
print(s[::w])

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

Solution (Python):
from math import ceil
s = list(input())
w = int(input())
for i in range(ceil(len(s)/w)):
    print(s[i*w],end="")

Solution (Python):
S = input()
W = int(input())
for i in range(len(S)):
  if i%W == 0:
    print(S[i],end ='')

Solution (Python):
S=input()
w=int(input())
n=len(S)
T=""
for i in range (0,n,w):
  T+=S[i]
print(T)

Solution (Python):
s=input()
n = int(input())

ans=[s[i] for i in range(len(s)) if i%n==0]

print(''.join(ans))

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
import sys, math
from collections import deque

def input():
    return sys.stdin.readline()[:-1]

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

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

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    S = input()
    w = ii()
    print(*S[::w], sep='')
        

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(len(s)):
    if i % w == 0:
        ans += s[i]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
import math

s = input()
w = int(input())

num_words = math.ceil(len(s)/w)
letters = []
for i in range(num_words):
    letter = s[i*w]
    letters.append(letter)

ans = ''.join(letters)
print(ans)

Solution (Python):
S=input()
w=int(input())
Sdash=[]
a=''
for i in range(0,len(S)//w):
    Sdash.append(S[w*i:w*(i+1)])
if len(S)%w!=0:
    Sdash.append(S[((len(S)//w)*w):])
for i in range(len(Sdash)):
    a+=Sdash[i][0]
print(a)

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

s = rr()
n = ri()
print(s[::n])

Solution (Python):
S = str(input())
w = int(input())
idx = 0
ans = ""
while idx < len(S):
  ans += S[idx]
  idx += w
print(ans)

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    S = SS()
    w = I()

    ans = [S[i] for i in range(0, len(S), w)]
    print(''.join(ans)) 

if __name__ == '__main__':
    resolve()

Solution (Python):
S=input()
w=int(input())

Q=''
import math
for i in range(math.ceil(len(S)/w)):
    Q+=S[i*w]
print(Q)

Solution (Python):
s = input()
w = int(input())
ans = ''
for i in range(len(s))[::w]:
    ans += s[i]

print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[0::int(input())])

Solution (Python):
def main():
    s = input()
    w = int(input())
    print(s[0::w])


if __name__ == '__main__':
    main()

Solution (Python):
s=input()
w=int(input())
print(s[0::w])

Solution (Python):
S = input()
W = int(input())
res = ''
for i in range((len(S) + W - 1) // W):
    res = ''.join((res, S[W * i]))
print(res)

Solution (Python):
s = input()
w = int(input())
a = ""
b = 0
c = 0
if len(s) % w == 0:
  c = len(s)//w
else:
  c = (len(s)//w)+1
for i in range(c):
  a = a + s[b]
  b = b + w
print(a)

Solution (Python):
s = input()
w = int(input())
ans = ""

for i in range(0, len(s), w):
    ans += s[i]

print(ans)

Solution (Python):
s = input()
step = int(input())
print(''.join([s[i] for i in range(0, len(s), step)]))

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    S = readline().decode('utf-8').strip()
    w = int(readline())
    ans = ''
    for i in range(0, len(S), w):
        ans += S[i]
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
s=list(input())
w=int(input())
print(''.join([x for i,x in enumerate(s) if i%w==0]))

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
w = int(input())

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

Solution (Python):
s = input()
n = int(input())

ans = ''
for i in range(len(s)):
  if i%n == 0:
    ans += s[i]
print (ans)

Solution (Python):
S = input()
k = int(input())
print(S[::k])

Solution (Python):
a=input()
n=int(input())
print(a[::n])

Solution (Python):
S=input()
w=int(input())
ans=[]
for i in range(0,len(S),w):
  ans.append(S[i])
print("".join(ans))

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
import math

s = input()
w = int(input())
for i in range(math.ceil(len(s) / w)):
    print(s[i * w],end="")
print("")

Solution (Python):
S = input()
w = int(input())

ans = ""
for i in range(0,len(S),w):
  ans += S[i]
print(ans)

Solution (Python):



s = input()



w = int(input())
ans = ""
if w==1:
    ans = s
else:
    for i in range(len(s)):
        if (i+1)%w==1:
            ans += s[i]
    
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S=list(input())
w=int(input())

answer_list=[]
for i in range(0,len(S),w):
  
  answer_list.append(S[i])
  
print("".join(answer_list))

Solution (Python):
s = input()
w = int(input())
n = len(s)
ans = ""
i = 0
while i < n:
    ans += s[i]
    i += w
print(ans)

Solution (Python):
s = str(input())
n = int(input())
if len(s)%n == 0:
    cnt = len(s)//n
else:
    cnt = len(s)//n + 1
ans = []
for i in range(cnt):
    ans.append(s[i*n])
print(*ans, sep = "")

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
S = input()
w = int(input())

print(*S[::w], sep="")

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union































def main():
    Num = Union[int, float]
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    
    
    
    s = input()
    w = ii()
    ans = []
    for i in range(len(s)):
        if i % w == 0:
            ans.append(s[i])
    print(''.join(ans))
        


if __name__ == "__main__":
    main()

Solution (Python):
S=input()
w=int(input())
ans=""

for x in range(len(S)):
  if x%w==0:
    ans += S[x]
print(ans)

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
s = list(str(input()))
w = int(input())
ans = ''
for i, c in enumerate(s):
    if i%w == 0:
        ans += c
print(ans)

Solution (Python):
s = list(str(input()))
w = int(input())
ans = ''
for i, c in enumerate(s):
    if i%w == 0:
        ans += c
print(ans)

Solution (Python):
s=str(input())
w=int(input())
ans=[]
for i in range(0,len(s),w):
  ans.append(s[i])
print("".join(ans))

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

s=s()
w = k()
a = []
for i in range(0,len(s),w):
    a.append(s[i])
print("".join(a))

Solution (Python):
S = list(input())
w = int(input())

ans = S[::w]
print(''.join(ans))

Solution (Python):
S = input()
w = int(input())
num = len(S)
ans = []
for i in range(0, num, w): ans += S[i]
print(''.join(ans))

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
    S = input()
    w = int(input())
    ans = []
    for i in range(0,len(S),w):
        ans.append(S[i])
    print(''.join(ans))
if __name__ == '__main__':
    main()

Solution (Python):
n = input()
a = int(input())
print(n[::a])

Solution (Python):
s = input()
w = int(input())
ans = [ s[i] for i in range(0, len(s),w)]
print("".join(ans))

Solution (Python):
S=input()
w=int(input())

ans=S[0]

for i in range(1,len(S)):
  if i%w==0:
    ans+=S[i]
print(ans)

Solution (Python):
s = input()
n = int(input())
print(s[::n])

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
s=input()
n=int(input())
print(s[::n])

Solution (Python):
S=input()
W=int(input())
print(S[::W])

Solution (Python):
s = input()
w = int(input())
t = []

for i in range(len(s))[::w]:
    t.append(s[i])

print(''.join(t))

Solution (Python):
s = input()
n = int(input())
a = ""
for i in range(0, len(s), n):
  a += s[i:i+1]
print(a)

Solution (Python):
def main():
    S = input()
    w = int(input())
    print(S[::w])
if __name__ == '__main__':
    main()

Solution (Python):


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    S=input()
    w=I()
    ans=[]
    for i in range(0,len(S),w):
        ans.append(S[i])
        
    print(''.join(map(str,ans)))

main()

Solution (Python):
s=input();w=int(input());ans=[]
while len(s)>0:
  ans.append(s[:w][0])
  s=s[w:]
print("".join(ans))

Solution (Python):
s = input()
w = int(input())
a = []
i = 0
while i <= len(s)-1:
    a.append(s[i])
    i += w
print("".join(a))

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
s=input()
n=int(input())
ans=''
for i in range(len(s)):
  if i%n==0:
    ans+=s[i]
print(ans)

Solution (Python):
S = input().strip()
w = int(input())
print(S[::w])

Solution (Python):
S=input()
w=int(input())

print(S[::w])

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
s = input()
w = int(input())
ans = ''
for i in range(len(s)):
  if i % w == 0:
    ans += s[i]
print(ans)

Solution (Python):
s = input()
w = int(input())
ans = [s[i] for i in range(len(s)) if i % w == 0]
print(''.join(ans))

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(0,len(s),w):
    ans += s[i]
print(ans)

Solution (Python):
x = input()
k = int(input())
print(x[::k])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
s = input()
w = int(input())
ans = ''
for i, x in enumerate(s):
  if i%w == 0:
    ans += x
print(ans)

Solution (Python):
S = input()
w = int(input())
ans = [S[i] for i in range(0,len(S),w)]
print("".join(ans))

Solution (Python):
s=input()
n=int(input())
print(s[::n])

Solution (Python):
s=input()
n=len(s)
w=int(input())
n=(n+w-1)//w
l,r=0,w
a=[]
for i in range(n):
  t=""
  if i==n-1:
    t=s[l:]
    a.append(t[0])
    continue
  t=s[l:r]
  a.append(t[0])
  l=r
  r+=w
print("".join(a))

Solution (Python):
if __name__ == '__main__':
    s=input()
    a = int(input())
    ans =""
    for i in range(len(s)):
        if (i+1) % a ==1:
            ans+=s[i]
    if a == 1:
        print(s)
    else:
        print(ans)

Solution (Python):





S = input()
w = int(input())

sp = [S[i: i+w] for i in range(0, len(S), w)]

ans = "".join(s[0] for s in sp)

print(ans)

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)

s=input().rstrip()
w=int(input().rstrip())
a=""
for i in range(0,len(s),w):
    a+=s[i]
print(a)

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
S = input()
n = len(S)
w = int(input())
i = 0
ans = S[0]
while i + w < n:
  i += w
  ans += S[i]
print(ans)

Solution (Python):
s = input()
w = int(input())
ans = "".join([s[i] for i in range(0, len(s), w)])
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *

S = input()[:-1]
w = int(input())
ans = ''

for i in range(0, len(S), w):
    ans += S[i]

print(ans)

Solution (Python):
S = list(input())
w = int(input())
N = len(S)
out = []
for i in range(N):
    if i%w==0:
        out.append(S[i])
print("".join(out))

Solution (Python):
s = input()
w = int(input())
l = [s[i: i+w] for i in range(0, len(s), w)]
ans = ""
for i in range(len(l)):
    ans += l[i][0]
print(ans)

Solution (Python):
s = input()
w = int(input())
a = []
cnt = 0
for i in s:
    if cnt % w == 0:
        a.append(i)
    cnt += 1
print("".join(a))

Solution (Python):
S=input()
w=int(input())
ans=[]
count=0

for i in range(len(S)):
    ans+=S[count]
    count+=w
    if count>=len(S):
        break
    
ansans=''.join(ans)
print(ansans)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


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


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





S=S()
w=I()
print(S[::w])

Solution (Python):
S = input()
w = int(input())
ans = ''
now = 0
while now <= len(S)-1:
  ans += S[now]
  now += w
  
print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7

 
S = input()
w = INT()
ans = ""
for i in range(0, len(S), w):
	ans += S[i]

print(ans)

Solution (Python):
s=input()
w=int(input())
ans=""
if len(s)%w==0:
    x=len(s)//w
else:
    x=len(s)//w +1
for i in range(x):
    ans+=s[i*w]
print(ans)

Solution (Python):
s = input()
n = int(input())
print(s[::n])

Solution (Python):
s=input()
w=int(input())
ans=""
for i in range(-1*(len(s)//-w)):
    ans+=s[i*w]
print(ans)

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
S = input()
w = I()
ans = []
for i in range(0,len(S),w):
    ans.append(S[i])
print(*ans,sep="")

Solution (Python):
s = input()
w = int(input())
a = ''
if len(s)%w == 0:
  b = len(s)//w
else:
  b = len(s)//w+1

for i in range(b):
  a += s[i*w]
print(a)

Solution (Python):
S=input()
w=int(input())
print(S[::w])

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    w = int(input())

    res = [s[i] for i in range(0, len(s), w)]
    print("".join(res))


if __name__ == '__main__':
    resolve()

Solution (Python):
s = input()
n = int(input())
print(s[0::n])

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    S = input()
    N = len(S)
    w = int(input())
    ans = []
    for i in range(0, N, w):
        ans.append(S[i])

    print(*ans, sep="")


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin
S = stdin.readline().rstrip()
w = int(stdin.readline().rstrip())
print(S[::w])

Solution (Python):
s = input()
w = int(input())
for i in range(0, len(s), w):
    print(s[i], end='')

Solution (Python):
B=list(input())
A=int(input())
l=""
import math
for i in range(math.ceil(len(B)/A)):
   l+=B[i*A]
print(l)

Solution (Python):
s=input()
w=int(input())
print(s[0::w])

Solution (Python):
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007

def solve():
    S = (input().rstrip())
    K = int(input().rstrip())
    for x in range(len(S)):
        if(x%K == 0):
            print(S[x],end="")


    print("")
if __name__ == '__main__':
    solve()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    s=input()
    w=int(input())
    ss=""
    for i in range(-(-len(s)//w)):
        ss+=s[w*i]
    print(ss)

if __name__=='__main__':
    main()

Solution (Python):
s = input() 
w = int(input())

ans = []
for i in range(len(s)):
    if i%w==0:
        ans.append(s[i])

print(*ans,sep='')

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

Solution (Python):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

s = input()
n = len(s)
w = int(input())
ans = ""
for i in range(0,n,w):
  ans += s[i]
print(ans)

Solution (Python):
s=input()
w=int(input())
a=""
for i in range(0,len(s)):
    if i%w==0:
        a=a+s[i]
print(a)

Solution (Python):
s=input()
w=int(input())
ans=s[0]
for i in range(1,len(s)):
    if i%w==0:
        ans=ans+s[i]
print(ans)

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(0,len(s), w):
  ans += s[i]
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()
    w = int(input())

    ans = S[0::w]
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    w=int(input())
    l=[]
    for i in range(-(-len(s) // w)):
        l.append(s[w*i])
    print(''.join(l))
resolve()

Solution (Python):
S=str(input())
w=int(input())
print(''.join([S[i*w] for i in range(-(-len(S)//w))]))

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    S=str(input())
    w=int(input())
    ls=len(S)
    L=[S[i*w] for i in range(-(-ls//w))]
    print(''.join(L))


    
resolve()

Solution (Python):
s=input()
n = int(input())
print(s[::n])

Solution (Python):
s=input()
print(s[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
def main():
    S = input()
    w = int(input())

    answer = ""

    for i in range(0, len(S), w):
        answer += S[i]

    print(answer)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
S=input()
W=int(input())
print(S[::W])

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = readline().rstrip().decode()
w = int(readline())
print(s[::w])

Solution (Python):
s= list(input())
w= int(input())
k=0
t=[]
while k*w<= int(len(s))-1:
  t.append(s[k*w])
  k+=1
  
u=''.join(t)
print(u)

Solution (Python):
S = input()
w = int(input())
N = len(S)
for i in range(0, N, w):
  print(S[i], end = '')
print()

Solution (Python):
S = input()
w = int(input())
ans = ''

for i in range(0,len(S),w):
  ans += S[i]

print(ans)

Solution (Python):
L = list(input())
w = int(input())
i = 0
while i<len(L):
  print(L[i],end="")
  i+=w

Solution (Python):
S = input()
w = int(input())

print(S[::w])

Solution (Python):
s=input()
w=int(input())
n=-(-len(s)//w)
ans=""
for i in range(n):
  ans=ans+s[w*i]
print(ans)

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

s = ns()
w = ni()

i = 0
while i < len(s):
    print(s[i], end="")
    i += w

print()

Solution (Python):
print("".join([s for s in input()[::int(input())]]))

Solution (Python):
print(input()[::int(input())])

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    s = input().rstrip()
    n = int(input())
    res = ''
    for i in range(0, len(s), n):
        res += s[i]
    print(res)

if __name__ == '__main__':
    main()

Solution (Python):
s=input()
w=int(input())
ans=""
for i in range(0,len(s),w):
    ans=ans+s[i]
print(ans)

Solution (Python):
S = input()
w = int(input())
print(''.join(S[::w]))

Solution (Python):
import re
S = input()
w = int(input())
v = [S[i: i+w] for i in range(0, len(S), w)]
result = ""
for text in v:
    text = list(text)
    result += text[0]
print(result)

Solution (Python):
import math
S = input()
w = int(input())

count = math.ceil(len(S) / w)

ans = ''
for i in range(count):
    ans += S[i*w]

print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    s=input()
    w=int(input())
    ss=""
    for i in range(-(-len(s)//w)):
        ss+=s[w*i]
    print(ss)

if __name__=='__main__':
    main()