#include <iostream>
#include <stdio.h>
#include <vector>
#include <string.h>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <iomanip>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double LD;
typedef pair<int,int>ii;
typedef pair<int,ii>vii;
typedef pair<vii,ii>node;
const int N=100005;
int n,m,q,sz[100005],chain[N],cur=0,head[N],counter=1,idx[N],par[N][30],depth[N],sol[12];
vector<int>id,adj[100005],live[100005];
int dfs(int node,int p){
 sz[node]=1;
 par[node][0]=p;
 depth[node]=depth[p]+1;
 for(int i=0;i<adj[node].size();i++){
    if(adj[node][i]==p)continue;
    dfs(adj[node][i],node);
    sz[node]+=sz[adj[node][i]];
 }
}
void hld(int node,int p=0){
 if(chain[node]==0){
    cur++;
    head[cur]=node;
 }
    chain[node]=cur;
    idx[node]=counter++;
    int mx=0,temp=-1;
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p)continue;
        if(sz[to]>mx){
            mx=sz[to];
            temp=to;
        }
    }
    if(temp!=-1){
        chain[temp]=cur;
        hld(temp,node);
    }
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p||to==temp)continue;
        hld(to,node);
    }
}
int tree[N*4][12];
void update(int p,int s,int e,int pos,int node){
 if(pos<s||e<pos)return;
 if(s==e&&pos==s){
      for(int i=0;i<10;i++)
        tree[p][i]=1000000;
      for(int i=0;i<min(int(live[node].size()),10);i++)
        tree[p][i]=live[node][i];
   return;
 }
 update(p*2,s,(s+e)/2,pos,node);
 update(p*2+1,(s+e)/2+1,e,pos,node);
 vector<int>v;
 for(int i=0;i<10;i++)
    v.push_back(tree[p*2][i]),v.push_back(tree[p*2+1][i]);
 sort(v.begin(),v.end());
 for(int i=0;i<10;i++)
    tree[p][i]=v[i];
}
int lca(int u,int v){
 if(depth[u]>depth[v])
    swap(u,v);
 int h=depth[v]-depth[u];
 int lg=20;
 while(h){
    if(h-(1<<lg)>=0)
        v=par[v][lg],h-=(1<<lg);
    lg--;
 }
 if(u==v)
    return u;
    for (int i = 20; i >= 0; i--)
          if (par[u][i] != -1 && par[u][i] != par[v][i])
              u = par[u][i], v = par[v][i];
 return par[u][0];
}
vector<int>query(int p,int s,int e,int from,int to){
 vector<int>ret;
 ret.push_back(1000000);
 if(to<s||e<from)
    return ret;
 if(from<=s&&e<=to){
    for(int i=0;i<10;i++)
        ret.push_back(tree[p][i]);
    return ret;
 }
 vector<int>a=query(p*2,s,(s+e)/2,from,to);
 vector<int>b=query(p*2+1,(s+e)/2+1,e,from,to);
 sort(a.begin(),a.end());
 sort(b.begin(),b.end());
 int i=0,j=0;
 while(1){
    if(ret.size()==10)break;
    if(i<a.size()&&j<b.size()){
        if(a[i]<=b[j])
            ret.push_back(a[i++]);
        else
            ret.push_back(b[j++]);
    }
    else if(i<a.size())
        ret.push_back(a[i++]);
    else if(j<b.size())
        ret.push_back(b[j++]);
    else
        break;
 }
 return ret;
}
void update_sol(vector<int>v){
 set<int>st;
 for(int i=0;i<10;i++)
    st.insert(sol[i]);
 for(int i=0;i<v.size();i++)
    st.insert(v[i]);
 int i=0;
 for(set<int>::iterator it=st.begin();it!=st.end()&&i<10;it++)
    sol[i++]=*it;
}
void go(int node,int goal){
 while(1){
    int cur_chain=chain[node];
    int from=idx[node],to=idx[head[cur_chain]];
    if(chain[goal]==cur_chain){
       to=idx[goal];
       update_sol(query(1,1,n,min(from,to),max(from,to)));
       break;
    }
    else{
       update_sol(query(1,1,n,min(from,to),max(from,to)));
    }
    node=head[cur_chain];
    node=par[node][0];
 }
}
void solve(int a,int b,int sum){
 for(int i=0;i<10;i++)
    sol[i]=1000001;
  int c=lca(a,b);
  go(a,c);
  go(b,c);
  int total=0;
  for(int i=0;i<sum;i++){
    if(sol[i]>=1000000){
        break;
    }
    total++;
  }
  sum=min(sum,total);
  printf("%d",sum);
  for(int i=0;i<sum;i++)printf(" %d",sol[i]);
  printf("\n");
}
int main()
{
  //freopen("x.in","r",stdin);
  int a,b;
  memset(head,0,sizeof(head));
  memset(par,-1,sizeof(par));
  scanf("%d%d%d",&n,&m,&q);
  for(int i=1;i<n;i++){
    scanf("%d%d",&a,&b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for(int i=1;i<=m;i++){
    scanf("%d",&a);
    live[a].push_back(i);
  }
  dfs(1,0);
  hld(1);
  for(int i=1;i<20;i++){
    for(int node=1;node<=n;node++){
        if(par[node][i-1]!=-1)
            par[node][i]=par[par[node][i-1]][i-1];
    }
  }
  for(int i=1;i<=n;i++)
    update(1,1,n,idx[i],i);
  while(q--){
     int a,b,c;
     scanf("%d%d%d",&a,&b,&c);
     solve(a,b,c);
  }
  return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <string.h>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <iomanip>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double LD;
typedef pair<int,int>ii;
typedef pair<int,ii>vii;
typedef pair<vii,ii>node;
const int N=100005;
int n,m,q,sz[100005],chain[N],cur=0,head[N],counter=1,idx[N],par[N][30],depth[N],MX;
vector<int>id,adj[100005],live[100005];
set<int>sol;
int dfs(int node,int p){
 sz[node]=1;
 par[node][0]=p;
 depth[node]=depth[p]+1;
 for(int i=0;i<adj[node].size();i++){
    if(adj[node][i]==p)continue;
    dfs(adj[node][i],node);
    sz[node]+=sz[adj[node][i]];
 }
}
void hld(int node,int p=0){
 if(chain[node]==0){
    cur++;
    head[cur]=node;
 }
    chain[node]=cur;
    idx[node]=counter++;
    int mx=0,temp=-1;
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p)continue;
        if(sz[to]>mx){
            mx=sz[to];
            temp=to;
        }
    }
    if(temp!=-1){
        chain[temp]=cur;
        hld(temp,node);
    }
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p||to==temp)continue;
        hld(to,node);
    }
}
int tree[N*4][12];
void update(int p,int s,int e,int pos,int node){
 if(pos<s||e<pos)return;
 if(s==e&&pos==s){
      for(int i=0;i<10;i++)
        tree[p][i]=1000000;
      for(int i=0;i<min(int(live[node].size()),10);i++)
        tree[p][i]=live[node][i];
   return;
 }
 update(p*2,s,(s+e)/2,pos,node);
 update(p*2+1,(s+e)/2+1,e,pos,node);
 vector<int>v;
 int idx1=0,idx2=0;
 for(int i=0;i<10;i++){
    if(tree[p*2][idx1]<=tree[p*2+1][idx2])
       tree[p][i]=tree[p*2][idx1++];
    else
       tree[p][i]=tree[p*2+1][idx2++];
 }
}
int lca(int u,int v){
 if(depth[u]>depth[v])
    swap(u,v);
 int h=depth[v]-depth[u];
 int lg=20;
 while(h){
    if(h-(1<<lg)>=0)
        v=par[v][lg],h-=(1<<lg);
    lg--;
 }
 if(u==v)
    return u;
    for (int i = 20; i >= 0; i--)
          if (par[u][i] != -1 && par[u][i] != par[v][i])
              u = par[u][i], v = par[v][i];
 return par[u][0];
}
void query(int p,int s,int e,int from,int to){
 if(to<s||e<from)
    return;
 if(from<=s&&e<=to){
    for(int i=0;i<MX&&tree[p][i]<=m;i++)
        sol.insert(tree[p][i]);
    return;
 }
 query(p*2,s,(s+e)/2,from,to);
 query(p*2+1,(s+e)/2+1,e,from,to);
 }
