diff --git a/src/hoskuldarhaska.py b/src/hoskuldarhaska.py new file mode 100644 index 0000000..0455c75 --- /dev/null +++ b/src/hoskuldarhaska.py @@ -0,0 +1,10 @@ +from itertools import product + +n = int(input()) + +l = [] +for _ in range(n): + l.append(sorted(input().split()[1:])) + +for row in product(*l): + print(" ".join(row))