#include <bits/stdc++.h>
using namespace std;
bool police[300010];
int st[300010], to[300010 * 2], nxt[300010 * 2], id[300010 * 2];
int road[300010];
bool reach[300010];
vector<int> del;
void dp(int fa, int now, int d) {
  if (!police[now]) {
    road[now] = 0;
    reach[now] = false;
    int rr = d * 2;
    int unreach = 0;
    for (int i = st[now]; i != -1; i = nxt[i])
      if (to[i] != fa) {
        int v = to[i];
        dp(now, v, d);
        if (reach[v]) {
          if (road[v] + 1 <= d) {
            rr = min(rr, road[v] + 1);
          } else {
            del.push_back(id[i]);
          }
        } else
          unreach = max(unreach, road[v] + 1);
      }
    if (unreach + rr <= d) {
      reach[now] = true;
      road[now] = rr;
      bool ck = false;
      for (int i = st[now]; i != -1; i = nxt[i])
        if (to[i] != fa) {
          int v = to[i];
          if (reach[v] && road[v] + 1 <= d) {
            if (road[v] + 1 != rr)
              del.push_back(id[i]);
            else {
              if (ck) del.push_back(id[i]);
              ck = true;
            }
          }
        }
    } else {
      road[now] = unreach;
      for (int i = st[now]; i != -1; i = nxt[i])
        if (to[i] != fa) {
          int v = to[i];
          if (reach[v] && road[v] + 1 <= d) del.push_back(id[i]);
        }
    }
  } else {
    road[now] = 0;
    reach[now] = true;
    for (int i = st[now]; i != -1; i = nxt[i])
      if (to[i] != fa) {
        int v = to[i];
        dp(now, v, d);
        if (reach[v]) del.push_back(id[i]);
      }
  }
  return;
}
int main() {
  int n, k, d, a, b;
  scanf("%d %d %d", &n, &k, &d);
  for (int i = 1; i <= n; i++) {
    police[i] = false;
    st[i] = -1;
  }
  for (int i = 0; i < k; i++) {
    scanf("%d", &a);
    police[a] = true;
  }
  int p = 0;
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &a, &b);
    id[p] = i;
    to[p] = b;
    nxt[p] = st[a];
    st[a] = p++;
    id[p] = i;
    to[p] = a;
    nxt[p] = st[b];
    st[b] = p++;
  }
  del.clear();
  dp(-1, 1, d);
  printf("%d\n", del.size());
  for (int i = 0; i < del.size(); i++) {
    if (i != 0) printf(" ");
    printf("%d", del[i]);
  }
  printf("\n");
  return 0;
}
