#include <bits/stdc++.h>
using namespace std;
int n, k, d, x, y, ans;
vector<pair<int, int> > e[1000555];
queue<pair<int, int> > q;
bool visit[1000555], res[1000555];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> d;
  for (int i = 1; i <= k; i++) {
    cin >> x;
    q.push({x, 0});
  }
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    e[x].push_back({y, i});
    e[y].push_back({x, i});
  }
  while (!q.empty()) {
    int pos = q.front().first;
    int par = q.front().second;
    q.pop();
    if (visit[pos]) continue;
    visit[pos] = 1;
    for (auto u : e[pos]) {
      if (u.first == par) continue;
      if (visit[u.first])
        res[u.second] = 1;
      else
        q.push({u.first, pos});
    }
  }
  for (int i = 1; i <= n; i++) ans += res[i];
  cout << ans << endl;
  for (int i = 1; i <= n; i++) {
    if (res[i]) cout << i << " ";
  }
  return 0;
}
