Medium
Choose Teams
Read a line of names and k. Print every group of k names (itertools.combinations) in input order, one group per line.
Input
A line of names, then k.
Output
One group per line.
Sample 1
Input
A B C D 2
Output
A B A C A D B C B D C D
Sample 2
Input
Mim Rafi Sara 3
Output
Mim Rafi Sara
Output appears here