#include <bits/stdc++.h>
using namespace std; 
int T, n,m,v,c[100005],d[100005];
int main(){
	freopen("assign.in","r",stdin);
	freopen("assign.out", "w",stdout);
	scanf("%d", &T);
	while(T--){
		scanf("%d%d%d", &n, &m, &v);
		for(int i = 1; i <= m ; i++){
			scanf("%d%d", &c[i], &d[i]);
		}	
		if(v <= 2){
			
		} 
	}



	return 0;
}
