#include <bits/stdc++.h>
using namespace std;
int n,q,l,r,k,u,v,head[500005],cnt,dep[500005];
char ch;
inline void read(int &x){
	x=0;
	ch=getchar();
	while(ch<48||ch>57) ch=getchar();
	while(ch>=48&&ch<=57){
		x=(x<<3)+(x<<1)+(ch^48);
		ch=getchar();
	}
}
int main(){
	freopen("query.in","r",stdin);
	freopen("query.out","w",stdout);
	memset(head,-1,sizeof(head));
	read(n);
	for(int i=1;i<n;i++) read(u),read(v);
	read(q);
	while(q--) read(l);read(r);read(k);
	return 0;
}
