import strutils import sequtils let P = stdin.readLine.parseInt for _ in 0..