#include <bits/stdc++.h>
using namespace std;
const int N = 100003, M = 1 << 18;
template <typename T>
void read(T &x) {
  int ch = getchar();
  x = 0;
  bool f = false;
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  if (f) x = -x;
}
template <typename T>
bool chmax(T &a, const T &b) {
  if (a < b) return a = b, 1;
  return 0;
}
template <typename T>
bool chmin(T &a, const T &b) {
  if (a > b) return a = b, 1;
  return 0;
}
int n, q, cnt, fa[N], head[N], to[N], nxt[N];
void add(int a, int b) {
  to[++cnt] = b;
  nxt[cnt] = head[a];
  head[a] = cnt;
}
int siz[N], wson[N], dep[N], dfn[N], tim, top[N];
void dfs1(int x) {
  siz[x] = 1;
  for (int i = head[x]; i; i = nxt[i]) {
    dep[to[i]] = dep[x] + 1;
    dfs1(to[i]);
    siz[x] += siz[to[i]];
    if (siz[to[i]] > siz[wson[x]]) wson[x] = to[i];
  }
}
void dfs2(int x, int tp) {
  top[x] = tp;
  dfn[x] = ++tim;
  if (!wson[x]) return;
  dfs2(wson[x], tp);
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != wson[x]) dfs2(to[i], to[i]);
}
struct Node {
  int sum, res;
  Node(int s = 0, int r = -1e9) : sum(s), res(r) {}
  Node operator+(const Node &o) const {
    return Node(sum + o.sum, max(o.res, res + o.sum));
  }
} seg[M];
bool tag[M];
void ptag(int x, int len) {
  tag[x] = true;
  seg[x].sum = -len;
  seg[x].res = -1;
}
void pdown(int x, int len) {
  if (tag[x]) {
    ptag(x << 1, len + 1 >> 1);
    ptag(x << 1 | 1, len >> 1);
    tag[x] = false;
  }
}
void pup(int x) { seg[x] = seg[x << 1] + seg[x << 1 | 1]; }
Node qry(int l, int r, int x = 1, int L = 1, int R = n) {
  if (l <= L && R <= r) return seg[x];
  int mid = L + R >> 1;
  pdown(x, R - L + 1);
  if (r <= mid) return qry(l, r, x << 1, L, mid);
  if (mid < l) return qry(l, r, x << 1 | 1, mid + 1, R);
  return qry(l, r, x << 1, L, mid) + qry(l, r, x << 1 | 1, mid + 1, R);
}
void upd(int p, int v, int x = 1, int L = 1, int R = n) {
  if (L == R) {
    seg[x].sum += v;
    seg[x].res += v;
    return;
  }
  int mid = L + R >> 1;
  pdown(x, R - L + 1);
  if (p <= mid)
    upd(p, v, x << 1, L, mid);
  else
    upd(p, v, x << 1 | 1, mid + 1, R);
  pup(x);
}
void cov(int l, int r, int x = 1, int L = 1, int R = n) {
  if (l <= L && R <= r) {
    ptag(x, R - L + 1);
    return;
  }
  int mid = L + R >> 1;
  pdown(x, R - L + 1);
  if (l <= mid) cov(l, r, x << 1, L, mid);
  if (mid < r) cov(l, r, x << 1 | 1, mid + 1, R);
  pup(x);
}
int qry(int x) {
  Node res;
  while (top[x] > 1) {
    res = qry(dfn[top[x]], dfn[x]) + res;
    x = fa[top[x]];
  }
  return (qry(1, dfn[x]) + res).res;
}
int main() {
  read(n);
  read(q);
  ptag(1, n);
  for (int i = 2; i <= n; ++i) {
    read(fa[i]);
    add(fa[i], i);
  }
  dfs1(1);
  dfs2(1, 1);
  while (q--) {
    int opt, x;
    read(opt);
    read(x);
    if (opt == 1)
      upd(dfn[x], 1);
    else if (opt == 2) {
      cov(dfn[x], dfn[x] + siz[x] - 1);
      upd(dfn[x], -qry(x) - 1);
    } else
      puts(qry(x) >= 0 ? "black" : "white");
  }
}
