#include <bits/stdc++.h>
using namespace std;
int n, d, k, dis[300005];
vector<int> ans;
bool vis[300005], p[300003];
vector<int> all;
vector<pair<int, int> > e[300005];
void dfs(int idx, int cur) {
  if (vis[idx]) {
    return;
  }
  vis[idx] = 1;
  for (int i = 0; i < e[idx].size(); i++) {
    int to = e[idx][i].first;
    if (!vis[to]) {
      if (p[to]) {
        ans.push_back(e[idx][i].second);
        dfs(to, 0);
        continue;
      } else {
        if (cur + 1 > dis[to]) {
          ans.push_back(e[idx][i].second);
          continue;
        }
        dfs(to, cur + 1);
      }
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &d);
  int foo;
  queue<int> q;
  fill(dis, dis + n + 1, 1e9);
  for (int i = 0; i < k; i++) {
    scanf("%d", &foo);
    p[foo] = 1;
    dis[foo] = 0;
    all.push_back(foo);
  }
  for (int i = 0; i <= n; i++) {
    if (p[i]) {
      q.push(i);
    }
  }
  int a, b;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &a, &b);
    e[a].push_back(make_pair(b, i));
    e[b].push_back(make_pair(a, i));
  }
  while (!q.empty()) {
    int f = q.front();
    q.pop();
    for (int i = 0; i < e[f].size(); i++) {
      int to = e[f][i].first;
      if (dis[to] > dis[f] + 1) {
        dis[to] = dis[f] + 1;
        q.push(to);
      }
    }
  }
  for (int i = 0; i < all.size(); i++) {
    dfs(all[i], 0);
  }
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < ans.size(); i++) {
    if (i) {
      printf(" ");
    }
    printf("%d", ans[i]);
  }
  return 0;
}