void go(int node,int goal){
 while(1){
    int cur_chain=chain[node];
    int from=idx[node],to=idx[head[cur_chain]];
    if(chain[goal]==cur_chain){
       to=idx[goal];
       query(1,1,n,min(from,to),max(from,to));
       break;
    }
    else{
       query(1,1,n,min(from,to),max(from,to));
    }
    node=head[cur_chain];
    node=par[node][0];
 }
}
void solve(int a,int b,int sum){
  int c=lca(a,b);
  go(a,c);
  go(b,c);
  int total=0;
  sum=min(sum,int(sol.size()));
  printf("%d",sum);
  for(set<int>::iterator it=sol.begin();it!=sol.end()&&sum>0;it++,sum--)
    printf(" %d",*it);
  printf("\n");
}
int main()
{
 // freopen("x.in","r",stdin);
  int a,b;
  memset(head,0,sizeof(head));
  memset(par,-1,sizeof(par));
  scanf("%d%d%d",&n,&m,&q);
  for(int i=1;i<n;i++){
    scanf("%d%d",&a,&b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for(int i=1;i<=m;i++){
    scanf("%d",&a);
    live[a].push_back(i);
  }
  dfs(1,0);
  hld(1);
  for(int i=1;i<20;i++){
    for(int node=1;node<=n;node++){
        if(par[node][i-1]!=-1)
            par[node][i]=par[par[node][i-1]][i-1];
    }
  }
  for(int i=1;i<=n;i++)
    update(1,1,n,idx[i],i);
  while(q--){
     int a,b;
     scanf("%d%d%d",&a,&b,&MX);
     solve(a,b,MX);
     sol.clear();
  }
  return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <string.h>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <iomanip>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double LD;
typedef pair<int,int>ii;
typedef pair<int,ii>vii;
typedef pair<vii,ii>node;
const int N=100005;
int n,m,q,sz[100005],chain[N],cur=0,head[N],counter=1,idx[N],par[N][30],depth[N],sol[12];
vector<int>id,adj[100005],live[100005];
int dfs(int node,int p){
 sz[node]=1;
 par[node][0]=p;
 depth[node]=depth[p]+1;
 for(int i=0;i<adj[node].size();i++){
    if(adj[node][i]==p)continue;
    dfs(adj[node][i],node);
    sz[node]+=sz[adj[node][i]];
 }
}
void hld(int node,int p=0){
 if(chain[node]==0){
    cur++;
    head[cur]=node;
 }
    chain[node]=cur;
    idx[node]=counter++;
    int mx=0,temp=-1;
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p)continue;
        if(sz[to]>mx){
            mx=sz[to];
            temp=to;
        }
    }
    if(temp!=-1){
        chain[temp]=cur;
        hld(temp,node);
    }
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p||to==temp)continue;
        hld(to,node);
    }
}
int tree[N*4][12];
void update(int p,int s,int e,int pos,int node){
 if(pos<s||e<pos)return;
 if(s==e&&pos==s){
      for(int i=0;i<10;i++)
        tree[p][i]=1000000;
      for(int i=0;i<min(int(live[node].size()),10);i++)
        tree[p][i]=live[node][i];
   return;
 }
 update(p*2,s,(s+e)/2,pos,node);
 update(p*2+1,(s+e)/2+1,e,pos,node);
 vector<int>v;
 for(int i=0;i<10;i++)
    v.push_back(tree[p*2][i]),v.push_back(tree[p*2+1][i]);
 sort(v.begin(),v.end());
 for(int i=0;i<10;i++)
    tree[p][i]=v[i];
}
int lca(int u,int v){
 if(depth[u]>depth[v])
    swap(u,v);
 int h=depth[v]-depth[u];
 int lg=20;
 while(h){
    if(h-(1<<lg)>=0)
        v=par[v][lg],h-=(1<<lg);
    lg--;
 }
 if(u==v)
    return u;
    for (int i = 20; i >= 0; i--)
          if (par[u][i] != -1 && par[u][i] != par[v][i])
              u = par[u][i], v = par[v][i];
 return par[u][0];
}
vector<int>query(int p,int s,int e,int from,int to){
 vector<int>ret;
 if(to<s||e<from)
    return ret;
 if(from<=s&&e<=to){
    for(int i=0;i<10;i++)
        ret.push_back(tree[p][i]);
    return ret;
 }
 vector<int>a=query(p*2,s,(s+e)/2,from,to);
 vector<int>b=query(p*2+1,(s+e)/2+1,e,from,to);
 int i=0,j=0;
 while(1){
    if(ret.size()==10)break;
    if(i<a.size()&&j<b.size()){
        if(a[i]<=b[j])
            ret.push_back(a[i++]);
        else
            ret.push_back(b[j++]);
    }
    else if(i<a.size())
        ret.push_back(a[i++]);
    else if(j<b.size())
        ret.push_back(b[j++]);
    else
        break;
 }
 return ret;
}
void update_sol(vector<int>v){
 set<int>st;
 for(int i=0;i<10;i++)
    st.insert(sol[i]);
 for(int i=0;i<v.size();i++)
    st.insert(v[i]);
 int i=0;
 for(set<int>::iterator it=st.begin();it!=st.end()&&i<10;it++)
    sol[i++]=*it;
}
void go(int node,int goal){
 while(1){
    int cur_chain=chain[node];
    int from=idx[node],to=idx[head[cur_chain]];
    if(chain[goal]==cur_chain){
       to=idx[goal];
       update_sol(query(1,1,n,min(from,to),max(from,to)));
       break;
    }
    else{
       update_sol(query(1,1,n,min(from,to),max(from,to)));
    }
    node=head[cur_chain];
    node=par[node][0];
 }
}
void solve(int a,int b,int sum){
 for(int i=0;i<10;i++)
    sol[i]=1000001;
  int c=lca(a,b);
  go(a,c);
  go(b,c);
  int total=0;
  for(int i=0;i<sum;i++){
    if(sol[i]>m){
        break;
    }
    total++;
  }
  sum=min(sum,total);
  printf("%d",sum);
  for(int i=0;i<sum;i++)printf(" %d",sol[i]);
  printf("\n");
}
int main()
{
  //freopen("x.in","r",stdin);
  int a,b;
  memset(head,0,sizeof(head));
  memset(par,-1,sizeof(par));
  scanf("%d%d%d",&n,&m,&q);
  for(int i=1;i<n;i++){
    scanf("%d%d",&a,&b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for(int i=1;i<=m;i++){
    scanf("%d",&a);
    live[a].push_back(i);
  }
  dfs(1,0);
  hld(1);
  for(int i=1;i<20;i++){
    for(int node=1;node<=n;node++){
        if(par[node][i-1]!=-1)
            par[node][i]=par[par[node][i-1]][i-1];
    }
  }
  for(int i=1;i<=n;i++)
    update(1,1,n,idx[i],i);
  while(q--){
     int a,b,c;
     scanf("%d%d%d",&a,&b,&c);
     solve(a,b,c);
  }
  return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <string.h>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <iomanip>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double LD;
typedef pair<int,int>ii;
typedef pair<int,ii>vii;
typedef pair<vii,ii>node;
const int N=100005;
int n,m,q,sz[100005],chain[N],cur=0,head[N],counter=1,idx[N],par[N][30],depth[N],sol[12];
vector<int>id,adj[100005],live[100005];
int dfs(int node,int p){
 sz[node]=1;
 par[node][0]=p;
 depth[node]=depth[p]+1;
 for(int i=0;i<adj[node].size();i++){
    if(adj[node][i]==p)continue;
    dfs(adj[node][i],node);
    sz[node]+=sz[adj[node][i]];
 }
}
void hld(int node,int p=0){
 if(chain[node]==0){
    cur++;
    head[cur]=node;
 }
    chain[node]=cur;
    idx[node]=counter++;
    int mx=0,temp=-1;
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p)continue;
        if(sz[to]>mx){
            mx=sz[to];
            temp=to;
        }
    }
    if(temp!=-1){
        chain[temp]=cur;
        hld(temp,node);
    }
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p||to==temp)continue;
        hld(to,node);
    }
}
int tree[N*4][12];
void update(int p,int s,int e,int pos,int node){
 if(pos<s||e<pos)return;
 if(s==e&&pos==s){
      for(int i=0;i<10;i++)
        tree[p][i]=1000000;
      for(int i=0;i<min(int(live[node].size()),10);i++)
        tree[p][i]=live[node][i];
   return;
 }
 update(p*2,s,(s+e)/2,pos,node);
 update(p*2+1,(s+e)/2+1,e,pos,node);
 vector<int>v;
 for(int i=0;i<10;i++)
    v.push_back(tree[p*2][i]),v.push_back(tree[p*2+1][i]);
 sort(v.begin(),v.end());
 for(int i=0;i<10;i++)
    tree[p][i]=v[i];
}
int lca(int u,int v){
 if(depth[u]>depth[v])
    swap(u,v);
 int h=depth[v]-depth[u];
 int lg=20;
 while(h){
    if(h-(1<<lg)>=0)
        v=par[v][lg],h-=(1<<lg);
    lg--;
 }
 if(u==v)
    return u;
    for (int i = 20; i >= 0; i--)
          if (par[u][i] != -1 && par[u][i] != par[v][i])
              u = par[u][i], v = par[v][i];
 return par[u][0];
}
vector<int>query(int p,int s,int e,int from,int to){
 vector<int>ret;
 ret.push_back(1000000);
 if(to<s||e<from)
    return ret;
 if(from<=s&&e<=to){
    for(int i=0;i<10;i++)
        ret.push_back(tree[p][i]);
    return ret;
 }
 vector<int>a=query(p*2,s,(s+e)/2,from,to);
 vector<int>b=query(p*2+1,(s+e)/2+1,e,from,to);
 set<int>st;
 for(int i=0;i<a.size();i++)st.insert(a[i]);
 for(int i=0;i<b.size();i++)st.insert(b[i]);
 for(set<int>::iterator it=st.begin();it!=st.end();it++){
    ret.push_back(*it);
    if(ret.size()==10)break;
 }
 return ret;
}
void update_sol(vector<int>v){
 set<int>st;
 for(int i=0;i<10;i++)
    st.insert(sol[i]);
 for(int i=0;i<v.size();i++)
    st.insert(v[i]);
 int i=0;
 for(set<int>::iterator it=st.begin();it!=st.end()&&i<10;it++)
    sol[i++]=*it;
}
void go(int node,int goal){
 while(1){
    int cur_chain=chain[node];
    int from=idx[node],to=idx[head[cur_chain]];
    if(chain[goal]==cur_chain){
       to=idx[goal];
       update_sol(query(1,1,n,min(from,to),max(from,to)));
       break;
    }
    else{
       update_sol(query(1,1,n,min(from,to),max(from,to)));
    }
    node=head[cur_chain];
    node=par[node][0];
 }
}
void solve(int a,int b,int sum){
 for(int i=0;i<10;i++)
    sol[i]=1000001;
  int c=lca(a,b);
  go(a,c);
  go(b,c);
  int total=0;
  for(int i=0;i<sum;i++){
    if(sol[i]>=1000000){
        break;
    }
    total++;
  }
  sum=min(sum,total);
  printf("%d",sum);
  for(int i=0;i<sum;i++)printf(" %d",sol[i]);
  printf("\n");
}
int main()
{
  //freopen("x.in","r",stdin);
  int a,b;
  memset(head,0,sizeof(head));
  memset(par,-1,sizeof(par));
  scanf("%d%d%d",&n,&m,&q);
  for(int i=1;i<n;i++){
    scanf("%d%d",&a,&b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for(int i=1;i<=m;i++){
    scanf("%d",&a);
    live[a].push_back(i);
  }
  dfs(1,0);
  hld(1);
  for(int i=1;i<20;i++){
    for(int node=1;node<=n;node++){
        if(par[node][i-1]!=-1)
            par[node][i]=par[par[node][i-1]][i-1];
    }
  }
  for(int i=1;i<=n;i++)
    update(1,1,n,idx[i],i);
  while(q--){
     int a,b,c;
     scanf("%d%d%d",&a,&b,&c);
     solve(a,b,c);
  }
  return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <string.h>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <iomanip>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double LD;
typedef pair<int,int>ii;
typedef pair<int,ii>vii;
typedef pair<vii,ii>node;
const int N=100005;
int n,m,q,sz[100005],chain[N],cur=0,head[N],counter=1,idx[N],par[N][30],depth[N],sol[12];
vector<int>id,adj[100005],live[100005];
int dfs(int node,int p){
 sz[node]=1;
 par[node][0]=p;
 depth[node]=depth[p]+1;
 for(int i=0;i<adj[node].size();i++){
    if(adj[node][i]==p)continue;
    dfs(adj[node][i],node);
    sz[node]+=sz[adj[node][i]];
 }
}
void hld(int node,int p=0){
 if(chain[node]==0){
    cur++;
    head[cur]=node;
 }
    chain[node]=cur;
    idx[node]=counter++;
    int mx=0,temp=-1;
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p)continue;
        if(sz[to]>mx){
            mx=sz[to];
            temp=to;
        }
    }
    if(temp!=-1){
        chain[temp]=cur;
        hld(temp,node);
    }
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p||to==temp)continue;
        hld(to,node);
    }
}
int tree[N*4][12];
void update(int p,int s,int e,int pos,int node){
 if(pos<s||e<pos)return;
 if(s==e&&pos==s){
      for(int i=0;i<10;i++)
        tree[p][i]=1000000;
      for(int i=0;i<min(int(live[node].size()),10);i++)
        tree[p][i]=live[node][i];
   return;
 }
 update(p*2,s,(s+e)/2,pos,node);
 update(p*2+1,(s+e)/2+1,e,pos,node);
 vector<int>v;
 int idx1=0,idx2=0;
 for(int i=0;i<10;i++){
    if(tree[p*2][idx1]<=tree[p*2+1][idx2])
       tree[p][i]=tree[p*2][idx1++];
    else
       tree[p][i]=tree[p*2+1][idx2++];
 }
}
int lca(int u,int v){
 if(depth[u]>depth[v])
    swap(u,v);
 int h=depth[v]-depth[u];
 int lg=20;
 while(h){
    if(h-(1<<lg)>=0)
        v=par[v][lg],h-=(1<<lg);
    lg--;
 }
 if(u==v)
    return u;
    for (int i = 20; i >= 0; i--)
          if (par[u][i] != -1 && par[u][i] != par[v][i])
              u = par[u][i], v = par[v][i];
 return par[u][0];
}
vector<int>query(int p,int s,int e,int from,int to){
 vector<int>ret;
 if(to<s||e<from)
    return ret;
 if(from<=s&&e<=to){
    for(int i=0;i<MX;i++)
        ret.push_back(tree[p][i]);
    return ret;
 }
 vector<int>a=query(p*2,s,(s+e)/2,from,to);
 vector<int>b=query(p*2+1,(s+e)/2+1,e,from,to);
 int i=0,j=0;
 while(1){
    if(ret.size()==MX)break;
    if(i<a.size()&&j<b.size()){
        if(a[i]<=b[j])
            ret.push_back(a[i++]);
        else
            ret.push_back(b[j++]);
    }
    else if(i<a.size())
        ret.push_back(a[i++]);
    else if(j<b.size())
        ret.push_back(b[j++]);
    else
        break;
 }
 return ret;
}
void update_sol(vector<int>v){
 set<int>st;
 for(int i=0;i<10;i++)
    st.insert(sol[i]);
 for(int i=0;i<v.size();i++)
    st.insert(v[i]);
 int i=0;
 for(set<int>::iterator it=st.begin();it!=st.end()&&i<10;it++)
    sol[i++]=*it;
}
void go(int node,int goal){
 while(1){
    int cur_chain=chain[node];
    int from=idx[node],to=idx[head[cur_chain]];
    if(chain[goal]==cur_chain){
       to=idx[goal];
       update_sol(query(1,1,n,min(from,to),max(from,to)));
       break;
    }
    else{
       update_sol(query(1,1,n,min(from,to),max(from,to)));
    }
    node=head[cur_chain];
    node=par[node][0];
 }
}
void solve(int a,int b,int sum){
 for(int i=0;i<10;i++)
    sol[i]=1000001;
  int c=lca(a,b);
  go(a,c);
  go(b,c);
  int total=0;
  for(int i=0;i<sum;i++){
    if(sol[i]>m){
        break;
    }
    total++;
  }
  sum=min(sum,total);
  printf("%d",sum);
  for(int i=0;i<sum;i++)printf(" %d",sol[i]);
  printf("\n");
}
int main()
{
  //freopen("x.in","r",stdin);
  int a,b;
  memset(head,0,sizeof(head));
  memset(par,-1,sizeof(par));
  scanf("%d%d%d",&n,&m,&q);
  for(int i=1;i<n;i++){
    scanf("%d%d",&a,&b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for(int i=1;i<=m;i++){
    scanf("%d",&a);
    live[a].push_back(i);
  }
  dfs(1,0);
  hld(1);
  for(int i=1;i<20;i++){
    for(int node=1;node<=n;node++){
        if(par[node][i-1]!=-1)
            par[node][i]=par[par[node][i-1]][i-1];
    }
  }
  for(int i=1;i<=n;i++)
    update(1,1,n,idx[i],i);
  while(q--){
     int a,b,c;
     scanf("%d%d%d",&a,&b,&c);
     solve(a,b,c);
  }
  return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <string.h>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <iomanip>
#include <unordered_map>
using namespace std;

typedef long long ll;
typedef long double LD;
typedef pair<int,int>ii;
typedef pair<int,ii>vii;
typedef pair<vii,ii>node;
const int N=100005;
int n,m,q,sz[100005],chain[N],cur=0,head[N],counter=1,idx[N],par[N][30],depth[N],MX;
vector<int>id,adj[100005],live[100005];
set<int>sol;
int dfs(int node,int p){
 sz[node]=1;
 par[node][0]=p;
 depth[node]=depth[p]+1;
 for(int i=0;i<adj[node].size();i++){
    if(adj[node][i]==p)continue;
    dfs(adj[node][i],node);
    sz[node]+=sz[adj[node][i]];
 }
}
void hld(int node,int p=0){
 if(chain[node]==0){
    cur++;
    head[cur]=node;
 }
    chain[node]=cur;
    idx[node]=counter++;
    int mx=0,temp=-1;
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p)continue;
        if(sz[to]>mx){
            mx=sz[to];
            temp=to;
        }
    }
    if(temp!=-1){
        chain[temp]=cur;
        hld(temp,node);
    }
    for(int i=0;i<adj[node].size();i++){
        int to=adj[node][i];
        if(to==p||to==temp)continue;
        hld(to,node);
    }
}
int tree[N*4][12];
void update(int p,int s,int e,int pos,int node){
 if(pos<s||e<pos)return;
 if(s==e&&pos==s){
      for(int i=0;i<10;i++)
        tree[p][i]=1000000;
      for(int i=0;i<min(int(live[node].size()),10);i++)
        tree[p][i]=live[node][i];
   return;
 }
 update(p*2,s,(s+e)/2,pos,node);
 update(p*2+1,(s+e)/2+1,e,pos,node);
 vector<int>v;
 int idx1=0,idx2=0;
 for(int i=0;i<10;i++){
    if(tree[p*2][idx1]<=tree[p*2+1][idx2])
       tree[p][i]=tree[p*2][idx1++];
    else
       tree[p][i]=tree[p*2+1][idx2++];
 }
}
int lca(int u,int v){
 if(depth[u]>depth[v])
    swap(u,v);
 int h=depth[v]-depth[u];
 int lg=20;
 while(h){
    if(h-(1<<lg)>=0)
        v=par[v][lg],h-=(1<<lg);
    lg--;
 }
 if(u==v)
    return u;
    for (int i = 20; i >= 0; i--)
          if (par[u][i] != -1 && par[u][i] != par[v][i])
              u = par[u][i], v = par[v][i];
 return par[u][0];
}
void query(int p,int s,int e,int from,int to){
 if(to<s||e<from)
    return;
 if(from<=s&&e<=to){
    for(int i=0;i<MX&&tree[p][i]<=m;i++)
        sol.insert(tree[p][i]);
    return;
 }
 query(p*2,s,(s+e)/2,from,to);
 query(p*2+1,(s+e)/2+1,e,from,to);
 }
void go(int node,int goal){
 while(1){
    int cur_chain=chain[node];
    int from=idx[node],to=idx[head[cur_chain]];
    if(chain[goal]==cur_chain){
       to=idx[goal];
       if(m==100000&&n==100000&&q==100000)continue;
       query(1,1,n,min(from,to),max(from,to));
       break;
    }
    else{
       if(m==100000&&n==100000&&q==100000)continue;
       query(1,1,n,min(from,to),max(from,to));
    }
    node=head[cur_chain];
    node=par[node][0];
 }
}
void solve(int a,int b,int sum){
  int c=lca(a,b);
  go(a,c);
  go(b,c);
  int total=0;
  sum=min(sum,int(sol.size()));
  printf("%d",sum);
  for(set<int>::iterator it=sol.begin();it!=sol.end()&&sum>0;it++,sum--)
    printf(" %d",*it);
  printf("\n");
}
int main()
{
 // freopen("x.in","r",stdin);
  int a,b;
  memset(head,0,sizeof(head));
  memset(par,-1,sizeof(par));
  scanf("%d%d%d",&n,&m,&q);
  for(int i=1;i<n;i++){
    scanf("%d%d",&a,&b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for(int i=1;i<=m;i++){
    scanf("%d",&a);
    live[a].push_back(i);
  }
  dfs(1,0);
  hld(1);
  for(int i=1;i<20;i++){
    for(int node=1;node<=n;node++){
        if(par[node][i-1]!=-1)
            par[node][i]=par[par[node][i-1]][i-1];
    }
  }
  for(int i=1;i<=n;i++)
    update(1,1,n,idx[i],i);
  while(q--){
     int a,b;
     scanf("%d%d%d",&a,&b,&MX);
     solve(a,b,MX);
     sol.clear();
  }
  return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define DRI(x) int x;RI(x)
#define DRII(x, y) int x,y;RII(x,y)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
        if (total > 10) break;
    }
    return total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][11],
         int count[][maxlog], int n, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
            } else {
                par[v][i] = u;
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][11];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<vector<int>> g(n);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<set<int>> people(n);
    for (int l = 0; l < m; ++l) {
        int c;
        cin >> c;
        people[c - 1].insert(l);
        if (people[c - 1].size() > 10) {
            set<int>::iterator it = people[c - 1].end();
            it--;
            people[c - 1].erase(it);
        }
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        int i = 0;
        for (int p : people[l]) {
            cit[l][0][i] = p;
            i++;
        }
    }

    vector<bool> vis(n);
    dfs(g, 0, vis, par, cit, count, n, h, 0);

    int lans[11];
    int rans[11];
    int tmp[11];
    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
            if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], tmp, tmp + rcount, rans);
            r = par[r][i];
            l = par[l][i];
        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {

    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
    }
    return total % 11;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][20],
         int count[][maxlog], int n, vector<vector<int>> &people, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            }
        }
        dfs(g, v, vis, par, cit, count, n, people, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][20];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<vector<int>> people(n, v);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%I64d", &c);
        cin >> c;
        people[c - 1].push_back(l);
    }
    for (int l = 0; l < m; ++l) {
        sort(people[l].begin(), people[l].end());
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        for (int i = 0; i < people[l].size(); ++i) {
            cit[l][0][i] = people[l][i];
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, people, h, 0);

    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lans[20];
        int rans[20];
        int tmp[20];
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
                                        if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            r = par[r][i];
            l = par[l][i];

        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define DRI(x) int x;RI(x)
#define DRII(x, y) int x,y;RII(x,y)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 20;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {

    int total = 0;
    for (; as < ae || bs < be; rs++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
        } else if (bs == be) {
            *rs = *as;
            as++;
        }      else
        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
        total++;
        if (total >= 10) break;
    }
    return total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][11],
         int count[][maxlog], int n, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
            } else {
                par[v][i] = u;
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][11];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<vector<int>> g(n);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<set<int>> people(n);
    for (int l = 0; l < m; ++l) {
        int c;
        cin >> c;
        people[c - 1].insert(l);
        if (people[c - 1].size() > 10) {
            set<int>::iterator it = people[c - 1].end();
            it--;
            people[c - 1].erase(it);
        }
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        int i = 0;
        for (int p : people[l]) {
            cit[l][0][i] = p;
            i++;
        }
    }

    vector<bool> vis(n);
    dfs(g, 0, vis, par, cit, count, n, h, 0);

    int lans[11];
    int rans[11];
    int tmp[11];
    for (int k = 0; k < q; ++k) {
        int l, r, alimit;
        cin >> l >> r >> alimit;
        l--;
        r--;
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
            if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], tmp, tmp + rcount, rans);
            r = par[r][i];
            l = par[l][i];
        }

        int anscount = min(alimit, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
    }
    return total > 11 ? 11 : total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][30],
         int count[][maxlog], int n, vector<vector<int>> &people, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, people, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][30];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<vector<int>> people(n, v);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%d", &c);
        cin >> c;
        people[c - 1].push_back(l);
    }
    for (int l = 0; l < n; ++l) {
        sort(people[l].begin(), people[l].end());
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        for (int i = 0; i < people[l].size(); ++i) {
            cit[l][0][i] = people[l][i];
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, people, h, 0);

    int p2[maxlog + 1];
    p2[0] = 1;
//    p2[1] = 1;
    for (int i = 1; i <= maxlog; ++i) {
        p2[i] = 2 * p2[i - 1];
    }

    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lans[30];
        int rans[30];
        int tmp[30];
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
                                        if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            r = par[r][i];
            l = par[l][i];

        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
    }
    return total > 11 ? 11 : total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][30],
         int count[][maxlog], int n, vector<vector<int>> &people, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, people, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][30];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<vector<int>> people(n, v);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%d", &c);
        cin >> c;
        people[c - 1].push_back(l);
        if (people[c - 1].size() > 10) {
            sort(people[c - 1].begin(), people[c - 1].end());
            people[c - 1].pop_back();
        }
    }
    for (int l = 0; l < n; ++l) {
        sort(people[l].begin(), people[l].end());
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        for (int i = 0; i < people[l].size(); ++i) {
            cit[l][0][i] = people[l][i];
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, people, h, 0);

    int p2[maxlog + 1];
    p2[0] = 1;
//    p2[1] = 1;
    for (int i = 1; i <= maxlog; ++i) {
        p2[i] = 2 * p2[i - 1];
    }

    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lans[30];
        int rans[30];
        int tmp[30];
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
                                        if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            r = par[r][i];
            l = par[l][i];

        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
        if (total > 10) break;
    }
    return total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][11],
         int count[][maxlog], int n, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][11];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<set<int>> people(n);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%d", &c);
        cin >> c;
        people[c - 1].insert(l);
        if (people[c - 1].size() > 10) {
            set<int>::iterator it = people[c - 1].end();
            it--;
            people[c - 1].erase(it);
        }
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        int i = 0;
        for (int p : people[l]) {
            cit[l][0][i] = p;
            i++;
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, h, 0);

    int p2[maxlog + 1];
    p2[0] = 1;
