#include <bits/stdc++.h>
using namespace std;
struct node {
  int to, next, v;
} e[600010];
struct Node {
  int num, d;
};
int n, k, d, cnt = 1, ans = 0, x, y, head[300010], vis[300010], flg[300010],
             res[300010];
queue<Node> q;
void add() {
  e[++cnt] = {y, head[x], 0}, head[x] = cnt, e[++cnt] = {x, head[y], 0},
  head[y] = cnt;
}
void bfs() {
  while (!q.empty()) {
    Node u = q.front();
    q.pop();
    flg[u.num] = 0;
    if (u.d > d) continue;
    for (int i = head[u.num]; i; i = e[i].next) {
      if (e[i].v) continue;
      e[i].v = e[i ^ 1].v = 1;
      if (vis[e[i].to]) {
        res[++ans] = i / 2;
      } else if (!flg[e[i].to])
        q.push({e[i].to, u.d + 1}), flg[e[i].to] = vis[e[i].to] = 1;
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &d);
  for (int i = 1; i <= k; i++) scanf("%d", &x), q.push({x, 0}), vis[x] = 1;
  for (int i = 1; i < n; i++) scanf("%d%d", &x, &y), add();
  bfs(), printf("%d\n", ans);
  for (int i = 1; i <= ans; i++) printf("%d ", res[i]);
  return 0;
}
