import sequtils,strutils,algorithm let n = stdin.readLine().parseInt() var S = newSeqWith(n,stdin.readLine) for i in 1..