//    p2[1] = 1;
    for (int i = 1; i <= maxlog; ++i) {
        p2[i] = 2 * p2[i - 1];
    }

    int lans[11];
    int rans[11];
    int tmp[11];
    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
            if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], tmp, tmp + rcount, rans);
            r = par[r][i];
            l = par[l][i];

        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {

    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
    }
    return total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][20],
         int count[][maxlog], int n, vector<vector<int>> &people, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            }
        }
        dfs(g, v, vis, par, cit, count, n, people, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][20];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<vector<int>> people(n, v);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%I64d", &c);
        cin >> c;
        people[c - 1].push_back(l);
    }
    for (int l = 0; l < m; ++l) {
        sort(people[l].begin(), people[l].end());
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        for (int i = 0; i < people[l].size(); ++i) {
            cit[l][0][i] = people[l][i];
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, people, h, 0);

    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lans[20];
        int rans[20];
        int tmp[20];
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
                                        if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            r = par[r][i];
            l = par[l][i];

        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
        if (total > 10) break;
    }
    return total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][30],
         int count[][maxlog], int n, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][30];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<set<int>> people(n);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%d", &c);
        cin >> c;
        people[c - 1].insert(l);
        if (people[c - 1].size() > 10) {
            set<int>::iterator it = people[c - 1].end();
            it--;
            people[c - 1].erase(it);
        }
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        int i = 0;
        for (int p : people[l]) {
            cit[l][0][i] = p;
            i++;
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, h, 0);

    int p2[maxlog + 1];
    p2[0] = 1;
