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;
int n;
vector<vector<int>> adj;
vector<vector<int>> dp;
vector<int> parells;
vector<bool> erased;
int calc_par(int a, int ib) {
  if (dp[a][ib] != -1) return dp[a][ib];
  int sum = 1;
  int ia;
  int b = adj[a][ib];
  for (int i = 0; i < adj[b].size(); ++i) {
    if (adj[b][i] == a) {
      ia = i;
      continue;
    }
    sum += calc_par(b, i);
  }
  int ret = sum % 2;
  dp[b][ia] = 1 - ret;
  dp[a][ib] = ret;
  return ret;
}
int main() {
  cin >> n;
  adj = vector<vector<int>>(n, vector<int>());
  dp = vector<vector<int>>(n, vector<int>());
  erased = vector<bool>(n, false);
  parells = vector<int>(n, 0);
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    if (a == 0) continue;
    a--;
    adj[i].push_back(a);
    adj[a].push_back(i);
    dp[i].push_back(-1);
    dp[a].push_back(-1);
  }
  if (n % 2 == 0)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    set<pair<int, int>> S;
    for (int i = 0; i < n; ++i) {
      int p = 0;
      for (int j = 0; j < adj[i].size(); ++j) {
        p += 1 - calc_par(i, j);
      }
      S.insert(pair<int, int>(p, i));
      parells[i] = p;
    }
    for (int ii = 0; ii < n; ++ii) {
      auto v = S.begin()->second;
      S.erase(S.begin());
      printf("%d\n", v + 1);
      for (int i = 0; i < adj[v].size(); ++i) {
        int v2 = adj[v][i];
        if (erased[v2]) continue;
        S.erase(pair<int, int>(parells[v2], v2));
        parells[v2]--;
        S.insert(pair<int, int>(parells[v2], v2));
      }
      erased[v] = true;
    }
  }
}
