#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAXN = 3e5 + 100;
int v[MAXN], res[MAXN];
queue<pair<int, int> > q;
vector<pair<int, int> > g[MAXN];
void solve() {
  int n, k, d;
  cin >> n >> k >> d;
  for (int i = 0; i < k; i++) {
    int ok;
    cin >> ok;
    q.push({ok, 0});
  }
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back({v, i + 1});
    g[v].push_back({u, i + 1});
  }
  while (!q.empty()) {
    int l, r;
    l = q.front().first;
    r = q.front().second;
    q.pop();
    if (v[l]) continue;
    v[l] = 1;
    for (int i = 0; i < (int)g[l].size(); i++)
      if (g[l][i].first != r) {
        if (v[g[l][i].first])
          res[g[l][i].second] = 1;
        else
          q.push({g[l][i].first, l});
      }
  }
  int ans = 0;
  for (int i = 1; i < n; i++)
    if (res[i]) ans++;
  cout << ans << endl;
  for (int i = 1; i < n; i++)
    if (res[i]) cout << i << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
