#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; const ll MOD=998244353; const ll INF=998244353000000000; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll h,w,k; cin>>h>>w>>k; auto f=[&](ll x,ll y)->ll{ ll tmp=x+1; tmp=(tmp+x*(x+1)%MOD); if(x>y) tmp=(tmp-(x-y)*(x-y+1)/2+INF)%MOD; if(w-y-1>x>>y>>v; x--,y--; ans=(ans+v*f(x,y))%MOD; } cout<