You are given a tree (a graph with n vertices and n - 1 edges in which it's possible to reach any vertex from any other vertex using only its edges).

A vertex can be destroyed if this vertex has even degree. If you destroy a vertex, all edges connected to it are also deleted.

Destroy all vertices in the given tree or determine that it is impossible.

Input

The first line contains integer n (1 ≤ n ≤ 2·105) — number of vertices in a tree.

The second line contains n integers p1, p2, ..., pn (0 ≤ pi ≤ n). If pi ≠ 0 there is an edge between vertices i and pi. It is guaranteed that the given graph is a tree.

Output

If it's possible to destroy all vertices, print "YES" (without quotes), otherwise print "NO" (without quotes).

If it's possible to destroy all vertices, in the next n lines print the indices of the vertices in order you destroy them. If there are multiple correct answers, print any.

Examples

Input

5
0 1 2 1 2


Output

YES
1
2
3
5
4


Input

4
0 1 2 3


Output

NO

Note

In the first example at first you have to remove the vertex with index 1 (after that, the edges (1, 2) and (1, 4) are removed), then the vertex with index 2 (and edges (2, 3) and (2, 5) are removed). After that there are no edges in the tree, so you can remove remaining vertices in any order.

<image>

import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

import static java.lang.Math.*;
import static java.util.Comparator.comparingInt;

public class D implements Closeable {

    private InputReader in = new InputReader(System.in);
    private PrintWriter out = new PrintWriter(System.out);

    public void solve() {
        int n = in.ni();
        if (n % 2 == 0) {
            out.println("NO");
            return;
        }
        int[] degree = new int[n + 1];
        int[] depth = new int[n + 1];
        List<List<Integer>> tree = new ArrayList<>();
        for (int i = 0; i <= n; i++) {
            tree.add(new ArrayList<>());
            depth[i] = -1;
        }
        int root = -1;
        for (int i = 1; i <= n; i++) {
            int parent = in.ni();
            if (parent != 0) {
                degree[parent]++;
                degree[i]++;
                tree.get(i).add(parent);
                tree.get(parent).add(i);
            } else {
                root = i;
            }
        }

        ArrayDeque<Integer> deque = new ArrayDeque<>();
        depth[root] = 0;
        deque.addLast(root);
        while (!deque.isEmpty()) {
            int u = deque.pollFirst();
            for (int v : tree.get(u)) {
                if (depth[v] == -1) {
                    depth[v] = depth[u] + 1;
                    deque.offerLast(v);
                }
            }
        }


        PriorityQueue<Integer> queue = new PriorityQueue<>(comparingInt(x -> -depth[x]));
        for (int i = 1; i <= n; i++) {
            if (degree[i] % 2 == 0) {
                queue.offer(i);
            }
        }
        List<Integer> result = new ArrayList<>();
        boolean[] visited = new boolean[n + 1];
        while (!queue.isEmpty()) {
            int u = queue.poll();
            if (visited[u] || degree[u] % 2 == 1) continue;
            result.add(u);
            degree[u] = 0;
            visited[u] = true;
            for (int v : tree.get(u)) {
                if (degree[v] == 0) continue;

                if (degree[v] > 0) degree[v]--;
                if (degree[v] % 2 == 0) {
                    queue.add(v);
                }
            }
        }
        if (result.size() == n) {
            out.println("YES");
            result.forEach(out::println);
        } else {
            out.println("NO");
        }
    }

    @Override
    public void close() throws IOException {
        in.close();
        out.close();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int ni() {
            return Integer.parseInt(next());
        }

        public long nl() {
            return Long.parseLong(next());
        }

        public void close() throws IOException {
            reader.close();
        }
    }

    public static void main(String[] args) throws IOException {
        try (D instance = new D()) {
            instance.solve();
        }
    }
}
