Problem: Recently Duff has been a soldier in the army. Malek is her commander.

Their country, Andarz Gu has n cities (numbered from 1 to n) and n - 1 bidirectional roads. Each road connects two different cities. There exist a unique path between any two cities.

There are also m people living in Andarz Gu (numbered from 1 to m). Each person has and ID number. ID number of i - th person is i and he/she lives in city number ci. Note that there may be more than one person in a city, also there may be no people living in the city.

<image>

Malek loves to order. That's why he asks Duff to answer to q queries. In each query, he gives her numbers v, u and a.

To answer a query:

Assume there are x people living in the cities lying on the path from city v to city u. Assume these people's IDs are p1, p2, ..., px in increasing order. 

If k = min(x, a), then Duff should tell Malek numbers k, p1, p2, ..., pk in this order. In the other words, Malek wants to know a minimums on that path (or less, if there are less than a people).

Duff is very busy at the moment, so she asked you to help her and answer the queries.

Input

The first line of input contains three integers, n, m and q (1 ≤ n, m, q ≤ 105).

The next n - 1 lines contain the roads. Each line contains two integers v and u, endpoints of a road (1 ≤ v, u ≤ n, v ≠ u).

Next line contains m integers c1, c2, ..., cm separated by spaces (1 ≤ ci ≤ n for each 1 ≤ i ≤ m).

Next q lines contain the queries. Each of them contains three integers, v, u and a (1 ≤ v, u ≤ n and 1 ≤ a ≤ 10).

Output

For each query, print numbers k, p1, p2, ..., pk separated by spaces in one line.

Examples

Input

5 4 5
1 3
1 2
1 4
4 5
2 1 4 3
4 5 6
1 5 2
5 5 10
2 3 3
5 3 1


Output

1 3
2 2 3
0
3 1 2 4
1 2

Note

