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>
#pragma GCC optimize("O3")
using namespace std;
template <typename T>
void _R(T& x) {
  cin >> x;
}
template <typename T>
void _R(vector<T>& x) {
  for (auto it = x.begin(); it != x.end(); it++) {
    _R(*it);
  }
}
void R() {}
template <typename T, typename... K>
void R(T& head, K&... tail) {
  _R(head);
  R(tail...);
}
template <typename T>
void _W(const T& x, const char c) {
  cout << x;
}
template <typename T>
void _W(const vector<T>& x, const char c) {
  for (auto it = x.cbegin(); it != x.cend(); it++) {
    if (it != x.cbegin()) putchar(c);
    _W(*it, c);
  }
}
void W() {}
template <typename T, typename... K>
void W(const T& head, const K&... tail) {
  _W(head, ' ');
  cout << (sizeof...(tail) ? ' ' : '\n') << flush;
  W(tail...);
}
const double PI =
    3.14159265358979323846264338327950288419716939937510582097494459230;
template <typename T>
inline T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
inline void amin(T& x, T y) {
  if (x > y) x = y;
}
template <typename T>
inline void amax(T& x, T y) {
  if (x < y) x = y;
}
template <typename A, typename B>
class comp {
 public:
  bool operator()(const pair<A, B>& a, const pair<A, B>& b) {
    if (a.first != b.first)
      return a.first < b.first;
    else
      return a.first > b.first;
  }
};
long long fast_exp(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1LL) {
      res *= a;
      res %= 1000000007;
    }
    b >>= 1LL;
    a *= a;
    a %= 1000000007;
  }
  return res;
}
const int N = 200005;
int n;
vector<int> g[N];
vector<int> a;
bool b[N];
map<int, bool> m[N];
void preprocess(void) { return; }
bool dfs(int u, int p) {
  int cnt = 0;
  for (auto v : (g[u])) {
    if (v == p) continue;
    bool f = dfs(v, u);
    m[u][v] = f;
    if (f) cnt++;
  }
  if (p == -1) {
    if ((cnt)&1)
      return false;
    else
      return true;
  }
  cnt++;
  if (cnt & 1)
    return true;
  else
    return false;
}
void answ(int u, int p) {
  for (auto v : (g[u])) {
    if (v == p) continue;
    if (!m[u][v]) {
      answ(v, u);
    }
  }
  a.push_back(u);
  for (auto v : (g[u])) {
    if (v == p) continue;
    if (m[u][v]) {
      answ(v, u);
    }
  }
}
signed main(int argc, char* argv[], char* envp[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  preprocess();
  int teeee;
  teeee = 1;
  for (int zeeee = (1); zeeee <= (teeee); zeeee++) {
    cin >> n;
    for (int i = (0); i <= ((int)(n)-1); i++) {
      int p;
      cin >> p;
      if (p == 0) continue;
      p--;
      g[i].push_back(p);
      g[p].push_back(i);
    }
    fill(b, b + n, false);
    bool ans = dfs(0, -1);
    if (ans) {
      cout << "YES\n";
      answ(0, -1);
      for (auto v : a) {
        cout << v + 1 << "\n";
      }
    } else {
      cout << "NO\n";
    }
  }
  cerr << (((double)clock()) / ((double)CLOCKS_PER_SEC)) << endl;
  return 0;
}
