#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int INF = 0x3f3f3f3f;
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
int n, q;
int fa[MAXN], dep[MAXN], siz[MAXN], son[MAXN], top[MAXN];
int dfn[MAXN], clk, cov[MAXN << 2], len[MAXN << 2];
vector<int> e[MAXN];
struct Node {
  int sum, mx;
  Node() {}
  Node(int _s, int _m) : sum(_s), mx(_m) {}
  Node operator+(const Node &b) const {
    return Node(sum + b.sum, max(mx + b.sum, b.mx));
  }
} seg[MAXN << 2];
void DFS1(int u) {
  siz[u] = 1;
  for (auto v : e[u]) {
    fa[v] = u;
    dep[v] = dep[u] + 1;
    DFS1(v);
    if (siz[v] > siz[son[u]]) son[u] = v;
    siz[u] += siz[v];
  }
}
void DFS2(int u, int topf) {
  top[u] = topf;
  dfn[u] = ++clk;
  if (son[u]) DFS2(son[u], topf);
  for (auto v : e[u]) {
    if (v == son[u]) continue;
    DFS2(v, v);
  }
}
inline void puttag(int rt) {
  cov[rt] = 1;
  seg[rt] = Node(-len[rt], -1);
}
inline void pushdown(int rt) {
  if (cov[rt]) {
    puttag((rt << 1));
    puttag((rt << 1) | 1);
    cov[rt] = 0;
  }
}
void Build(int rt, int b, int e) {
  len[rt] = e - b + 1;
  if (b == e) {
    seg[rt] = Node(-1, -1);
    return;
  }
  int mid = (b + e) >> 1;
  Build((rt << 1), b, mid);
  Build((rt << 1) | 1, mid + 1, e);
  seg[rt] = seg[(rt << 1)] + seg[(rt << 1) | 1];
}
void Update(int rt, int b, int e, int p, int v) {
  if (b == e) {
    seg[rt].sum += v;
    seg[rt].mx += v;
    return;
  }
  int mid = (b + e) >> 1;
  pushdown(rt);
  if (p <= mid)
    Update((rt << 1), b, mid, p, v);
  else
    Update((rt << 1) | 1, mid + 1, e, p, v);
  seg[rt] = seg[(rt << 1)] + seg[(rt << 1) | 1];
}
void Cover(int rt, int b, int e, int l, int r) {
  if (l <= b && e <= r) {
    puttag(rt);
    return;
  }
  int mid = (b + e) >> 1;
  pushdown(rt);
  if (l <= mid) Cover((rt << 1), b, mid, l, r);
  if (r > mid) Cover((rt << 1) | 1, mid + 1, e, l, r);
  seg[rt] = seg[(rt << 1)] + seg[(rt << 1) | 1];
}
Node Query(int rt, int b, int e, int l, int r) {
  if (l <= b && e <= r) return seg[rt];
  int mid = (b + e) >> 1;
  pushdown(rt);
  if (r <= mid) return Query((rt << 1), b, mid, l, r);
  if (l > mid) return Query((rt << 1) | 1, mid + 1, e, l, r);
  return Query((rt << 1), b, mid, l, r) +
         Query((rt << 1) | 1, mid + 1, e, l, r);
}
int Qmx(int u) {
  Node ret(0, -INF);
  while (u) {
    ret = Query(1, 1, n, dfn[top[u]], dfn[u]) + ret;
    u = fa[top[u]];
  }
  return ret.mx;
}
void init() {
  read(n);
  read(q);
  for (int i = 2, u; i <= n; ++i) {
    read(u);
    e[u].push_back(i);
  }
  DFS1(1);
  DFS2(1, 1);
  Build(1, 1, n);
}
void solve() {
  int op, u;
  while (q--) {
    read(op);
    read(u);
    if (op == 1) {
      Update(1, 1, n, dfn[u], 1);
    } else if (op == 2) {
      Update(1, 1, n, dfn[u], -Qmx(u) - 1);
      if (siz[u] > 1) {
        Cover(1, 1, n, dfn[u] + 1, dfn[u] + siz[u] - 1);
      }
    } else {
      puts((Qmx(u) >= 0) ? "black" : "white");
    }
  }
}
int main() {
  init();
  solve();
  return 0;
}