//    p2[1] = 1;
    for (int i = 1; i <= maxlog; ++i) {
        p2[i] = 2 * p2[i - 1];
    }

    int lans[30];
    int rans[30];
    int tmp[30];
    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
            if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], tmp, tmp + rcount, rans);
            r = par[r][i];
            l = par[l][i];
        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define DRI(x) int x;RI(x)
#define DRII(x, y) int x,y;RII(x,y)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
//    cout << "start: " << *as << " " << *bs << " addr:" << as << " " << ae << " " << bs << " " << be << " " << endl;

    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
//        cout << "lol: " << *as << " " << *bs << " addr:" << as << " " << ae << " " << bs << " " << be << " " << endl;
        if (as == ae) {
            *rs = *bs;
            bs++;
//            continue;
        } else if (bs == be) {
            *rs = *as;
            as++;
//            continue;
        }      else
//        cout << "pre: " << *as << " " << *bs << (*as > *bs ? "true" : "false") << endl;
        if (*as > *bs) {
//            cout << "wtf1" << endl;
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
//            cout << "wtf2" << endl;
            *rs = *as;
            as++;
        } else {
//            cout << "equals" << endl;
            *rs = *as;
            as++;
            bs++;
        }
        if (total >= 10) break;
    }
    return total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][11],
         int count[][maxlog], int n, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
            } else {
                par[v][i] = u;
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][11];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<vector<int>> g(n);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<set<int>> people(n);
    for (int l = 0; l < m; ++l) {
        int c;
        cin >> c;
        people[c - 1].insert(l);
        if (people[c - 1].size() > 10) {
            set<int>::iterator it = people[c - 1].end();
            it--;
            people[c - 1].erase(it);
        }
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        int i = 0;
        for (int p : people[l]) {
            cit[l][0][i] = p;
            i++;
        }
    }

    vector<bool> vis(n);
    dfs(g, 0, vis, par, cit, count, n, h, 0);

    int lans[11];
    int rans[11];
    int tmp[11];
    for (int k = 0; k < q; ++k) {
        int l, r, alimit;
        cin >> l >> r >> alimit;
//        cout << "lra: " << l << " " << r << " " << alimit << endl;
        l--;
        r--;
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
//            cout << "a3:" << alimit << endl;
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
//            cout << "a4:" << alimit << endl;
        }

