import strscans var (_, w, h, c) = stdin.readAll.scanTuple"$i $i $c" for _ in 0..