#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 3e5 + 5;
int nowtime, n, k, d, memo[N];
bool visited[N];
vector<int> v[N], ans, police;
map<pair<int, int>, int> kode;
set<pair<int, int> > sett;
int par[N];
void bfs() {
  queue<int> q;
  for (auto x : police) {
    q.push(x);
    par[x] = x;
    visited[x] = true;
  }
  while (q.empty() == false) {
    int skg = q.front();
    q.pop();
    for (auto isi : v[skg]) {
      if (visited[isi] == false) {
        visited[isi] = true;
        par[isi] = skg;
        q.push(isi);
      } else if (par[skg] != isi && par[isi] != skg) {
        if (sett.count({skg, isi}) == 0 && sett.count({isi, skg}) == 0) {
          sett.insert({skg, isi});
          ans.push_back(kode[{skg, isi}]);
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k >> d;
  for (int i = 1; i <= k; i++) {
    int p;
    cin >> p;
    police.push_back(p);
  }
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    kode[{a, b}] = i;
    kode[{b, a}] = i;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    memo[i] = INF;
  }
  bfs();
  cout << ans.size() << endl;
  for (auto isi : ans) {
    cout << isi << " ";
  }
  cout << endl;
}
