#include<bits/stdc++.h>
using namespace std;

int main(){
	freopen("assign.in","r",stdin);
	freopen("assign.out","w",stdout);
	
	int T;
	cin>>T;
	while(T--){
		int n,m,v;
		cin>>n>>m>>v;
		cout<<0<<endl;
	}
	
	
	
	return 0;
}

