#include <bits/stdc++.h>
using namespace std;
namespace H_ {
const int N = 300002;
const int M = N * 2;
struct E_ {
  int eid, to;
  E_ *next;
} arre[M], *arrto[N];
int euse = 0;
int cut[N];
void adde_(int eid, int a, int b) {
  arre[euse] = (E_){eid, b, arrto[a]};
  arrto[a] = arre + euse++;
}
int dis[N];
int q[N], *l = q, *r = q;
void bfs_() {
  while (l != r) {
    int c = *l++;
    for (E_ *p = arrto[c]; p; p = p->next)
      if (dis[p->to] != -1)
        ++cut[p->eid];
      else
        dis[ *r++ = p->to] = dis[c] + 1;
  }
}
}  // namespace H_
int main() {
  using namespace H_;
  ios::sync_with_stdio(false);
  memset(dis, 0xFF, sizeof dis);
  int n, k, mxd;
  cin >> n >> k >> mxd;
  while (k--) {
    int c;
    cin >> c;
    --c;
    if (dis[c] == -1) dis[ *r++ = c] = 0;
  }
  for (int i = 1; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    adde_(i, a, b);
    adde_(i, b, a);
  }
  bfs_();
  int cntcut = 0;
  for (int i = 1; i < n; ++i)
    if (cut[i] == 2) ++cntcut;
  cout << cntcut << '\n';
  for (int i = 1; i < n; ++i)
    if (cut[i] == 2) cout << i << ' ';
  cout << endl;
  return 0;
}
