#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
deque<int> sp;
int head[300005], cnt, vis[300005];
struct f {
  int to, nex, yes;
} edge[600005];
void add(int u, int v) {
  edge[cnt].to = v;
  edge[cnt].yes = 0;
  edge[cnt].nex = head[u];
  head[u] = cnt++;
}
int main() {
  int n, m, k, i, j, x, y;
  scanf("%d%d%d", &n, &m, &k);
  memset(vis, 0, sizeof(vis));
  for (i = 1; i <= m; i++) {
    scanf("%d", &x);
    sp.push_back(x);
    vis[x] = 1;
  }
  memset(head, -1, sizeof(head));
  for (i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  while (!sp.empty()) {
    int f = sp.front();
    sp.pop_front();
    for (i = head[f]; ~i; i = edge[i].nex) {
      int v = edge[i].to;
      if (edge[i].yes) continue;
      edge[i].yes = edge[i ^ 1].yes = 1;
      if (vis[v]) {
        ans.push_back(i / 2 + 1);
        continue;
      }
      vis[v] = vis[f] + 1;
      sp.push_back(v);
    }
  }
  int d = ans.size();
  printf("%d\n", d);
  for (i = 0; i < d; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
