#include <bits/stdc++.h>
using namespace std;
int n, q, tot = 1;
struct edge {
  int to, nxt;
} e[400005 << 1];
const int inf = 0x3f3f3f3f;
int head[400005];
void add_edge(int u, int v) {
  e[++tot] = (edge){v, head[u]};
  head[u] = tot;
}
int fa[400005], dep[400005], sz[400005], son[400005], dfn[400005], top[400005],
    lst[400005], cnt;
void dfs1(int u, int f) {
  fa[u] = f;
  dep[u] = dep[f] + 1;
  sz[u] = 1;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == f) continue;
    dfs1(v, u);
    sz[u] += sz[v];
    if (sz[v] > sz[son[u]]) son[u] = v;
  }
}
void dfs2(int u, int tp) {
  top[u] = tp;
  dfn[u] = ++cnt;
  if (son[u]) dfs2(son[u], tp);
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == fa[u] || v == son[u]) continue;
    dfs2(v, v);
  }
  lst[u] = cnt;
}
struct tree {
  int sum, rmax, tag;
} tr[400005 << 2];
tree operator+(tree a, tree b) {
  tree c;
  c.sum = a.sum + b.sum;
  c.rmax = max(a.rmax + b.sum, b.rmax);
  c.tag = 0;
  return c;
}
void build(int rt, int l, int r) {
  if (l == r) {
    tr[rt].sum = tr[rt].rmax = -1;
    tr[rt].tag = 0;
    return;
  }
  int mid = l + r >> 1;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  tr[rt] = tr[rt << 1] + tr[rt << 1 | 1];
}
void pushdown(int rt, int l, int r) {
  if (tr[rt].tag) {
    int mid = l + r >> 1;
    tr[rt << 1].sum = -(mid - l + 1);
    tr[rt << 1].rmax = -1;
    tr[rt << 1].tag = 1;
    tr[rt << 1 | 1].sum = -(r - mid);
    tr[rt << 1 | 1].rmax = -1;
    tr[rt << 1 | 1].tag = 1;
    tr[rt].tag = 0;
  }
}
void change(int rt, int l, int r, int ql, int qr, int x) {
  pushdown(rt, l, r);
  if (ql <= l && r <= qr) {
    if (x == inf) {
      tr[rt].sum = -(r - l + 1);
      tr[rt].rmax = -1;
      tr[rt].tag = 1;
      int mid = l + r >> 1;
      pushdown(rt, l, r);
      pushdown(rt << 1, l, mid);
      pushdown(rt << 1 | 1, mid + 1, r);
    } else {
      tr[rt].sum += x;
      tr[rt].rmax += x;
    }
    return;
  }
  int mid = l + r >> 1;
  pushdown(rt << 1, l, mid);
  pushdown(rt << 1 | 1, mid + 1, r);
  if (qr <= mid)
    change(rt << 1, l, mid, ql, qr, x);
  else if (ql > mid)
    change(rt << 1 | 1, mid + 1, r, ql, qr, x);
  else {
    change(rt << 1, l, mid, ql, qr, x);
    change(rt << 1 | 1, mid + 1, r, ql, qr, x);
  }
  tr[rt] = tr[rt << 1] + tr[rt << 1 | 1];
}
tree findans(int rt, int l, int r, int ql, int qr) {
  if (ql <= l && r <= qr) return tr[rt];
  int mid = l + r >> 1;
  pushdown(rt, l, r);
  pushdown(rt << 1, l, mid);
  pushdown(rt << 1 | 1, mid + 1, r);
  if (qr <= mid) return findans(rt << 1, l, mid, ql, qr);
  if (ql > mid) return findans(rt << 1 | 1, mid + 1, r, ql, qr);
  return findans(rt << 1, l, mid, ql, qr) +
         findans(rt << 1 | 1, mid + 1, r, ql, qr);
}
int solve(int x) {
  tree ans;
  ans.sum = 0;
  ans.rmax = -inf;
  while (top[x] != 1) {
    ans = findans(1, 1, n, dfn[top[x]], dfn[x]) + ans;
    x = fa[top[x]];
  }
  ans = findans(1, 1, n, dfn[1], dfn[x]) + ans;
  return ans.rmax;
}
int main() {
  memset(head, 0, sizeof(head));
  scanf("%d%d", &n, &q);
  build(1, 1, n);
  for (int i = 2, f; i <= n; i++) {
    scanf("%d", &f);
    add_edge(f, i);
    add_edge(i, f);
  }
  dep[0] = 0;
  dfs1(1, 0);
  dfs2(1, 1);
  while (q--) {
    int opt, x;
    scanf("%d%d", &opt, &x);
    if (opt == 1) {
      change(1, 1, n, dfn[x], dfn[x], 1);
    }
    if (opt == 2) {
      change(1, 1, n, dfn[x], lst[x], inf);
      int k = solve(x);
      if (k > -1) change(1, 1, n, dfn[x], dfn[x], -(k + 1));
    }
    if (opt == 3) {
      int k = solve(x);
      if (k > -1)
        printf("black\n");
      else
        printf("white\n");
    }
  }
  return 0;
}
