import sequtils proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = result = 0 while true: var k = getchar_unlocked() if k < '0' or k > '9': break else: result = 10 * result + k.ord - '0'.ord let n = scan() let m = scan() var C = toSeq(1..n) for _ in 0..