List(1, 2, 3).permutations.foreach(println)