#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
inline long long read() {
  long long data = 0, w = 1;
  char ch = getchar();
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (ch <= '9' && ch >= '0') data = data * 10 + ch - 48, ch = getchar();
  return data * w;
}
inline void file() {
  freopen(
      "a"
      ".in",
      "r", stdin);
  freopen(
      "a"
      ".out",
      "w", stdout);
}
int n, q;
int head[N], nxt[N], to[N], cnt;
inline void add(int u, int v) {
  to[++cnt] = v;
  nxt[cnt] = head[u];
  head[u] = cnt;
}
int col[N], dcol[N];
int dhead[N], dnxt[N], dto[N], dcst[N], ddis[N], dcnt;
inline void dadd(int u, int v, int cst, int dis) {
  dto[++dcnt] = v;
  dcst[dcnt] = cst;
  ddis[dcnt] = dis;
  dnxt[dcnt] = dhead[u];
  dhead[u] = dcnt;
}
int m, t[N], v[N], vis[N], blk[N], whi[N];
void dfs1(int u, int lst, int cst, int dis) {
  if (vis[u] && lst) dadd(lst, u, cst - !col[u], dis - 1);
  for (int i = head[u], v; i; i = nxt[i])
    v = to[i],
    vis[u] ? dfs1(v, u, !col[v], 1) : dfs1(v, lst, cst + !col[v], dis + 1);
}
void dfs2(int u) {
  blk[u]++;
  if (!dcol[u]) {
    dcol[u] = 1;
    return;
  }
  for (int i = dhead[u], v; i; i = dnxt[i])
    if (dcst[i])
      dcst[i]--;
    else
      dfs2(v = dto[i]);
}
void dfs3(int u) {
  dcol[u] = blk[u] = 0;
  whi[u] = 1;
  for (int i = dhead[u], v; i; i = dnxt[i]) dcst[i] = ddis[i], dfs3(v = dto[i]);
}
void dfs4(int u, int bk, int wi) {
  if (vis[u]) {
    bk = blk[u];
    wi |= whi[u];
  }
  if (bk && (!col[u] || wi))
    col[u] = 1, bk--;
  else if (wi)
    col[u] = 0;
  for (int i = head[u], v; i; i = nxt[i]) dfs4(v = to[i], bk, wi);
}
inline void flush() {
  memset(vis, 0, sizeof(vis));
  memset(blk, 0, sizeof(blk));
  memset(whi, 0, sizeof(whi));
  for (int i = 1; i <= m; i++) vis[v[i]] = 1, dcol[v[i]] = col[v[i]];
  memset(dhead, 0, sizeof(dhead));
  dcnt = 0;
  dfs1(1, 0, 0, 0);
  for (int i = 1; i <= m; i++)
    if (t[i] == 1)
      dfs2(v[i]);
    else if (t[i] == 2)
      dfs3(v[i]);
    else
      puts(dcol[v[i]] ? "black" : "white");
  dfs4(1, 0, 0);
  m = 0;
}
int main() {
  n = read();
  q = read();
  for (int i = 2; i <= n; i++) add(read(), i);
  while (q--) {
    m++;
    t[m] = read();
    v[m] = read();
    if (m == 1000) flush();
  }
  flush();
  return 0;
}
