ll@(h,w,k,m),hw=h*w; unionFind u('m',hw); mint().setmod(m); mint a,z,c[hw+1]; rep(i,hw){ a+=mint(1)/(i+1); } rep(i,hw+1){ c[i]=mint(i)**k; } rep(b,1<=w && b&1<