import future, strutils proc nextString: string = result = "" while not endOfFile stdin: let nextChar = readChar stdin case nextChar of '\r': discard of "\n"[0], ' ': break else: add result, nextChar proc nextInt: int = return parseInt nextString() let n, m = nextInt() l = lc[nextString() | (i <- 0..