#include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
int n, q;
vector<int> bi[N];
int siz[N], mxc[N], fa[N], fp[N];
int inl[N], inr[N], lst[N];
int lb[N], rb[N], lc[N], rc[N];
struct data {
  int w, s, x;
} dt[N];
struct tag {
  int c;
} tg[N];
int cle[N];
void add_edge(int a, int b) {
  bi[a].push_back(b);
  bi[b].push_back(a);
}
void dfs1(int t, int f) {
  siz[t] = 1;
  fa[t] = f;
  for (int i = 0; i < bi[t].size(); ++i)
    if (bi[t][i] != f) {
      dfs1(bi[t][i], t);
      siz[t] += siz[bi[t][i]];
      if (siz[bi[t][i]] > siz[mxc[t]]) mxc[t] = bi[t][i];
    }
}
void dfs2(int t, int p) {
  static int tot = 0;
  lst[++tot] = t;
  inl[t] = tot;
  fp[t] = p;
  if (mxc[t]) dfs2(mxc[t], p);
  for (int i = 0; i < bi[t].size(); ++i)
    if (bi[t][i] != fa[t] && bi[t][i] != mxc[t]) dfs2(bi[t][i], bi[t][i]);
  inr[t] = tot;
}
data operator+(data l, data r) {
  return (data){l.w + r.w, l.s + r.s, max(l.x + r.s, r.x)};
}
tag operator+(tag p, tag q) { return (tag){p.c | q.c}; }
data operator+(data p, tag q) {
  if (q.c)
    return (data){p.w, p.w, 0};
  else
    return p;
}
void upd(int t) { dt[t] = dt[lc[t]] + dt[rc[t]]; }
void psdw(int t) {
  tg[lc[t]] = tg[lc[t]] + tg[t];
  dt[lc[t]] = dt[lc[t]] + tg[t];
  tg[rc[t]] = tg[rc[t]] + tg[t];
  dt[rc[t]] = dt[rc[t]] + tg[t];
  tg[t] = (tag){0};
}
int build(int l, int r) {
  static int tot = 0;
  int t = ++tot;
  lb[t] = l;
  rb[t] = r;
  tg[t] = (tag){0};
  if (l < r) {
    lc[t] = build(l, (l + r) / 2);
    rc[t] = build((l + r) / 2 + 1, r);
    upd(t);
  } else {
    if (lst[l] > n)
      dt[t] = (data){-1, -1, 0};
    else
      dt[t] = (data){0, 0, 0};
  }
  return t;
}
void add(int t, int p, int v) {
  if (lb[t] == rb[t])
    dt[t] = (data){dt[t].w, dt[t].s + v, max(dt[t].s + v, 0)};
  else {
    psdw(t);
    if (p <= rb[lc[t]])
      add(lc[t], p, v);
    else
      add(rc[t], p, v);
    upd(t);
  }
}
void clear(int t, int l, int r) {
  if (l <= lb[t] && rb[t] <= r) {
    dt[t] = dt[t] + (tag){1};
    tg[t] = tg[t] + (tag){1};
    return;
  }
  psdw(t);
  if (l <= rb[lc[t]]) clear(lc[t], l, r);
  if (r >= lb[rc[t]]) clear(rc[t], l, r);
  upd(t);
}
data query(int t, int l, int r) {
  if (l <= lb[t] && rb[t] <= r) return dt[t];
  psdw(t);
  if (r <= rb[lc[t]]) return query(lc[t], l, r);
  if (l >= lb[rc[t]]) return query(rc[t], l, r);
  return query(lc[t], l, r) + query(rc[t], l, r);
}
int query(int t) {
  data p = (data){0, 0, 0};
  for (; t; t = fa[fp[t]]) p = query(1, inl[fp[t]], inl[t]) + p;
  return p.x;
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i < n; ++i) {
    int a, b;
    scanf("%d", &a);
    b = i + 1;
    add_edge(a, n + i);
    add_edge(b, n + i);
  }
  dfs1(1, 0);
  dfs2(1, 1);
  build(1, n * 2 - 1);
  while (q--) {
    int opt, x;
    scanf("%d%d", &opt, &x);
    if (opt == 1)
      add(1, inl[x], 1);
    else if (opt == 2) {
      if (x != 1) {
        int v = query(fa[x]);
        add(1, inl[fa[x]], -v);
      }
      clear(1, inl[x], inr[x]);
    } else if (opt == 3)
      if (query(x))
        puts("black");
      else
        puts("white");
  }
}
