#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chkmax(T &a, T b) {
  return (a < b) ? a = b, 1 : 0;
}
template <typename T>
bool chkmin(T &a, T b) {
  return (a > b) ? a = b, 1 : 0;
}
inline int read() {
  int x = 0, fh = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') fh = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ '0');
  return x * fh;
}
pair<int, int> operator+(const pair<int, int> &lhs, const pair<int, int> &rhs) {
  pair<int, int> tmp;
  if (lhs.second < rhs.first) {
    tmp = make_pair(lhs.first + rhs.first - lhs.second, rhs.second);
  } else
    tmp = make_pair(lhs.first, rhs.second + lhs.second - rhs.first);
  return tmp;
}
int dfn[100005], sz[100005];
int cnt;
int son[110005];
int top[100005];
int fa[100005];
vector<int> G[100005];
int n, q;
void dfs(int x, int ff) {
  dfn[x] = ++cnt;
  if (son[x]) {
    top[son[x]] = top[x];
    dfs(son[x], x);
  }
  for (int v : G[x]) {
    if (v == ff || v == son[x]) continue;
    top[v] = v;
    dfs(v, x);
  }
}
pair<int, int> tree[400005];
bool clr[400005];
void built(int rt, int l, int r) {
  if (l == r) {
    tree[rt] = make_pair(1, 0);
    return;
  }
  built(rt << 1, l, ((l + r) >> 1));
  built(rt << 1 | 1, ((l + r) >> 1) + 1, r);
  tree[rt] = tree[rt << 1] + tree[rt << 1 | 1];
}
void pushdown(int rt, int l, int r) {
  if (clr[rt]) {
    clr[rt] = 0;
    clr[rt << 1] = clr[rt << 1 | 1] = 1;
    tree[rt << 1 | 1] = make_pair(r - ((l + r) >> 1), 0);
    tree[rt << 1] = make_pair(((l + r) >> 1) - l + 1, 0);
  }
}
void clear(int rt, int l, int r, int L, int R) {
  if (L <= l && r <= R) {
    clr[rt] = 1;
    tree[rt] = make_pair(r - l + 1, 0);
    return;
  }
  pushdown(rt, l, r);
  if (L <= ((l + r) >> 1)) clear(rt << 1, l, ((l + r) >> 1), L, R);
  if (R > ((l + r) >> 1)) clear(rt << 1 | 1, ((l + r) >> 1) + 1, r, L, R);
  tree[rt] = tree[rt << 1] + tree[rt << 1 | 1];
}
void update(int rt, int l, int r, int pos, int val) {
  if (l == r) {
    tree[rt].second += val;
    return;
  }
  pushdown(rt, l, r);
  if (pos <= ((l + r) >> 1))
    update(rt << 1, l, ((l + r) >> 1), pos, val);
  else
    update(rt << 1 | 1, ((l + r) >> 1) + 1, r, pos, val);
  tree[rt] = tree[rt << 1] + tree[rt << 1 | 1];
}
pair<int, int> query(int rt, int l, int r, int L, int R) {
  if (L > r || R < l) return make_pair(0, 0);
  if (L <= l && r <= R) return tree[rt];
  pushdown(rt, l, r);
  return query(rt << 1, l, ((l + r) >> 1), L, R) +
         query(rt << 1 | 1, ((l + r) >> 1) + 1, r, L, R);
}
pair<int, int> getans(int x) {
  return top[x] == 1 ? query(1, 1, n, 1, dfn[x])
                     : getans(fa[top[x]]) + query(1, 1, n, dfn[top[x]], dfn[x]);
}
int main() {
  n = read();
  q = read();
  for (int i = (2), _end_ = (int)(n); i <= _end_; ++i) {
    fa[i] = read();
    G[fa[i]].push_back(i);
  }
  for (int i = (n), _end_ = (int)(1); i >= _end_; --i) {
    ++sz[i];
    sz[fa[i]] += sz[i];
    if (!son[fa[i]] || sz[i] > sz[son[fa[i]]]) son[fa[i]] = i;
  }
  top[1] = 1;
  dfs(1, 0);
  built(1, 1, n);
  while (q--) {
    int opt = read(), x = read();
    if (opt == 1) {
      update(1, 1, n, dfn[x], 1);
    } else {
      int val = getans(x).second;
      if (opt == 3)
        puts(val ? "black" : "white");
      else {
        update(1, 1, n, dfn[x], -val);
        clear(1, 1, n, dfn[x] + 1, dfn[x] + sz[x] - 1);
      }
    }
  }
  return 0;
}
