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>
#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return {i, j};
}
struct printer {
  ~printer() { cerr << endl; }
  template <class c>
  printer& operator,(c x) {
    cerr << boolalpha << x;
    return *this;
  }
  printer& operator,(string x) {
    cerr << x;
    return *this;
  }
  template <class c, class d>
  printer& operator,(pair<c, d> x) {
    return *this, "(", x.first, ", ", x.second, ")";
  }
  template <class... d, template <class...> class c>
  printer& operator,(c<d...> x) {
    return *this, range(begin(x), end(x));
  }
  template <class c>
  printer& operator,(rge<c> x) {
    *this, "[";
    for (auto it = x.b; it != x.e; ++it) *this, (it == x.b ? "" : ", "), *it;
    return *this, "]";
  }
};
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int my_rand(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
const int N = 200009;
vector<int> vec[N];
int ar[N], degree[N], level[N];
struct node {
  int u, lv, id;
  bool operator<(const node& p) const { return p.lv > lv; }
};
void dfs(int u, int par, int lv) {
  level[u] = lv;
  int v, i, sz = vec[u].size();
  for (i = 0; i < sz; i++) {
    v = vec[u][i];
    if (v != par) {
      dfs(v, u, lv + 1);
    }
  }
}
int main() {
  int n, i, r;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &r);
    if (r == 0) continue;
    vec[i].push_back(r);
    vec[r].push_back(i);
    degree[r]++;
    degree[i]++;
  }
  if (n % 2 == 0) {
    printf("NO\n");
    return 0;
  }
  for (i = 1; i <= n; i++) {
    if (degree[i] == 1) {
      dfs(i, -1, 0);
      break;
    }
  }
  priority_queue<node> pq;
  for (i = 1; i <= n; i++) {
    if (degree[i] % 2 == 0) pq.push({i, level[i], 0});
  }
  vector<int> ans;
  while (!pq.empty()) {
    node top = pq.top();
    pq.pop();
    if (top.id != ar[top.u]) continue;
    ans.push_back(top.u);
    int sz = vec[top.u].size();
    for (i = 0; i < sz; i++) {
      int v = vec[top.u][i];
      if (degree[v] > 0) {
        degree[v]--;
        ar[v]++;
        if (degree[v] == 0)
          ans.push_back(v);
        else if (degree[v] % 2 == 0) {
          pq.push({v, level[v], ar[v]});
        }
      }
    }
    degree[top.u] = 0;
  }
  int sz = ans.size();
  printf("YES\n");
  for (i = 0; i < sz; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
