#include <bits/stdc++.h>
using namespace std;
long long int n, m;
long long int arr[300000];
long long int par[300000];
vector<long long int> adj[300000];
long long int dp[300000];
bool dfs(long long int node) {
  for (auto it : adj[node]) {
    if (it != par[node])
      if (!dfs(it)) return false;
  }
  long long int dp2[adj[node].size() + 1][arr[node] + 1];
  n = adj[node].size();
  m = arr[node];
  for (long long int i = 0; i <= n; i++)
    for (long long int j = 0; j <= m; j++) dp2[i][j] = 1e11;
  dp2[0][0] = 0;
  for (long long int i = 1; i <= n; i++)
    for (long long int j = 0; j <= m; j++) {
      long long int ele = adj[node][i - 1];
      if (j - dp[ele] >= 0)
        dp2[i][j] = min(dp2[i][j], dp2[i - 1][j - dp[ele]] + arr[ele]);
      if (j - arr[ele] >= 0)
        dp2[i][j] = min(dp2[i][j], dp2[i - 1][j - arr[ele]] + dp[ele]);
    }
  dp[node] = 1e11;
  for (long long int j = 0; j <= m; j++) dp[node] = min(dp[node], dp2[n][j]);
  if (dp[node] == 1e11) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int TESTS, q, a, s, b, l, r, c, k, p, h, w, d, x, y, z, xs, ys, t;
  TESTS = 1;
  while (TESTS--) {
    cin >> n;
    par[0] = -1;
    for (long long int i = 1; i <= n - 1; i++) {
      cin >> par[i];
      par[i]--;
      adj[i].push_back(par[i]);
      adj[par[i]].push_back(i);
    }
    (dfs(0)) ? cout << "POSSIBLE" : cout << "IMPOSSIBLE";
  }
  return 0;
}