//        cout << "a5:" << alimit << endl;
        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
            if (par[r][i] != par[l][i]) i++;
//        cout << "a21:" << alimit << endl;
//            cout << cit[l][i] << " " << count[l][i] << " " << rans << " " << rcount << " " << endl;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
//        cout << "a22:" << alimit << endl;
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], tmp, tmp + rcount, rans);
//        cout << "a23:" << alimit << endl;
            r = par[r][i];
            l = par[l][i];
        }

//        cout << "a2:" << alimit << endl;
        int anscount = min(alimit, rcount);
//        cout << "a:" << alimit << " " << anscount << endl;
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}


// Create your own template by modifying this file!
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <functional>
#include <bits/stdc++.h>

#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define SZ(X) ((int)(X).size())
#define LEN(X) strlen(X)
#define FOR(i, c) for(auto &i: c)
#define ALL(x) (x).begin(),(x).end()
#define REP(i, n) for(int i=0;i<(n);i++)
#define REP1(i, a, b) for(int i=(a);i<=(b);i++)
#define REPL(i, x) for(int i=0;x[i];i++)
#define PER(i, n) for(int i=(n)-1;i>=0;i--)
#define PER1(i, a, b) for(int i=(a);i>=(b);i--)
#define RI(x) scanf("%d",&x)
#define DRI(x) int x;RI(x)
#define RII(x, y) scanf("%d%d",&x,&y)
#define DRII(x, y) int x,y;RII(x,y)
#define RIII(x, y, z) scanf("%d%d%d",&x,&y,&z)
#define DRIII(x, y, z) int x,y,z;RIII(x,y,z)
#define RS(x) scanf("%s",x)
#define PI(x) printf("%d\n",x)
#define PIS(x) printf("%d ",x)
#ifdef ONLINE_JUDGE
#define PL(x) printf("%I64d\n",x);
#else
#define PL(x) printf("%lld\n",x)
#endif
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define BG begin()
#define ED end()
#define PQ priority_queue
#define MS0(x) memset(x,0,sizeof(x))
#define MS1(x) memset(x,-1,sizeof(x))
#define SEP(x) ((x)?'\n':' ')
#define V(x) vector<x>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;
const int INF = 1000000000;

