#include <bits/stdc++.h>
const int MX = 300005;
using namespace std;
int n, k, d;
vector<pair<int, int> > v[MX];
int police[MX];
vector<int> ans;
int visit[MX];
int used[MX];
void bfs() {
  deque<pair<int, int> > q;
  for (int i = 1; i <= n; i++) {
    if (police[i] == 1) {
      q.push_back(make_pair(i, -1));
      visit[i] = 1;
    }
  }
  while (!q.empty()) {
    pair<int, int> nod = q.front();
    q.pop_front();
    for (int i = 0; i < (int)(v[nod.first].size()); i++) {
      int id = v[nod.first][i].first;
      int nn = v[nod.first][i].second;
      if (nod.second == nn) continue;
      if (!visit[nn]) {
        used[id] = 1;
        visit[nn] = 1;
        q.push_back(make_pair(nn, nod.first));
      }
    }
  }
}
int main() {
  cin >> n >> k >> d;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    police[x] = 1;
  }
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(make_pair(i, y));
    v[y].push_back(make_pair(i, x));
  }
  bfs();
  for (int i = 1; i <= n - 1; i++) {
    if (used[i] == 0) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < (int)(ans.size()); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
