#include using namespace std;int H,W,K,t,u,i,h,w,c;main(){cin>>H>>W>>K;for(;i