#include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod=1e9+7;
vector<ll> a;
ll T,n,m,v;
int main()
{
	freopen("assign.in","r",stdin);
	freopen("assign.out","w",stdout);
	scanf("%lld",&T);
	while(T--)
	{
		scanf("%lld%lld%lld",&n,&m,&v);
		cout<<0<<endl;
	}
	return 0;
}
