USING: io math.combinatorics sequences sets ; "ABCD" all-permutations lines diff first print