import bitops, math, sequtils, strutils const N = 30 popcounts = toSeq(0..