#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
vector<int> e[N];
int fa[N];
struct seg {
  int l, r, execr, leaf;
  bool tag;
} tree[N << 2];
int n, m, k, q;
int t, v;
void pushup(int i) {
  tree[i].leaf = tree[i << 1].leaf + tree[i << 1 | 1].leaf;
  tree[i].execr =
      max(tree[i << 1 | 1].execr, tree[i << 1].execr - tree[i << 1 | 1].leaf);
  return;
}
void init(int i, int l, int r) {
  tree[i] = (seg){l, r, -1, 1, false};
  if (l == r) return;
  int mid = l + r >> 1;
  init(i << 1, l, mid);
  init(i << 1 | 1, mid + 1, r);
  pushup(i);
  return;
}
int top[N], son[N], pre[N], las[N], stot[N], dep[N];
int tot;
void dfs1(int u, int f, int deep) {
  stot[u] = 1;
  dep[u] = deep;
  fa[u] = f;
  for (auto p : e[u]) {
    if (p == f) continue;
    dfs1(p, u, deep + 1);
    stot[u] += stot[p];
    if (son[u] == 0 || stot[son[u]] < stot[p]) son[u] = p;
  }
  return;
}
void dfs2(int u, int tp) {
  pre[u] = ++tot;
  top[u] = tp;
  if (son[u]) dfs2(son[u], tp);
  for (auto p : e[u]) {
    if (p == son[u] || p == fa[u]) continue;
    dfs2(p, p);
  }
  las[u] = tot;
  return;
}
void pushdown(int i) {
  if (tree[i].l != tree[i].r) {
    tree[i << 1].tag = tree[i << 1 | 1].tag = 1;
    tree[i << 1].leaf = tree[i << 1].r - tree[i << 1].l + 1,
              tree[i << 1].execr = -1;
    tree[i << 1 | 1].leaf = tree[i << 1 | 1].r - tree[i << 1 | 1].l + 1,
                  tree[i << 1 | 1].execr = -1;
  }
  tree[i].tag = 0;
  return;
}
void update(int i, int l, int r, int val) {
  if (tree[i].l >= l && tree[i].r <= r) {
    if (val == 0x3f3f3f3f)
      tree[i].leaf = tree[i].r - tree[i].l + 1, tree[i].execr = -1,
      tree[i].tag = 1;
    else
      tree[i].leaf -= val, tree[i].execr += val, tree[i].tag = 0;
    return;
  }
  if (tree[i].tag) pushdown(i);
  int mid = tree[i].l + tree[i].r >> 1;
  if (l <= mid) update(i << 1, l, r, val);
  if (r > mid) update(i << 1 | 1, l, r, val);
  pushup(i);
  return;
}
struct ret {
  int execr, leaf;
};
ret operator+(const ret &a, const ret &b) {
  ret c;
  c.leaf = a.leaf + b.leaf;
  c.execr = max(b.execr, a.execr - b.leaf);
  return c;
}
ret query(int i, int l, int r) {
  if (tree[i].l >= l && tree[i].r <= r)
    return (ret){tree[i].execr, tree[i].leaf};
  if (tree[i].tag) pushdown(i);
  int mid = tree[i].l + tree[i].r >> 1;
  ret retur = (ret){-0x3f3f3f3f, 0};
  if (r > mid) retur = query(i << 1 | 1, l, r) + retur;
  if (l <= mid) retur = query(i << 1, l, r) + retur;
  return retur;
}
int que(int x) {
  int tx = top[x];
  ret retur = (ret){-0x3f3f3f3f, 0}, per;
  while (tx != 1) {
    per = query(1, pre[tx], pre[x]);
    retur = per + retur;
    x = fa[tx], tx = top[x];
  }
  per = query(1, pre[tx], pre[x]);
  retur = per + retur;
  return retur.execr;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> q;
  for (int i = 2; i <= n; i++) {
    cin >> v;
    e[v].push_back(i);
    e[i].push_back(v);
  }
  init(1, 1, n);
  dfs1(1, 1, 1);
  dfs2(1, 1);
  for (int i = 1; i <= q; i++) {
    cin >> t >> v;
    if (t == 1)
      update(1, pre[v], pre[v], 1);
    else if (t == 2) {
      update(1, pre[v], las[v], 0x3f3f3f3f);
      t = que(v);
      if (t > -1) update(1, pre[v], pre[v], -(t + 1));
    } else if (t == 3) {
      t = que(v);
      cout << (t > -1 ? "black" : "white") << endl;
    }
  }
  return 0;
}