Graph of Andarz Gu in the sample case is as follows (ID of people in each city are written next to them):

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename...>
static inline int getchar_unlocked(void) {
  return getchar();
}
template <typename...>
static inline void putchar_unlocked(int c) {
  putchar(c);
}
void reader(int& x) {
  int k, m = 0;
  x = 0;
  for (;;) {
    (k) = getchar_unlocked();
    if (k == '-') {
      m = 1;
      break;
    }
    if ('0' <= k && k <= '9') {
      x = k - '0';
      break;
    }
  }
  for (;;) {
    (k) = getchar_unlocked();
    if (k < '0' || k > '9') break;
    x = x * 10 + k - '0';
  }
  if (m) x = -x;
}
void reader(long long& x) {
  int k, m = 0;
  x = 0;
  for (;;) {
    (k) = getchar_unlocked();
    if (k == '-') {
      m = 1;
      break;
    }
    if ('0' <= k && k <= '9') {
      x = k - '0';
      break;
    }
  }
  for (;;) {
    (k) = getchar_unlocked();
    if (k < '0' || k > '9') break;
    x = x * 10 + k - '0';
  }
  if (m) x = -x;
}
int reader(char c[]) {
  int i, s = 0;
  for (;;) {
    (i) = getchar_unlocked();
    if (i != ' ' && i != '\n' && i != '\r' && i != '\t' && i != EOF) break;
  }
  c[s++] = i;
  for (;;) {
    (i) = getchar_unlocked();
    if (i == ' ' || i == '\n' || i == '\r' || i == '\t' || i == EOF) break;
    c[s++] = i;
  }
  c[s] = '\0';
  return s;
}
template <class T, class S>
void reader(T& x, S& y) {
  reader(x);
  reader(y);
}
template <class T, class S, class U>
void reader(T& x, S& y, U& z) {
  reader(x);
  reader(y);
  reader(z);
}
template <class T, class S, class U, class V>
void reader(T& x, S& y, U& z, V& w) {
  reader(x);
  reader(y);
  reader(z);
  reader(w);
}
void writer(int x, char c) {
  int s = 0, m = 0;
  char f[10];
  if (x < 0) m = 1, x = -x;
  while (x) f[s++] = x % 10, x /= 10;
  if (!s) f[s++] = 0;
  if (m) putchar_unlocked('-');
  while (s--) putchar_unlocked(f[s] + '0');
  putchar_unlocked(c);
}
void writer(long long x, char c) {
  int s = 0, m = 0;
  char f[20];
  if (x < 0) m = 1, x = -x;
  while (x) f[s++] = x % 10, x /= 10;
  if (!s) f[s++] = 0;
  if (m) putchar_unlocked('-');
  while (s--) putchar_unlocked(f[s] + '0');
  putchar_unlocked(c);
}
void writer(const char c[]) {
  int i;
  for (i = 0; c[i] != '\0'; i++) putchar_unlocked(c[i]);
}
void writer(const char x[], char c) {
  int i;
  for (i = 0; x[i] != '\0'; i++) putchar_unlocked(x[i]);
  putchar_unlocked(c);
}
template <class T>
void writerLn(T x) {
  writer(x, '\n');
}
template <class T, class S>
void writerLn(T x, S y) {
  writer(x, ' ');
  writer(y, '\n');
}
template <class T, class S, class U>
void writerLn(T x, S y, U z) {
  writer(x, ' ');
  writer(y, ' ');
  writer(z, '\n');
}
template <class T>
void writerArr(T x[], int n) {
  if (!n) {
    putchar_unlocked('\n');
    return;
  }
  for (int i = 0; i < (n - 1); i++) writer(x[i], ' ');
  writer(x[n - 1], '\n');
}
long long mod_pow(long long a, long long n, long long mod) {
  long long ret = 1;
  long long p = a % mod;
  while (n) {
    if (n & 1) ret = ret * p % mod;
    p = p * p % mod;
    n >>= 1;
  }
  return ret;
}
template <class T>
T extgcd(T a, T b, T& x, T& y) {
  for (T u = y = 1, v = x = 0; a;) {
    T q = b / a;
    swap(x -= q * u, u);
    swap(y -= q * v, v);
    swap(b -= q * a, a);
  }
  return b;
}
template <class T>
T mod_inv(T a, T m) {
  T x, y;
  extgcd(a, m, x, y);
  return (m + x % m) % m;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
class HL_decomposition {
 public:
  const vector<vector<int>>& e;
  const int n;
  vector<int> par, depth, ord;
  vector<int> cluster;
  vector<vector<int>> pathes;
  vector<int> path_idx;
  void init(int v) {
    depth.resize(n, 0);
    par.resize(n, 0);
    ord.resize(n, 0);
    depth[v] = 0;
    par[v] = -1;
    ord[0] = v;
    for (int p = 0, r = 1; p < r; p++) {
      int cur = ord[p];
      for (int nv : e[cur]) {
        if (nv == par[cur]) continue;
        ord[r++] = nv;
        par[nv] = cur;
        depth[nv] = depth[cur] + 1;
      }
    }
  }
  void decomposition() {
    vector<int> subtree_size(n, 1);
    for (int i = n - 1; i > 0; i--)
      subtree_size[par[ord[i]]] += subtree_size[ord[i]];
    cluster.resize(n, -1);
    int cluster_type = 0;
    for (int i = 0; i < (n); i++) {
      int u = ord[i];
      if (cluster[u] == -1) cluster[u] = cluster_type++;
      int max_subsize = -1, selected = -1;
      for (int v : e[u]) {
        if (par[u] != v && max_subsize < subtree_size[v]) {
          max_subsize = subtree_size[v];
          selected = v;
        }
      }
      if (selected != -1) cluster[selected] = cluster[u];
    }
  }
  void enum_pathes() {
    int cluster_num = 0;
    vector<int> rp(n);
    for (int i = 0; i < (n); i++) {
      rp[cluster[i]]++;
      cluster_num = max(cluster_num, cluster[i]);
    }
    cluster_num++;
    pathes.resize(cluster_num);
    for (int i = 0; i < (cluster_num); i++) pathes[i].resize(rp[i]);
    for (int i = n - 1; i >= 0; i--) {
      int u = ord[i];
      pathes[cluster[u]][--rp[cluster[u]]] = u;
    }
  }
  void set_path_idx() {
    path_idx.resize(n);
    for (const vector<int>& path : pathes) {
      for (int i = 0; i < (((int)(path).size())); i++) path_idx[path[i]] = i;
    }
  }

 public:
  HL_decomposition(const vector<vector<int>>& e) : e(e), n(((int)(e).size())) {
    init(0);
    decomposition();
    enum_pathes();
    set_path_idx();
  }
};
struct P {
  int vp[20], len;
  static P zero() {
    P ret;
    ret.len = 0;
    return ret;
  }
  bool is_zero() const { return len == 0; }
  P operator+(const P& r) const {
    if (is_zero())
      return r;
    else if (r.is_zero())
      return *this;
    P ret;
    ret.len = len + r.len;
    merge(vp, vp + len, r.vp, r.vp + r.len, ret.vp);
    ret.len = min(ret.len, 10);
    return ret;
  }
};
class seg_tree {
 public:
  vector<P> dat;
  int n;
  void propagate(int i) { dat[i] = dat[i * 2 + 1] + dat[i * 2 + 2]; }
  void init(P* d, int size) {
    n = 1;
    while (n < size) n <<= 1;
    dat.resize(2 * n - 1);
    fill(dat.begin(), dat.end(), P::zero());
    for (int i = 0; i < size; i++) dat[n - 1 + i] = d[i];
    for (int i = n - 2; i >= 0; i--) propagate(i);
  }
  void update(int k, P val) {
    k += n - 1;
    dat[k] = val;
    while (k > 0) {
      k = (k - 1) / 2;
      propagate(k);
    }
  }
  P query(int a, int b) { return query(a, b, 0, 0, n); }
  P query(int a, int b, int k, int l, int r) {
    if (r <= a || b <= l) return P::zero();
    if (a <= l && r <= b) return dat[k];
    int md = (l + r) / 2;
    int nl = k * 2 + 1, nr = nl + 1;
    P lval = query(a, b, nl, l, md);
    P rval = query(a, b, nr, md, r);
    return lval + rval;
  }
};
class LCA {
 public:
  vector<vector<int>>& e;
  int V, logV;
  vector<int> depth;
  vector<vector<int>> parent;
  LCA(vector<vector<int>>& e) : e(e) {
    this->V = ((int)(e).size());
    logV = 0;
    while (V >= (1 << logV)) logV++;
    this->depth = vector<int>(V);
    this->parent = vector<vector<int>>(logV, vector<int>(V));
    dfs(0, -1, 0);
    build();
  }
  void dfs(int v, int par, int d) {
    depth[v] = d;
    parent[0][v] = par;
    for (auto to : e[v]) {
      if (par == to) continue;
      dfs(to, v, d + 1);
    }
  }
  void build() {
    for (int k = 0; k + 1 < logV; k++) {
      for (int v = 0; v < V; v++) {
        if (parent[k][v] < 0)
          parent[k + 1][v] = -1;
        else
          parent[k + 1][v] = parent[k][parent[k][v]];
      }
    }
  }
  int prev_parent(int u, int par) {
    for (int k = logV - 1; k >= 0; k--) {
      int diff = depth[u] - depth[par];
      if ((diff - (1 << k)) > 0) {
        u = parent[k][u];
      }
    }
    return u;
  }
  int query(int u, int v) {
    if (depth[u] > depth[v]) swap(u, v);
    for (int k = 0; k < logV; k++) {
      if ((depth[v] - depth[u]) >> k & 1) v = parent[k][v];
    }
    if (u == v) return u;
    for (int k = logV - 1; k >= 0; k--) {
      if (parent[k][u] != parent[k][v]) {
        u = parent[k][u];
        v = parent[k][v];
      }
    }
    return parent[0][u];
  }
};
class tree_query {
  LCA* lca;
  HL_decomposition* hl;
  vector<seg_tree*> segs;

 public:
  tree_query(vector<vector<int>>& e, vector<vector<int>>& a) {
    lca = new LCA(e);
    hl = new HL_decomposition(e);
    segs.resize(((int)(hl->pathes).size()));
    for (int i = 0; i < (((int)(segs).size())); i++) {
      vector<P> dat;
      for (auto v : hl->pathes[i]) {
        P nw;
        for (int i = 0; i < (((int)(a[v]).size())); i++) nw.vp[i] = a[v][i];
        nw.len = ((int)(a[v]).size());
        dat.push_back(nw);
      }
      segs[i] = new seg_tree();
      segs[i]->init(&dat[0], ((int)(dat).size()));
    }
  }
  pair<pair<int, int>, pair<int, int>> expose(int u, int v) {
    auto l = lca->query(u, v);
    int l2 = -1;
    if (l != v) l2 = lca->prev_parent(v, l);
    return make_pair(pair<int, int>(u, l), pair<int, int>(v, l2));
  }
  P query_core(int u, int par) {
    P ret = P::zero();
    if (par == -1) return ret;
    while (true) {
      int l_index = 0;
      if (hl->cluster[u] == hl->cluster[par]) l_index = hl->path_idx[par];
      auto cur = segs[hl->cluster[u]]->query(l_index, hl->path_idx[u] + 1);
      ret = cur + ret;
      if (hl->cluster[u] == hl->cluster[par]) break;
      u = hl->par[hl->pathes[hl->cluster[u]][0]];
    }
    return ret;
  }
  P query(int u, int v) {
    auto ep = expose(u, v);
    auto ans1 = query_core(ep.first.first, ep.first.second);
    auto ans2 = query_core(ep.second.first, ep.second.second);
    return ans1 + ans2;
  }
};
vector<vector<int>> e;
int c[((int)1e5)];
int main() {
  int n, m, q;
  reader(n, m, q);
  e.resize(n);
  for (int i = 0; i < (n - 1); i++) {
    int x, y;
    reader(x, y);
    x--;
    y--;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  for (int i = 0; i < (m); i++) reader(c[i]);
  vector<vector<int>> v(n);
  for (int i = 0; i < (m); i++) v[c[i] - 1].push_back(i + 1);
  for (int i = 0; i < (n); i++) {
    sort(v[i].begin(), v[i].end());
    if (((int)(v[i]).size()) > 10) v[i].resize(10);
  }
  tree_query tq(e, v);
  vector<int> anses;
  for (int i = 0; i < (q); i++) {
    int v, u, a;
    reader(v, u, a);
    v--;
    u--;
    auto ans = tq.query(u, v);
    anses.clear();
    for (int i = 0; i < (ans.len); i++) {
      if (((int)(anses).size()) >= a) break;
      anses.push_back(ans.vp[i]);
    }
    if (((int)(anses).size()) == 0)
      puts("0");
    else {
      writer(((int)(anses).size()), ' ');
      writerArr(&anses[0], ((int)(anses).size()));
    }
  }
}