#include <bits/stdc++.h>
using namespace std;
const int N = 100010, inf = 1 << 29;
struct edge {
  int to, ne;
} a[N];
struct dat {
  int x, y;
  dat() {}
  dat(int x, int y) : x(x), y(y) {}
} t[N << 2];
int n, m, cnt = 0;
int h[N], id[N], size[N], top[N], son[N], fa[N];
int la[N << 2];
inline void add(int x, int y) {
  a[++cnt].to = y;
  a[cnt].ne = h[x];
  h[x] = cnt;
  return;
}
inline dat update(dat x, dat y) { return dat(max(x.x + y.y, y.x), x.y + y.y); }
inline void build(int nd, int l, int r) {
  la[nd] = inf;
  if (l == r) {
    t[nd].x = t[nd].y = -1;
    return;
  }
  int mid = (l + r) >> 1;
  build((nd << 1), l, mid);
  build((nd << 1 | 1), mid + 1, r);
  t[nd] = update(t[(nd << 1)], t[(nd << 1 | 1)]);
  return;
}
inline void pd(int nd, int l, int r) {
  if (la[nd] == inf) return;
  int u = la[nd];
  la[nd] = inf;
  if (l == r) return;
  int mid = (l + r) >> 1;
  la[(nd << 1)] = la[(nd << 1 | 1)] = u;
  if (u > 0) {
    t[(nd << 1)] = dat(u * (mid - l + 1), u * (mid - l + 1));
    t[(nd << 1 | 1)] = dat(u * (r - mid), u * (r - mid));
  } else {
    t[(nd << 1)] = dat(u, u * (mid - l + 1));
    t[(nd << 1 | 1)] = dat(u, u * (r - mid));
  }
  return;
}
inline void change(int nd, int l, int r, int x, int y, int z) {
  if (l > y || r < x) return;
  if (l >= x && r <= y) {
    if (z > 0)
      t[nd] = dat(z * (r - l + 1), z * (r - l + 1));
    else
      t[nd] = dat(z, z * (r - l + 1));
    la[nd] = z;
    return;
  }
  pd(nd, l, r);
  int mid = (l + r) >> 1;
  change((nd << 1), l, mid, x, y, z);
  change((nd << 1 | 1), mid + 1, r, x, y, z);
  t[nd] = update(t[(nd << 1)], t[(nd << 1 | 1)]);
  return;
}
inline dat find(int nd, int l, int r, int x, int y) {
  if (l >= x && r <= y) return t[nd];
  pd(nd, l, r);
  int mid = (l + r) >> 1;
  if (y <= mid)
    return find((nd << 1), l, mid, x, y);
  else if (x > mid)
    return find((nd << 1 | 1), mid + 1, r, x, y);
  else
    return update(find((nd << 1), l, mid, x, y),
                  find((nd << 1 | 1), mid + 1, r, x, y));
}
inline void dfs1(int x) {
  size[x] = 1;
  for (int k = h[x]; k; k = a[k].ne) {
    dfs1(a[k].to);
    size[x] += size[a[k].to];
    if (size[a[k].to] > size[son[x]]) son[x] = a[k].to;
  }
  return;
}
inline void dfs2(int x, int y) {
  id[x] = ++cnt;
  top[x] = y;
  if (son[x]) dfs2(son[x], y);
  for (int k = h[x]; k; k = a[k].ne) {
    if (a[k].to == son[x]) continue;
    dfs2(a[k].to, a[k].to);
  }
  return;
}
inline int get_ans(int x) {
  dat ans = dat(-inf, 0);
  while (top[x] ^ 1) {
    ans = update(find(1, 1, n, id[top[x]], id[x]), ans);
    x = fa[top[x]];
  }
  ans = update(find(1, 1, n, id[top[x]], id[x]), ans);
  return ans.x;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int k = 2; k <= n; k++) {
    int x;
    scanf("%d", &fa[k]);
    add(fa[k], k);
  }
  cnt = 0;
  dfs1(1);
  dfs2(1, 1);
  build(1, 1, n);
  while (m--) {
    int op, x;
    scanf("%d%d", &op, &x);
    if (op == 1)
      change(1, 1, n, id[x], id[x], find(1, 1, n, id[x], id[x]).y + 1);
    else if (op == 2) {
      change(1, 1, n, id[x], id[x] + size[x] - 1, -1);
      int ans = get_ans(x);
      change(1, 1, n, id[x], id[x], -ans - 2);
    } else {
      int ans = get_ans(x);
      if (ans >= 0)
        printf("black\n");
      else
        printf("white\n");
    }
  }
  return 0;
}
