Score : 200 points
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.
Input is given from Standard Input in the following format:
S w
Print the desired string in one line.
abcdefgh 3
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
.
lllll 1
lllll
souuundhound 2
suudon