LearnPy Hub
← Iterators & Generators problems
Medium

Round Robin

Read players (one line) and a number of turns t. Print who plays each turn, in order, cycling through the players with itertools.cycle.

Input

A line of names, then t.

Output

One line.

Sample 1

Input
Mim Rafi Sara
7
Output
Mim Rafi Sara Mim Rafi Sara Mim

Sample 2

Input
A
3
Output
A A A
solution.py
Output appears here
Round Robin · Python practice problem · LearnPy Hub