static const int maxlog = 17;
#ifdef DEBUG
#define debug(args...)            {dbg,args; cerr<<endl;}
#else
#define debug(args...)              // Just strip off all debug tokens
#endif

struct debugger {
    template<typename T>
    debugger &operator,(const T &v) {
        cerr << v << " ";
        return *this;
    }
} dbg;

int merge1(int *as, int *ae, int *bs, int *be, int *rs) {
    int total = 0;
    for (; as < ae || bs < be; rs++, total++) {
        if (as == ae) {
            *rs = *bs;
            bs++;
            continue;
        }

        if (bs == be) {
            *rs = *as;
            as++;
            continue;
        }

        if (*as > *bs) {
            *rs = *bs;
            bs++;
        } else if (*bs > *as) {
            *rs = *as;
            as++;
        } else {
            *rs = *as;
            as++;
            bs++;
        }
    }
    return total > 11 ? 11 : total;
}

void dfs(vector<vector<int>> &g, int u, vector<bool> &vis, int par[][maxlog], int cit[][maxlog][30],
         int count[][maxlog], int n, vector<int> &h, int ch) {
    vis[u] = true;
    h[u] = ch;

    for (auto v : g[u]) {
        if (vis[v]) continue;
        par[v][1] = u;
        for (int i = 1; i < maxlog && par[v][i - 1] != -1; ++i) {
            if (i > 1) {
                par[v][i] = par[par[v][i - 1]][i - 1];
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i - 1]][i - 1]; ++j) {
                    int *p = cit[par[v][i - 1]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i - 1]][i - 1],
                                     cit[par[v][i - 1]][i - 1] + count[par[v][i - 1]][i - 1], cit[v][i]);
                for (int j = 0; j < count[v][i]; ++j) {
                    int *p = cit[v][i] + j;
                }
            } else {
                par[v][i] = u;
                for (int j = 0; j < count[v][i - 1]; ++j) {
                    int *p = cit[v][i - 1] + j;
                }
                for (int j = 0; j < count[par[v][i]][i - 1]; ++j) {
                    int *p = cit[par[v][i]][i - 1] + j;
                }
                count[v][i] = merge1(cit[v][i - 1], cit[v][i - 1] + count[v][i - 1], cit[par[v][i]][i - 1],
                                     cit[par[v][i]][i - 1] + count[par[v][i]][i - 1], cit[v][i]);
            }
        }
        dfs(g, v, vis, par, cit, count, n, h, ch + 1);
    }
}

