#include <bits/stdc++.h>
bool police[300000];
bool removeedge[300000];
int minpolicedst[300000];
int minpolice[300000];
int parent[300000];
struct edge {
  int id;
  int to;
};
std::vector<struct edge> g[300000];
void remove_edges(int x) {
  for (auto& e : g[x]) {
    if (e.to != parent[x]) {
      parent[e.to] = x;
      remove_edges(e.to);
    }
    if (minpolice[x] != minpolice[e.to]) removeedge[e.id] = true;
  }
}
int main() {
  int n, k, d;
  std::queue<int> q;
  int uniqpolice = 0;
  std::cin >> n >> k >> d;
  for (int i = 0; i < n; i++) minpolicedst[i] = 300000 + 1;
  for (int i = 0; i < k; i++) {
    int x;
    std::cin >> x;
    if (!police[x - 1]) q.push(x - 1);
    police[x - 1] = true;
    minpolicedst[x - 1] = 0;
    minpolice[x - 1] = x - 1;
  }
  uniqpolice = q.size();
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    std::cin >> x >> y;
    g[x - 1].push_back({i, y - 1});
    g[y - 1].push_back({i, x - 1});
  }
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (auto& e : g[x]) {
      if (minpolicedst[e.to] > minpolicedst[x] + 1) {
        minpolicedst[e.to] = minpolicedst[x] + 1;
        minpolice[e.to] = minpolice[x];
        q.push(e.to);
      }
    }
  }
  parent[0] = -1;
  remove_edges(0);
  std::cout << (uniqpolice - 1) << std::endl;
  for (int i = 0; i < n - 1; i++) {
    if (removeedge[i]) std::cout << i + 1 << ' ';
  }
  std::cout << std::endl;
  return 0;
}
