import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(readline()) m = map(int, read().split()) G = [[] for _ in range(N + 1)] for a, b in zip(m, m): G[a].append(b) G[b].append(a) root = 1 parent = [0] * (N + 1) order = [] stack = [root] while stack: x = stack.pop() order.append(x) for y in G[x]: if y == parent[x]: continue parent[y] = x stack.append(y) dp_v = [[0, 0] for _ in range(N + 1)] dp_e_d = [False] * (N + 1) for v in order[::-1]: p = parent[v] if dp_v[v][0] == 0: dp_e_d[v] = True dp_v[p][0] += 1 else: dp_v[p][1] += 1 dp_e_u = [False] * (N + 1) for v in order: if v == root: continue p = parent[v] dp_e_u[v] = dp_v[p][0] - (dp_e_d[v]) == 0 if dp_e_u[v]: dp_v[v][0] += 1 else: dp_v[v][1] += 1 win_v = [v for v in range(1, N + 1) if not dp_v[v][0]] print(len(win_v)) print('\n'.join(map(str, win_v)))