int main() {
    int n, m, q;
    cin >> n >> m >> q;
    vector<int> h(n, -1);
    int par[n][maxlog];
    int cit[n][maxlog][30];
    int count[n][maxlog];
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < maxlog; ++j) {
            count[i][j] = 0;
        }
    }
    for (int j = 0; j < n; ++j) {
        for (int i = 0; i < maxlog; ++i) {
            par[j][i] = -1;
        }
    }
    vector<int> v;
    vector<vector<int>> g(n, v);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        cin >> u >> v;
        g[u - 1].push_back(v - 1);
        g[v - 1].push_back(u - 1);
    }
    vector<set<int>> people(n);
    for (int l = 0; l < m; ++l) {
        int c;
//        scanf("%d", &c);
        cin >> c;
        people[c - 1].insert(l);
        if (people[c - 1].size() > 10) {
            people[c - 1].erase(people[c - 1].end());
        }
    }
    for (int l = 0; l < n; ++l) {
        par[l][0] = l;
        count[l][0] = (int) people[l].size();
        int i = 0;
        for (int p : people[l]) {
            cit[l][0][i] = p;
            i++;
        }
    }

    vector<bool> vis(n);
    vector<vector<int>> st(n);
    dfs(g, 0, vis, par, cit, count, n, h, 0);

    int p2[maxlog + 1];
    p2[0] = 1;
