#include <bits/stdc++.h>
using namespace std;
struct mini {
  int to;
  int white;
  int dis;
};
int v[100005];
int t[100005];
vector<int> edge[100005];
vector<mini> minitree[100005];
int old[100005];
bool vis[100005];
bool cl[100005];
bool isblack[100005];
int pusher[100005];
void builder(int now, int pre, int white, int dis) {
  if (vis[now]) {
    if (pre != 0) {
      mini temp;
      temp.to = now;
      temp.white = white;
      temp.dis = dis;
      minitree[pre].push_back(temp);
    }
    for (int i = 0; i < edge[now].size(); i++) {
      builder(edge[now][i], now, 0, 0);
    }
  } else {
    if (!isblack[now]) {
      white++;
    }
    for (int i = 0; i < edge[now].size(); i++) {
      builder(edge[now][i], pre, white, dis + 1);
    }
  }
}
void op1(int now) {
  if (!isblack[now]) {
    isblack[now] = true;
    return;
  } else {
    pusher[now]++;
    for (int i = 0; i < minitree[now].size(); i++) {
      if (pusher[now] > minitree[now][i].white) {
        minitree[now][i].white = 0;
        op1(minitree[now][i].to);
      }
    }
  }
}
void op2(int now) {
  isblack[now] = false;
  pusher[now] = 0;
  cl[now] = true;
  for (int i = 0; i < minitree[now].size(); i++) {
    minitree[now][i].white = minitree[now][i].dis;
    op2(minitree[now][i].to);
  }
}
void push_down(int now, bool clr, int push) {
  if (vis[now]) {
    clr = cl[now];
    push = pusher[now];
  } else {
    if (clr) {
      isblack[now] = false;
    }
    if (!isblack[now] && push > 0) {
      isblack[now] = true;
      push--;
    }
  }
  for (int i = 0; i < edge[now].size(); i++) {
    push_down(edge[now][i], clr, push);
  }
}
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++) {
    int temp;
    cin >> temp;
    edge[temp].push_back(i);
  }
  for (int i = 1; i <= q; i++) {
    cin >> t[i] >> v[i];
  }
  memset(isblack, 0, sizeof(isblack));
  int block = sqrt(n);
  for (int i = 1; i <= q; i += block) {
    memset(vis, 0, sizeof(vis));
    memset(cl, 0, sizeof(cl));
    memset(pusher, 0, sizeof(pusher));
    for (int j = 0; j < n; j++) {
      minitree[j].clear();
      old[j] = isblack[j];
    }
    for (int j = 0; j < block && i + j <= q; j++) {
      vis[v[i + j]] = true;
    }
    builder(1, 0, 0, 0);
    for (int j = 0; j < block && i + j <= q; j++) {
      switch (t[i + j]) {
        case 1:
          op1(v[i + j]);
          break;
        case 2:
          op2(v[i + j]);
          break;
        case 3:
          if (isblack[v[i + j]]) {
            cout << "black\n";
          } else {
            cout << "white\n";
          }
      }
    }
    push_down(1, 0, 0);
  }
  return 0;
}
