#include <bits/stdc++.h>
using namespace std;
inline int rd() {
  int x = 0;
  bool f = 0;
  char c = getchar();
  while (c < '0' && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (c >= '0') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  return f ? -x : x;
}
const int SIZE = 100005;
int n, m;
int head[SIZE], ecnt;
struct Edge {
  int v, nxt;
} edge[SIZE];
void Add_Edge(int u, int v) {
  ++ecnt;
  edge[ecnt].v = v;
  edge[ecnt].nxt = head[u];
  head[u] = ecnt;
}
int sz[SIZE], dep[SIZE];
int fa[SIZE], son[SIZE], tp[SIZE];
void dfs(int u) {
  sz[u] = 1;
  for (register int i = head[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    dep[e.v] = dep[u] + 1;
    dfs(e.v);
    sz[u] += sz[e.v];
    if (sz[e.v] > sz[son[u]]) son[u] = e.v;
  }
}
int L[SIZE], R[SIZE], dfs_cnt, Find[SIZE];
void dfs2(int u) {
  L[u] = ++dfs_cnt;
  Find[dfs_cnt] = u;
  if (son[u]) tp[son[u]] = tp[u], dfs2(son[u]);
  for (register int i = head[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == son[u]) continue;
    tp[e.v] = e.v;
    dfs2(e.v);
  }
  R[u] = dfs_cnt;
}
struct Node {
  int L, R;
  int lazy;
  bool flag;
  int Mi, dep;
} tree[SIZE << 2];
void Up(int p) { tree[p].Mi = min(tree[(p << 1)].Mi, tree[(p << 1 | 1)].Mi); }
void Down(int p) {
  if (tree[p].flag) {
    tree[(p << 1)].flag = tree[(p << 1 | 1)].flag = 1;
    tree[(p << 1)].lazy = tree[(p << 1 | 1)].lazy = 0;
    tree[(p << 1)].Mi = tree[(p << 1)].dep;
    tree[(p << 1 | 1)].Mi = tree[(p << 1 | 1)].dep;
    tree[p].flag = 0;
  }
  if (tree[p].lazy) {
    tree[(p << 1)].lazy += tree[p].lazy;
    tree[(p << 1 | 1)].lazy += tree[p].lazy;
    tree[(p << 1)].Mi += tree[p].lazy;
    tree[(p << 1 | 1)].Mi += tree[p].lazy;
    tree[p].lazy = 0;
  }
}
void Build(int L, int R, int p) {
  tree[p].L = L, tree[p].R = R;
  if (L == R) {
    tree[p].dep = -dep[Find[L]];
    tree[p].Mi = tree[p].dep;
    return;
  }
  int mid = (L + R) >> 1;
  Build(L, mid, (p << 1)), Build(mid + 1, R, (p << 1 | 1));
  tree[p].dep = min(tree[(p << 1)].dep, tree[(p << 1 | 1)].dep);
  tree[p].Mi = tree[p].dep;
}
void Clear(int L, int R, int p) {
  if (tree[p].L == L && tree[p].R == R) {
    tree[p].Mi = tree[p].dep;
    tree[p].flag = 1;
    tree[p].lazy = 0;
    return;
  }
  Down(p);
  int mid = (tree[p].L + tree[p].R) >> 1;
  if (R <= mid)
    Clear(L, R, (p << 1));
  else if (L > mid)
    Clear(L, R, (p << 1 | 1));
  else
    Clear(L, mid, (p << 1)), Clear(mid + 1, R, (p << 1 | 1));
  Up(p);
}
int ADDDDDDDDD;
void Add(int L, int R, int p) {
  if (tree[p].L == L && tree[p].R == R) {
    tree[p].lazy += ADDDDDDDDD;
    tree[p].Mi += ADDDDDDDDD;
    return;
  }
  Down(p);
  int mid = (tree[p].L + tree[p].R) >> 1;
  if (R <= mid)
    Add(L, R, (p << 1));
  else if (L > mid)
    Add(L, R, (p << 1 | 1));
  else
    Add(L, mid, (p << 1)), Add(mid + 1, R, (p << 1 | 1));
  Up(p);
}
int Query(int L, int R, int p) {
  if (tree[p].L == L && tree[p].R == R) return tree[p].Mi;
  Down(p);
  int mid = (tree[p].L + tree[p].R) >> 1;
  if (R <= mid)
    return Query(L, R, (p << 1));
  else if (L > mid)
    return Query(L, R, (p << 1 | 1));
  else
    return min(Query(L, mid, (p << 1)), Query(mid + 1, R, (p << 1 | 1)));
}
void _main() {
  n = rd(), m = rd();
  for (register int i = 2, _n = n; i <= _n; ++i) {
    fa[i] = rd();
    Add_Edge(fa[i], i);
  }
  tp[1] = 1, dep[1] = 1;
  dfs(1), dfs2(1);
  Build(1, n, 1);
  while (m--) {
    int ins = rd();
    if (ins == 1) {
      int u = rd();
      ADDDDDDDDD = 1;
      Add(L[u], R[u], 1);
    } else if (ins == 2) {
      int u = rd(), t = u;
      Clear(L[u], R[u], 1);
      if (t != 1) {
        ADDDDDDDDD = Query(L[fa[t]], L[fa[t]], 1) + dep[fa[t]];
        Add(L[t], R[t], 1);
      }
      int Mi = 0;
      u = fa[u];
      while (u) {
        Mi = min(Mi, Query(L[tp[u]], L[u], 1));
        u = fa[tp[u]];
      }
      if (Query(L[t], L[t], 1) - Mi >= 0) {
        ADDDDDDDDD = Mi - Query(L[t], L[t], 1) - 1;
        Add(L[t], R[t], 1);
      }
    } else {
      int u = rd(), t = u;
      int Mi = 0;
      u = fa[u];
      while (u) {
        Mi = min(Mi, Query(L[tp[u]], L[u], 1));
        u = fa[tp[u]];
      }
      if (Query(L[t], L[t], 1) - Mi >= 0)
        puts("black");
      else
        puts("white");
    }
  }
}
int main() {
  _main();
  return 0;
}
