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;
string itosm(long long x) {
  if (x == 0) return "0";
  string ans = "";
  while (x > 0) {
    ans += ((x % 10) + '0');
    x /= 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
long long stoim(string str) {
  long long ans = 0;
  long long k = 1;
  int p = 0;
  if (str[0] == '-') p++;
  for (int i = str.length() - 1; i >= p; i--) {
    ans += (str[i] - '0') * k;
    k *= 10;
  }
  return ans;
}
const long long infll = 1e18 + 3;
const int inf = 1009000999;
const long double eps = 1e-7;
const int maxn = 1e6 + 1146;
const int baseint = 1000200013;
const long long basell = 1e18 + 3;
const long double PI = acos(-1.0);
const long long mod = 1e9 + 9;
vector<int> g[maxn];
int d[maxn];
int lvl[maxn];
bool del[maxn];
void dfs(int v, int an) {
  for (int to : g[v]) {
    if (to == an) continue;
    lvl[to] = lvl[v] + 1;
    dfs(to, v);
  }
}
void solve() {
  int n;
  cin >> n;
  if (n % 2 == 0) {
    cout << "NO";
    return;
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x == 0) continue;
    g[i].push_back(x);
    g[x].push_back(i);
  }
  dfs(1, -1);
  set<pair<int, int> > q;
  for (int v = 1; v <= n; v++) {
    d[v] = g[v].size();
    if (g[v].size() % 2 == 0) q.insert({lvl[v], v});
  }
  vector<int> ans;
  while (!q.empty()) {
    int v = (*q.rbegin()).second;
    q.erase({lvl[v], v});
    ans.push_back(v);
    del[v] = 1;
    for (int to : g[v]) {
      d[to]--;
      if (d[to] % 2 == 0) {
        if (!del[to]) q.insert({lvl[to], to});
      } else {
        q.erase({lvl[to], to});
      }
    }
  }
  for (int v : ans) cout << v << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}