#include <bits/stdc++.h>
using namespace std;
template <class T>
void rd(T &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  x *= f;
}
const int maxn = 1e5 + 5;
const int maxs = maxn << 2;
int n, m;
int dep[maxn], pre[maxn], siz[maxn], son[maxn], top[maxn], tid[maxn], lst[maxn];
namespace tree {
int idx;
struct edge {
  int v, nxt;
};
vector<edge> e;
int head[maxn];
void adde(int u, int v) {
  e.push_back((edge){v, head[u]});
  head[u] = e.size() - 1;
}
void dfs1(int u, int f) {
  dep[u] = dep[f] + 1;
  pre[u] = f;
  siz[u] = 1;
  for (int i = head[u]; ~i; i = e[i].nxt) {
    int v = e[i].v;
    dfs1(v, u);
    siz[u] += siz[v];
    if (!son[u] || siz[v] > siz[son[u]]) son[u] = v;
  }
}
void dfs2(int u, int f) {
  top[u] = f;
  tid[u] = ++idx;
  if (son[u]) dfs2(son[u], f);
  for (int i = head[u]; ~i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == son[u]) continue;
    dfs2(v, v);
  }
  lst[u] = idx;
}
void init() {
  memset(head, -1, sizeof(head));
  for (int i = (2); i <= (n); ++i) {
    int f;
    rd(f);
    adde(f, i);
  }
  dfs1(1, 0);
  dfs2(1, 1);
}
}  // namespace tree
struct node {
  int x, y;
  node(int x = -1, int y = 0) : x(x), y(y) {}
  node operator+(const node &b) const {
    return node(x + b.x, max(y + b.x, b.y));
  }
} tr[maxs];
struct segment_tree {
  int tag[maxs];
  int val[maxs];
  void pushup(int u) { tr[u] = tr[u << 1] + tr[u << 1 | 1]; }
  void clear(int u, int l, int r) {
    tr[u] = node(-(r - l + 1), 0);
    val[u] = 0;
    tag[u] = 1;
  }
  void pushdown(int u, int l, int r) {
    if (tag[u]) {
      int mid = l + r >> 1;
      clear(u << 1, l, mid);
      clear(u << 1 | 1, mid + 1, r);
      tag[u] = 0;
    }
  }
  void build(int u, int l, int r) {
    if (l == r) return (void)(tr[u] = node());
    int mid = l + r >> 1;
    build(u << 1, l, mid), build(u << 1 | 1, mid + 1, r);
    pushup(u);
  }
  void change(int u, int l, int r, int x, int v) {
    if (l == r) {
      val[u] += v;
      tr[u] = node(val[u] - 1, max(val[u], 0));
      return;
    }
    int mid = l + r >> 1;
    pushdown(u, l, r);
    if (x <= mid)
      change(u << 1, l, mid, x, v);
    else
      change(u << 1 | 1, mid + 1, r, x, v);
    pushup(u);
  }
  void clear(int u, int l, int r, int ql, int qr) {
    if (ql <= l && r <= qr) return (void)(clear(u, l, r));
    int mid = l + r >> 1;
    pushdown(u, l, r);
    if (ql <= mid) clear(u << 1, l, mid, ql, qr);
    if (qr > mid) clear(u << 1 | 1, mid + 1, r, ql, qr);
    pushup(u);
  }
  node query(int u, int l, int r, int ql, int qr) {
    if (ql <= l && r <= qr) return tr[u];
    int mid = l + r >> 1;
    pushdown(u, l, r);
    if (ql <= mid && mid < qr)
      return query(u << 1, l, mid, ql, qr) +
             query(u << 1 | 1, mid + 1, r, ql, qr);
    else if (ql <= mid)
      return query(u << 1, l, mid, ql, qr);
    else
      return query(u << 1 | 1, mid + 1, r, ql, qr);
  }
} seg;
int query(int u) {
  node res = node(0, 0);
  while (u) {
    res = seg.query(1, 1, n, tid[top[u]], tid[u]) + res;
    u = pre[top[u]];
  }
  return max(res.x, res.y);
}
void sol() {
  seg.build(1, 1, n);
  while (m--) {
    int op, u;
    rd(op), rd(u);
    if (op == 1)
      seg.change(1, 1, n, tid[u], 1);
    else if (op == 2) {
      seg.clear(1, 1, n, tid[u], lst[u]);
      int res = query(u);
      seg.change(1, 1, n, tid[u], -res);
    } else
      puts(query(u) > 0 ? "black" : "white");
  }
}
int main() {
  rd(n), rd(m);
  tree ::init();
  sol();
  return 0;
}
