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;
template <class T>
inline void amin(T &x, const T &y) {
  if (y < x) x = y;
}
template <class T>
inline void amax(T &x, const T &y) {
  if (x < y) x = y;
}
template <class Iter>
void rprintf(const char *fmt, Iter begin, Iter end) {
  for (bool sp = 0; begin != end; ++begin) {
    if (sp)
      putchar(' ');
    else
      sp = true;
    printf(fmt, *begin);
  }
  putchar('\n');
}
const int MAXN = 200011;
int N;
vector<int> G[MAXN];
int P[MAXN];
int par[MAXN];
int sz[MAXN];
bool in[MAXN];
int deg[MAXN];
int even[MAXN];
vector<int> ord;
bool active(int v) { return deg[v] % 2 == 0 && even[v] == 0; }
void MAIN() {
  scanf("%d", &N);
  for (int i = 0, i_len = (N); i < i_len; ++i) scanf("%d", P + i);
  if (N & 1) {
    for (int i = 0, i_len = (N); i < i_len; ++i)
      if (P[i]) {
        int w = P[i] - 1;
        G[i].push_back(w);
        G[w].push_back(i);
      }
    ord.reserve(N);
    ord.push_back(0);
    for (int i_ = 0, i__len = (N); i_ < i__len; ++i_) {
      int v = ord[i_];
      for (__typeof((G[v]).begin()) e = (G[v]).begin(), e_end = (G[v]).end();
           e != e_end; ++e)
        if (*e != par[v]) {
          ord.push_back(*e);
          par[*e] = v;
        }
    }
    for (int i_ = 0, i__len = (N); i_ < i__len; ++i_) {
      int v = ord[N - 1 - i_];
      sz[v] = 1;
      for (__typeof((G[v]).begin()) e = (G[v]).begin(), e_end = (G[v]).end();
           e != e_end; ++e)
        if (*e != par[v]) {
          sz[v] += sz[*e];
          deg[v]++;
          if (sz[*e] % 2 == 0) even[v]++;
        }
      if (v) {
        deg[v]++;
        if (sz[v] % 2 == 1) even[v]++;
      }
    }
    stack<int> st;
    vector<int> ans;
    for (int i = 0, i_len = (N); i < i_len; ++i)
      if (active(i)) {
        in[i] = true;
        st.push(i);
      }
    while (!st.empty()) {
      int v = st.top();
      st.pop();
      if (!active(v)) {
        in[v] = false;
        continue;
      }
      ans.push_back(v);
      for (__typeof((G[v]).begin()) e = (G[v]).begin(), e_end = (G[v]).end();
           e != e_end; ++e) {
        deg[*e]--;
        even[*e]--;
        if (!in[*e] && active(*e)) {
          in[*e] = true;
          st.push(*e);
        }
      }
    }
    if ((int)ans.size() == N) {
      puts("YES");
      for (int i = 0, i_len = (N); i < i_len; ++i) printf("%d\n", ans[i] + 1);
    } else {
      puts("NO");
    }
  } else {
    puts("NO");
  }
}
int main() {
  int TC = 1;
  for (int tc = 0, tc_len = (TC); tc < tc_len; ++tc) MAIN();
  return 0;
}