import strutils, sequtils, sets let W = stdin.readline.parseInt H = stdin.readline.parseInt N = stdin.readline.parseInt var S, K = initSet[int]() for _ in 0..