import sys input = sys.stdin.readline from collections import * def bfs(sta): dist = [10**18]*(2*N) dist[2*sta] = 0 q = deque([2*sta]) while q: v = q.popleft() for nv in G[v]: if dist[nv]==10**18: dist[nv] = dist[v]+1 q.append(nv) return dist N, M, P = map(int, input().split()) s, g = map(int, input().split()) s -= 1 g -= 1 G = [[] for _ in range(2*N)] for _ in range(N-1): u, v = map(int, input().split()) u -= 1 v -= 1 G[2*u].append(2*v+1) G[2*u+1].append(2*v) G[2*v].append(2*u+1) G[2*v+1].append(2*u) dist1 = bfs(s) dist2 = bfs(g) ans = [] for i in range(N): if P%2==0 and min(dist1[2*i]+dist2[2*i], dist1[2*i+1]+dist2[2*i+1])<=P: ans.append(i) elif P%2==1 and min(dist1[2*i]+dist2[2*i+1], dist1[2*i+1]+dist2[2*i])<=P: ans.append(i) if len(ans)==0: print(-1) exit() print(len(ans)) for ans_i in ans: print(ans_i+1)