- combinations 모듈을 이용하여 가능 한 모든 경우의 수 탐색함.
- 출력을 문자열로 바꿔주기 위해 join 함수 사용.
import sys
from itertools import combinations
def lotto() :
while 1 :
n = list(sys.stdin.readline().split())
if len(n) == 1 :
break
else :
nums = n[1:]
t = list(combinations(nums, 6))
for i in t :
print(' '.join(i))
print()
lotto()