#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 6;
int ans[N];
vector<pair<int, int> > G[N];
int k;
int d;
set<pair<int, int> > q;
int yes[N];
int par[N];
int vis[N];
int dist[N];
int main() {
  int n;
  cin >> n >> k >> d;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    if (yes[x]) continue;
    yes[x] = 1;
    vis[x] = 1;
    q.insert(make_pair(0, x));
  }
  for (int i = 2; i <= n; ++i) {
    int x, y;
    cin >> x >> y;
    G[x].push_back(make_pair(i - 1, y));
    G[y].push_back(make_pair(i - 1, x));
  }
  while (!q.empty()) {
    auto cur = *(q.begin());
    q.erase(q.begin());
    for (auto z : G[cur.second]) {
      if (vis[z.second]) {
        if (par[z.second] == cur.second or par[cur.second] == z.second)
          continue;
        ans[z.first] = 1;
      } else {
        vis[z.second] = 1;
        par[z.second] = cur.second;
        q.insert(make_pair(cur.first + 1, z.second));
      }
    }
  }
  int cnt = 0;
  for (int i = 1; i < n; i++)
    if (ans[i]) cnt++;
  cout << cnt << endl;
  for (int i = 1; i < n; i++) {
    if (ans[i]) cout << i << " ";
  }
}
