#include <bits/stdc++.h>
using namespace std;
constexpr int maxn = 120000;
constexpr int bsize = 320;
bool vis[maxn], clr[maxn];
int p[maxn], black[maxn];
vector<int> G[maxn];
struct edge {
  int to, dis, bn;
  edge(int to = 0, int dis = 0, int bn = 0) : to(to), dis(dis), bn(bn) {}
};
vector<edge> g[maxn];
struct query {
  int t, v;
} que[maxn];
void compress(int u, int pa, int dis, int bn) {
  if (vis[u] and pa) g[pa].push_back(edge(u, dis, bn));
  for (const int &v : G[u])
    if (vis[u])
      compress(v, u, 1, 0);
    else
      compress(v, pa, dis + 1, bn + black[u]);
}
void DFS1(int u) {
  black[u] += 1;
  for (const edge &e : g[u])
    if (black[u] + e.bn > e.dis) DFS1(e.to);
}
void DFS2(int u) {
  clr[u] = true;
  black[u] = 0;
  for (edge &e : g[u]) {
    e.bn = 0;
    DFS2(e.to);
  }
}
void repaint(int u, int bn, bool c) {
  if (not vis[u]) black[u] = bn + (black[u] and not c);
  for (const int &v : G[u]) repaint(v, max(0, black[u] - 1), c or clr[u]);
  black[u] = min(black[u], 1);
  g[u].clear();
  vis[u] = clr[u] = false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  cin >> n >> q;
  for (int i = 2; i <= n; i += 1) {
    cin >> p[i];
    G[p[i]].push_back(i);
  }
  for (int i = 0; i < q; i += 1) cin >> que[i].t >> que[i].v;
  for (int i = 0; i < q; i += bsize) {
    vis[1] = true;
    for (int j = i; j < i + bsize and j < q; j += 1) vis[que[j].v] = true;
    compress(1, 0, 0, 0);
    for (int j = i; j < i + bsize and j < q; j += 1)
      if (que[j].t == 1)
        DFS1(que[j].v);
      else if (que[j].t == 2)
        DFS2(que[j].v);
      else
        cout << (black[que[j].v] ? "black\n" : "white\n");
    repaint(1, 0, clr[1]);
  }
  return 0;
}
