#include <bits/stdc++.h>
using namespace std;
int n, k, d, done[300005] = {0};
vector<int> graph[300005];
map<pair<int, int>, int> edge;
set<int> p;
void go() {
  queue<pair<int, int> > q;
  for (auto it : p) q.push({it, 0});
  while (!q.empty()) {
    int x = q.front().first, P = q.front().second;
    q.pop();
    if (done[x]) continue;
    done[x] = 1;
    for (auto it : graph[x]) {
      if (done[it] && it != P)
        printf("%d ", edge[{min(x, it), max(x, it)}]);
      else if (it != P)
        q.push({it, x});
    }
  }
}
int main() {
  scanf("%d", &n);
  scanf("%d", &k);
  scanf("%d", &d);
  for (__typeof(k) i = 0 - (0 > k); i != k - (0 > k); i += 1 - 2 * (0 > k)) {
    int x;
    scanf("%d", &x);
    p.insert(x);
  }
  for (__typeof(n - 1) i = 0 - (0 > n - 1); i != n - 1 - (0 > n - 1);
       i += 1 - 2 * (0 > n - 1)) {
    int u, v;
    scanf("%d", &u);
    scanf("%d", &v);
    graph[u].push_back(v);
    graph[v].push_back(u);
    edge[{min(u, v), max(u, v)}] = i + 1;
  }
  printf("%d\n", (int)p.size() - 1);
  go();
  printf("\n");
  return 0;
}
