#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
inline int read() {
  char c = getchar();
  int t = 0, f = 1;
  while ((!isdigit(c)) && (c != EOF)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while ((isdigit(c)) && (c != EOF)) {
    t = (t << 3) + (t << 1) + (c ^ 48);
    c = getchar();
  }
  return t * f;
}
int n, q, p[maxn];
vector<int> g[maxn];
int sz[maxn], son[maxn], dep[maxn];
void dfs(int u) {
  sz[u] = 1;
  dep[u] = dep[p[u]] + 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    dfs(v);
    sz[u] += sz[v];
    if (sz[son[u]] < sz[v]) son[u] = v;
  }
}
int top[maxn], dfn, id[maxn];
void dfs2(int u, int tp) {
  dfn++;
  top[u] = tp;
  id[u] = dfn;
  if (son[u]) {
    dfs2(son[u], tp);
  }
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == son[u]) continue;
    dfs2(v, v);
  }
}
int sum[maxn << 2], mx[maxn << 2], tag[maxn << 2];
inline void pushup(int rt) {
  sum[rt] = sum[rt << 1] + sum[rt << 1 | 1];
  mx[rt] = max(mx[rt << 1 | 1], sum[rt << 1 | 1] + mx[rt << 1]);
}
inline void build(int rt, int l, int r) {
  if (l == r) {
    sum[rt] = -1;
    mx[rt] = -1;
    return;
  }
  int mid = (l + r) >> 1;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  pushup(rt);
}
inline void pushdown(int rt, int l, int r) {
  if (!tag[rt]) return;
  int mid = (l + r) >> 1;
  sum[rt << 1] = -(mid - l + 1);
  mx[rt << 1] = -1;
  tag[rt << 1] = 1;
  sum[rt << 1 | 1] = -(r - mid);
  mx[rt << 1 | 1] = -1;
  tag[rt << 1 | 1] = 1;
  tag[rt] = 0;
}
inline void modify(int rt, int l, int r, int x, int y, int val) {
  if (x <= l && r <= y) {
    sum[rt] += val;
    mx[rt] += val;
    return;
  }
  pushdown(rt, l, r);
  int mid = (l + r) >> 1;
  if (x <= mid) modify(rt << 1, l, mid, x, y, val);
  if (y > mid) modify(rt << 1 | 1, mid + 1, r, x, y, val);
  pushup(rt);
}
inline void add(int u, int val) { modify(1, 1, n, id[u], id[u], val); }
inline void remove(int rt, int l, int r, int x, int y) {
  if (x <= l && r <= y) {
    sum[rt] = -(r - l + 1);
    mx[rt] = -1;
    tag[rt] = 1;
    return;
  }
  pushdown(rt, l, r);
  int mid = (l + r) >> 1;
  if (x <= mid) remove(rt << 1, l, mid, x, y);
  if (y > mid) remove(rt << 1 | 1, mid + 1, r, x, y);
  pushup(rt);
}
inline void change(int u) { remove(1, 1, n, id[u], id[u] + sz[u] - 1); }
int tmp, suf;
inline void tquery(int rt, int l, int r, int x, int y) {
  if (x <= l && r <= y) {
    tmp = max(tmp, suf + mx[rt]);
    suf += sum[rt];
    return;
  }
  pushdown(rt, l, r);
  int mid = (l + r) >> 1;
  if (y > mid) tquery(rt << 1 | 1, mid + 1, r, x, y);
  if (x <= mid) tquery(rt << 1, l, mid, x, y);
}
inline void query(int u) {
  suf = 0;
  tmp = -1;
  while (top[u]) {
    tquery(1, 1, n, id[top[u]], id[u]);
    u = p[top[u]];
  }
}
int val[maxn];
inline void del(int u) {
  val[u] = 0;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    del(v);
  }
}
inline int find(int u) {
  int tmp = 0, sum = 0;
  while (u) {
    sum += val[u];
    tmp = max(tmp, sum + dep[u]);
    u = p[u];
  }
  return tmp;
}
signed main() {
  n = read(), q = read();
  for (int i = 2; i <= n; i++) {
    p[i] = read();
    g[p[i]].push_back(i);
  }
  dfs(1);
  {
    dfs2(1, 1);
    build(1, 1, n);
    while (q--) {
      int t = read(), v = read();
      if (t == 1) {
        add(v, 1);
      }
      if (t == 2) {
        change(v);
        query(v);
        int ans = -tmp - 1;
        add(v, ans);
      }
      if (t == 3) {
        query(v);
        if (tmp >= 0)
          puts("black");
        else
          puts("white");
      }
    }
    return 0;
  }
}