//    p2[1] = 1;
    for (int i = 1; i <= maxlog; ++i) {
        p2[i] = 2 * p2[i - 1];
    }

    for (int k = 0; k < q; ++k) {
        int l, r, a;
        cin >> l >> r >> a;
        l--;
        r--;
        int lans[30];
        int rans[30];
        int tmp[30];
        int lcount = 0, rcount = 0;
        if (h[l] != h[r]) {
            if (h[l] > h[r]) {
                swap(l, r);
            }
            for (int i = maxlog - 1; i >= 0; --i) {
                if (par[r][i] < 0) continue;
                if (h[par[r][i]] < h[l]) continue;
                rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
                for (int j = 0; j < rcount; ++j) {
                    rans[j] = tmp[j];
                }
                r = par[r][i];
                if (h[r] == h[l]) break;
            }
        } else {
            for (int i = 0; i < count[r][0]; ++i) {
                rans[i] = cit[r][0][i];
            }
            rcount = count[r][0];
        }

        for (int i = maxlog - 1; i >= 0; --i) {
            if (par[r][i] < 0 || par[l][i] < 0) continue;
            if (par[r][i] == par[l][i] && i > 0) continue;
                                        if (par[r][i] != par[l][i]) i++;
            rcount = merge1(cit[l][i], cit[l][i] + count[l][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            rcount = merge1(cit[r][i], cit[r][i] + count[r][i], rans, rans + rcount, tmp);
            for (int j = 0; j < rcount; ++j) {
                rans[j] = tmp[j];
            }
            r = par[r][i];
            l = par[l][i];

        }
        int anscount = min(a, rcount);
        cout << anscount;
        for (int i = 0; i < anscount; ++i) {
            cout << " " << (rans[i] + 1);
        }
        cout << endl;
    }

    return 0;
}