#include <bits/stdc++.h>
using namespace std;
const long long maxn = 3e5 + 5;
int n, k, d, cnt = 0;
bool vis[maxn];
bool edgevis[maxn];
vector<int> added;
struct edge {
  int to;
  int id;
};
vector<edge> ee[maxn];
struct node {
  int p;
  int step;
};
queue<node> q;
void bfs() {
  while (!q.empty()) {
    node st = q.front();
    int np = st.p, nstep = st.step;
    q.pop();
    if (nstep > d) continue;
    for (int i = 0; i < (int)ee[np].size(); ++i) {
      edge tt = ee[np][i];
      int nto = tt.to, nid = tt.id;
      if (!vis[nto]) {
        vis[nto] = true;
        edgevis[nid] = true;
        ++cnt;
        q.push(node{nto, nstep + 1});
      }
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &d);
  memset(vis, false, sizeof(vis));
  memset(edgevis, false, sizeof(edgevis));
  int tmp;
  for (int i = 1; i <= k; ++i) {
    scanf("%d", &tmp);
    q.push(node{tmp, 0});
    vis[tmp] = true;
  }
  int x, y;
  for (int i = 1; i <= n - 1; ++i) {
    scanf("%d%d", &x, &y);
    ee[x].push_back(edge{y, i});
    ee[y].push_back(edge{x, i});
  }
  bfs();
  cout << n - 1 - cnt << endl;
  for (int i = 1; i <= n - 1; ++i) {
    if (edgevis[i] == false) {
      cout << i << ' ';
    }
  }
  cout << endl;
  return 0;
}
