#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, q, tt, tim;
bool lz[N * 4];
int head[N], to[N], nxt[N], sz[N * 4], dfn[N], ed[N], ch[N], tp[N], fa[N];
inline int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch == '-' ? o = -1 : 0, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return o * x;
}
struct Dat {
  int x, y;
  inline void upd(Dat A, Dat B) { x = A.x + B.x, y = max(B.y, A.y + B.x); }
} tr[N * 4];
inline void dfs1(int x) {
  sz[x] = 1;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = to[i];
    dfs1(y), fa[y] = x, sz[x] += sz[y];
    if (sz[y] > sz[ch[x]]) ch[x] = y;
  }
}
inline void dfs2(int x, int f) {
  dfn[x] = ++tim, tp[x] = f;
  if (ch[x]) dfs2(ch[x], f);
  for (int i = head[x]; i; i = nxt[i])
    if (to[i] != ch[x]) dfs2(to[i], to[i]);
  ed[x] = tim;
}
inline void pushdown(int o) {
  int l = o << 1, r = o << 1 | 1;
  tr[l] = (Dat){-sz[l], -1}, tr[r] = (Dat){-sz[r], -1};
  lz[l] = lz[r] = 1, lz[o] = 0;
}
inline void build(int l, int r, int o) {
  sz[o] = r - l + 1;
  if (l == r) {
    tr[o] = (Dat){-1, -1};
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, o << 1), build(mid + 1, r, o << 1 | 1);
  tr[o].upd(tr[o << 1], tr[o << 1 | 1]);
}
inline void insert(int l, int r, int p, int z, int o) {
  if (l == r) {
    tr[o].x += z, tr[o].y += z;
    return;
  }
  int mid = (l + r) >> 1;
  if (lz[o]) pushdown(o);
  if (p <= mid)
    insert(l, mid, p, z, o << 1);
  else
    insert(mid + 1, r, p, z, o << 1 | 1);
  tr[o].upd(tr[o << 1], tr[o << 1 | 1]);
}
inline void modify(int l, int r, int L, int R, int o) {
  if (L <= l && r <= R) {
    tr[o].x = -sz[o], tr[o].y = -1, lz[o] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  if (lz[o]) pushdown(o);
  if (L <= mid) modify(l, mid, L, R, o << 1);
  if (R > mid) modify(mid + 1, r, L, R, o << 1 | 1);
  tr[o].upd(tr[o << 1], tr[o << 1 | 1]);
}
inline Dat find(int l, int r, int L, int R, int o) {
  if (L <= l && r <= R) return tr[o];
  int mid = (l + r) >> 1;
  Dat ret;
  if (lz[o]) pushdown(o);
  if (R <= mid)
    ret = find(l, mid, L, R, o << 1);
  else if (L > mid)
    ret = find(mid + 1, r, L, R, o << 1 | 1);
  else
    ret.upd(find(l, mid, L, mid, o << 1),
            find(mid + 1, r, mid + 1, R, o << 1 | 1));
  return tr[o].upd(tr[o << 1], tr[o << 1 | 1]), ret;
}
inline int query(int x) {
  Dat A = (Dat){0, 1 << 30}, B;
  while (x) {
    B = A, A = find(1, n, dfn[tp[x]], dfn[x], 1);
    if (B.y != 1 << 30) A.upd(A, B);
    x = fa[tp[x]];
  }
  return A.y;
}
int main() {
  cin >> n >> q;
  for (int i = 2, x; i <= n; i++)
    to[++tt] = i, nxt[tt] = head[x = gi()], head[x] = tt;
  dfs1(1), dfs2(1, 1);
  build(1, n, 1);
  while (q--) {
    int op = gi(), x = gi();
    if (op == 1)
      insert(1, n, dfn[x], 1, 1);
    else if (op == 2) {
      modify(1, n, dfn[x], ed[x], 1);
      int t = query(x);
      if (t >= 0) insert(1, n, dfn[x], -t - 1, 1);
    } else
      puts(query(x) >= 0 ? "black" : "white");
  }
  return 0;
}
