#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int N = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long long inf = 8e18;
const int LOG = 22;
long long pw(long long a, long long b, long long M) {
  return (!b ? 1
             : (b & 1 ? (a * pw(a * a % M, b / 2, M)) % M
                      : pw(a * a % M, b / 2, M)));
}
int n, q, ptr, node[N], sub[N], H[N], Hd[N], Hv[N], St[N], Fi[N], P[N],
    sum[N << 2], lz[N << 2], seg[N << 2];
vector<int> G[N];
void pre(int v) {
  H[v] = H[P[v]] + 1;
  sub[v] = 1;
  for (auto u : G[v]) {
    pre(u);
    sub[v] += sub[u];
    if (sub[u] > sub[Hv[v]]) Hv[v] = u;
  }
}
void dfs(int v) {
  St[v] = ++ptr;
  node[ptr] = v;
  if (Hv[v]) {
    Hd[Hv[v]] = Hd[v];
    dfs(Hv[v]);
  }
  for (auto u : G[v]) {
    if (u == Hv[v]) continue;
    Hd[u] = u;
    dfs(u);
  }
  Fi[v] = ptr;
}
void build(int v = 1, int tl = 1, int tr = n) {
  seg[v] = -1;
  sum[v] = -(tr - tl + 1);
  if (tl == tr) return;
  int mid = (tl + tr) >> 1;
  build(v << 1, tl, mid);
  build(v << 1 | 1, mid + 1, tr);
}
pair<int, int> M(pair<int, int> L, pair<int, int> R) {
  pair<int, int> ret;
  ret.first = max(R.first, L.first + R.second);
  ret.second = L.second + R.second;
  return ret;
}
void merge(int v) {
  seg[v] = max(seg[v << 1 | 1], seg[v << 1] + sum[v << 1 | 1]);
  sum[v] = sum[v << 1] + sum[v << 1 | 1];
}
void second(int v, int tl, int tr) {
  if (lz[v] == 0) return;
  lz[v << 1] = lz[v << 1 | 1] = lz[v];
  seg[v << 1] = seg[v << 1 | 1] = -1;
  int mid = (tl + tr) >> 1;
  sum[v << 1] = -(mid - tl + 1);
  sum[v << 1 | 1] = -(tr - mid);
  lz[v] = 0;
}
void upd(int p, int x, int v = 1, int tl = 1, int tr = n) {
  second(v, tl, tr);
  if (tl == tr) {
    sum[v] += x;
    seg[v] += x;
    return;
  }
  int mid = (tl + tr) >> 1;
  if (p <= mid)
    upd(p, x, v << 1, tl, mid);
  else
    upd(p, x, v << 1 | 1, mid + 1, tr);
  merge(v);
}
void clr(int l, int r, int v = 1, int tl = 1, int tr = n) {
  second(v, tl, tr);
  if (l > tr || r < tl || l > r) return;
  if (l <= tl && tr <= r) {
    seg[v] = -1;
    sum[v] = -(tr - tl + 1);
    lz[v] = 1;
    return;
  }
  int mid = (tl + tr) >> 1;
  clr(l, r, v << 1, tl, mid);
  clr(l, r, v << 1 | 1, mid + 1, tr);
  merge(v);
}
pair<int, int> get(int l, int r, int v = 1, int tl = 1, int tr = n) {
  second(v, tl, tr);
  if (l > tr || r < tl || l > r) return make_pair(-1e9, 0);
  if (l <= tl && tr <= r) {
    return make_pair(seg[v], sum[v]);
  }
  int mid = (tl + tr) >> 1;
  pair<int, int> L = get(l, r, v << 1, tl, mid),
                 R = get(l, r, v << 1 | 1, mid + 1, tr);
  return M(L, R);
}
int delta(int v) {
  pair<int, int> ans = make_pair(-1e9, 0);
  vector<pair<int, int> > vec;
  while (Hd[v] != 1) {
    vec.push_back(make_pair(St[Hd[v]], St[v]));
    v = P[Hd[v]];
  }
  vec.push_back(make_pair(1, St[v]));
  reverse((vec).begin(), (vec).end());
  for (auto x : vec) {
    ans = M(ans, get(x.first, x.second));
  }
  return ans.first;
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 2; i <= n; i++) {
    int x;
    scanf("%d", &x);
    P[i] = x;
    G[x].push_back(i);
  }
  pre(1);
  dfs(Hd[1] = 1);
  build();
  while (q--) {
    int ver, v;
    scanf("%d%d", &ver, &v);
    switch (ver) {
      case 1:
        upd(St[v], 1);
        break;
      case 2:
        clr(St[v], Fi[v]);
        if (v != 1) {
          upd(St[v], min(0, -delta(P[v])));
        }
        break;
      default:
        if (delta(v) >= 0) {
          printf("black\n");
        } else {
          printf("white\n");
        }
        break;
    }
  }
  return 0;
}
