using Combinatorics n = 4 m = 3 for i in combinations(0:n,m) println(i') end