#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
bool black[maxn];
vector<int> tree[maxn];
bool old_black[maxn];
const int MAX_BLOCK_SIZE = 600;
int t[maxn], v[maxn];
bool in_mini[maxn];
vector<pair<pair<int, int>, int>> minitree[maxn];
int push[maxn];
bool clear[maxn];
void dfs1(int pos, int prev = -1, int white = 0, int dist = 0) {
  if (in_mini[pos]) {
    if (prev != -1) minitree[prev].push_back({{pos, white}, dist});
    for (int a : tree[pos]) dfs1(a, pos, 0, 0);
  } else {
    if (!black[pos]) white++;
    for (int a : tree[pos]) dfs1(a, prev, white, dist + 1);
  }
}
void make1(int pos) {
  if (!black[pos]) {
    black[pos] = true;
    return;
  }
  push[pos]++;
  for (auto a : minitree[pos])
    if (a.first.second + 1 <= push[pos]) make1(a.first.first);
}
void make2(int pos) {
  black[pos] = false;
  push[pos] = 0;
  clear[pos] = true;
  for (auto &a : minitree[pos]) {
    a.first.second = a.second;
    make2(a.first.first);
  }
}
void dfs2(int pos, int p = 0, bool cl = false) {
  if (in_mini[pos]) {
    p = push[pos];
    cl |= clear[pos];
  } else {
    black[pos] = old_black[pos];
    if (cl) black[pos] = false;
    if (!black[pos] && p) black[pos] = true, p--;
  }
  for (int a : tree[pos]) dfs2(a, p, cl);
}
int main() {
  int n, q;
  cin >> n >> q;
  for (int i = 2; i <= n; i++) {
    int tmp;
    cin >> tmp;
    tree[tmp].push_back(i);
  }
  for (int i = 1; i <= q; i++) cin >> t[i] >> v[i];
  int root = 1;
  for (int i = 1; i <= q; i += MAX_BLOCK_SIZE) {
    for (int j = 1; j <= n; j++) {
      in_mini[j] = false;
      minitree[j].clear();
      old_black[j] = black[j];
      push[j] = 0;
      clear[j] = false;
    }
    for (int j = 0; j < MAX_BLOCK_SIZE && i + j <= q; j++)
      in_mini[v[i + j]] = true;
    dfs1(root);
    for (int j = 0; j < MAX_BLOCK_SIZE && i + j <= q; j++) {
      int t = ::t[i + j];
      int v = ::v[i + j];
      if (t == 1)
        make1(v);
      else if (t == 2)
        make2(v);
      else
        cout << (black[v] ? "black" : "white") << endl;
    }
    dfs2(root);
  }
}
