#include #include #include #include using namespace std; #define ll long long #define inf 0x3f3f3f3f #define M 200005 const long long mod=998244353; ll a,b,k; ll qpow(ll a,ll b) { ll ans=1; while(b) { if(b&1) ans=ans*a%mod; a=a*a%mod; b>>=1; } return ans; } int main() { int t; cin>>t; while(t--) { scanf("%lld%lld%lld",&a,&b,&k); ll aa=a+b+mod,bb=a-b+mod; if(k&1) cout<