#include <bits/stdc++.h>
using namespace std;
vector<int> a[300001], c[300001], kq;
int n, m, k, i, u, v, f[300001], dd[300001], d[300001], tr[300001];
queue<int> q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  memset(f, -1, sizeof(f));
  for (i = 1; i <= m; i++) {
    cin >> u;
    dd[u] = 1;
    f[u] = 0;
    q.push(u);
    tr[u] = u;
  }
  for (i = 1; i < n; i++) {
    cin >> u >> v;
    a[u].push_back(v);
    a[v].push_back(u);
    c[u].push_back(i);
    c[v].push_back(i);
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0; i < a[u].size(); i++) {
      int v = a[u][i];
      if (f[v] == -1 && f[u] < k) {
        tr[v] = tr[u];
        f[v] = f[u] + 1;
        q.push(v);
        d[c[u][i]] = 1;
      }
    }
  }
  for (i = 1; i < n; i++)
    if (d[i] == 0) kq.push_back(i);
  cout << kq.size() << '\n';
  for (i = 0; i < kq.size(); i++) cout << kq[i] << ' ';
}
