#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 15;
vector<int> g[N];
int sum[N << 2], tr[N << 2], mxinit[N << 2], lz[N << 2];
int ptr, sz[N], st[N], en[N], vert[N], head[N], dep[N], par[N];
void dfs_sz(int v, int __dep) {
  sz[v] = 1;
  dep[v] = __dep;
  for (int i = 0; i < (int)g[v].size(); i++) {
    dfs_sz(g[v][i], __dep + 1);
    sz[v] += sz[g[v][i]];
    if (sz[g[v][i]] > sz[g[v][0]]) swap(g[v][i], g[v][0]);
  }
}
void dfs(int v, int hd) {
  head[v] = hd;
  vert[ptr] = v;
  st[v] = ptr++;
  if (!g[v].empty()) {
    dfs(g[v][0], hd);
    for (int i = 1; i < (int)g[v].size(); i++) {
      dfs(g[v][i], g[v][i]);
    }
  }
  en[v] = ptr;
}
void build(int v, int l, int r) {
  lz[v] = 0;
  if (l == r) {
    tr[v] = dep[vert[l]] - 1;
    mxinit[v] = tr[v];
    sum[v] = 0;
    return;
  }
  int m = (l + r) >> 1;
  int v1 = v << 1;
  int v2 = v1 | 1;
  build(v1, l, m);
  build(v2, m + 1, r);
  sum[v] = sum[v1] + sum[v2];
  tr[v] = max(tr[v1] + sum[v2], tr[v2]);
  mxinit[v] = max(mxinit[v1], mxinit[v2]);
}
void push(int v, int s, int e) {
  if (lz[v]) {
    tr[v] = mxinit[v];
    sum[v] = 0;
    if (s != e) lz[2 * v] = lz[2 * v + 1] = 1;
  }
  lz[v] = 0;
}
void update_point(int v, int l, int r, int ind, int x) {
  push(v, l, r);
  if (ind < l || r < ind) return;
  if (l == r) {
    sum[v] += x;
    tr[v] = dep[vert[l]] + sum[v] - 1;
    return;
  }
  int m = (l + r) >> 1;
  int v1 = v << 1;
  int v2 = v1 | 1;
  update_point(v1, l, m, ind, x);
  update_point(v2, m + 1, r, ind, x);
  tr[v] = max(tr[v1] + sum[v2], tr[v2]);
  sum[v] = sum[v1] + sum[v2];
}
void clear_range(int v, int s, int e, int l, int r) {
  if (l <= s && e <= r) {
    lz[v] = 1;
    push(v, s, e);
    return;
  }
  push(v, s, e);
  if (e < l || r < s || l > r) return;
  int m = (s + e) >> 1;
  int v1 = v << 1;
  int v2 = v1 | 1;
  clear_range(v1, s, m, l, r);
  clear_range(v2, m + 1, e, l, r);
  tr[v] = max(tr[v1] + sum[v2], tr[v2]);
  sum[v] = sum[v1] + sum[v2];
}
void query(int v, int s, int e, int l, int r, int &mx, int &sm) {
  push(v, s, e);
  if (l <= s && e <= r) {
    mx = max(mx, tr[v] + sm);
    sm += sum[v];
    return;
  }
  if (e < l || r < s || l > r) return;
  int m = (s + e) >> 1;
  int v1 = v << 1;
  int v2 = v1 | 1;
  query(v2, m + 1, e, l, r, mx, sm);
  query(v1, s, m, l, r, mx, sm);
}
int getColor(int v, int n) {
  int mx = dep[v] - 1;
  int sm = 0;
  while (v) {
    query(1, 1, n, st[head[v]], st[v], mx, sm);
    v = par[head[v]];
  }
  return mx;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(32);
  int n, q;
  cin >> n >> q;
  for (int i = 2; i <= n; i++) {
    cin >> par[i];
    g[par[i]].push_back(i);
  }
  par[1] = 0;
  dfs_sz(1, 0);
  ptr = 1;
  dfs(1, 1);
  build(1, 1, n);
  while (q--) {
    int t, v;
    cin >> t >> v;
    if (t == 1) {
      update_point(1, 1, n, st[v], 1);
    } else if (t == 2) {
      clear_range(1, 1, n, st[v], en[v] - 1);
      int val = max(0, getColor(v, n) - dep[v] + 1);
      update_point(1, 1, n, st[v], -val);
    } else {
      if (getColor(v, n) >= dep[v])
        cout << "black" << '\n';
      else
        cout << "white" << '\n';
    }
  }
  return 0;
}
