Problem: 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>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000007LL;
const double EPS = 1e-14;
const long long inf_ll = (long long)1e18;
const long long maxn = 200005LL;
const long long mod = 810872LL;
struct Graph {
  struct edge {
    int u, v, nxt;
    edge(int u = 0, int v = 0, int nxt = 0) : u(u), v(v), nxt(nxt) {}
  } E[maxn * 2];
  int cnt, head[maxn];
  inline void link(int u, int v) {
    E[++cnt] = edge(u, v, head[u]);
    head[u] = cnt;
  }
  inline void link2(int u, int v) {
    link(u, v);
    link(v, u);
  }
} G;
int n;
int vis[maxn], D[maxn];
int deg[maxn];
int order[maxn], order_clock;
inline void del(int u) {
  order[++order_clock] = u;
  D[u] = 1;
}
void dfs2(int u, int p) {
  if (!D[u]) del(u);
  for (register int(i) = G.head[u], (v) = G.E[i].v; (i);
       (i) = G.E[i].nxt, (v) = G.E[i].v)
    if (v != p && !D[v]) dfs2(v, u);
}
void dfs1(int u, int p) {
  vis[u] = 1;
  int cnt1 = !!p, cnt2 = 0;
  for (register int(i) = G.head[u], (v) = G.E[i].v; (i);
       (i) = G.E[i].nxt, (v) = G.E[i].v)
    if (v ^ p) {
      ++cnt1;
      dfs1(v, u);
      if (D[v]) ++cnt2;
    }
  if ((cnt1 - cnt2) % 2 == 0) {
    del(u);
    dfs2(u, p);
  }
}
int main() {
  scanf("%d", &n);
  for (register int(i) = (1); (i) <= (n); ++i) {
    int u;
    scanf("%d", &u);
    if (!u) continue;
    G.link2(i, u);
    deg[i] ^= 1;
    deg[u] ^= 1;
  }
  if (n % 2 == 0) {
    puts("NO");
    return 0;
  }
  dfs1(1, 0);
  puts("YES");
  for (register int(i) = (1); (i) <= (n); ++i) printf("%d\n", order[i]);
  return 0;
}