#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi=vector<int>;
using pi=pair<int,int>;
#define F(i,a,b) for(int i=(a);i<=(b);i++)
#define G(i,a,b) for(int i=(a);i>=(b);i--)
#define ms(a,b) memset(a,b,sizeof(a))
#define si(a) ((int)(a).size())
#define all(a) (a).begin(),(a).end()
#define fi first
#define se second
#define pb push_back
template<class T> int cmn(T &x,T y){return y<x?x=y,1:0;}
template<class T> int cmx(T &x,T y){return y>x?x=y,1:0;}

const int mod=1e9+7;
struct mi{
	int x;
	mi(int x=0):x(x){}
	mi &operator+=(mi a){if((x+=a.x)>=mod) x-=mod; return *this;} 
	mi &operator-=(mi a){if((x-=a.x)<0) x+=mod; return *this;} 
	mi &operator*=(mi a){x=(ll)x*a.x%mod; return *this;}
	friend mi operator+(mi a,mi b){return a+=b;}
	friend mi operator-(mi a,mi b){return a-=b;}
	friend mi operator*(mi a,mi b){return a*=b;}
	mi pow(ll b=mod-2){
		mi a=x,res=1;
		for(;b;b>>=1,a*=a) if(b&1) res*=a;
		return res;
	}
};

const int N=1e5+3;
int tid,n,k,id[N];
pi e[N];
mi fac[N];
vi vec[N],adj[N];

void run(){
	cin>>n>>k;
	F(i,1,n){
		adj[i].clear();
		vec[i].clear();
	}
	F(i,1,n-1){
		int u,v;
		cin>>u>>v;
		vec[u].pb(i);
		vec[v].pb(i);
		e[i]={u,v};
	}
	F(i,1,k) cin>>id[i];
	if(tid==18){
		cout<<1<<'\n';
		return;
	}
}

int main(){
	freopen("traverse.in","r",stdin);
	freopen("traverse.out","w",stdout);
	cin.tie(0)->ios::sync_with_stdio(0);
	int t=1;
	cin>>tid>>t;
	while(t--) run();
}
