#include <bits/stdc++.h>
template <typename T>
inline int chkmin(T &x, T y) {
  return x > y ? x = y, 1 : 0;
}
const int MAXN = 1009, MAXX = 5009;
int T;
int n, w[MAXN];
struct Edge {
  int ver, nxt;
} e[MAXN];
int head[MAXN], tot = 0;
inline void Add(int x, int y) { e[++tot].ver = y, e[tot].nxt = head[x]; }
int f[MAXN], g[MAXX];
void Dfs(int x) {
  for (int i = head[x]; i; i = e[i].nxt) {
    int y = e[i].ver;
    Dfs(y);
  }
  memset(g, 0x3f, sizeof g);
  g[0] = 0;
  for (int i = head[x]; i; i = e[i].nxt) {
    int y = e[i].ver;
    for (int j = w[x]; j; --j) {
      if (j >= w[y]) chkmin(g[j], g[j - w[y]] + f[y]);
      if (j >= f[y]) chkmin(g[j], g[j - f[y]] + w[y]);
    }
  }
  for (int i = 1; i <= w[x]; ++i) chkmin(f[x], g[i]);
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) {
    int fa;
    scanf("%d", &fa);
    Add(fa, i);
  }
  memset(f, 0x3f, sizeof f);
  Dfs(1);
  puts(f[1] == 1 << 30 ? "IMPOSSIBLE" : "POSSIBLE");
  return 0;
}
