#include <bits/stdc++.h>
using namespace std;
const int N = 4000010;
const int inf = 0x3f3f3f3f;
const int mod = 1000000007;
long long n;
vector<int> g[N];
int son[N], mson[N];
int in[N], out[N], top[N], fa[N];
int pos;
void dfs(int t, int f) {
  son[t] = 1;
  for (int u : g[t]) {
    if (u == f) continue;
    dfs(u, t);
    if (son[u] > son[mson[t]]) mson[t] = u;
    son[t] += son[u];
  }
}
void dfs2(int t, int f, int ff) {
  fa[t] = f;
  in[t] = ++pos;
  top[t] = ff;
  if (mson[t]) dfs2(mson[t], t, ff);
  for (int u : g[t]) {
    if (u == f || u == mson[t]) continue;
    dfs2(u, t, u);
  }
  out[t] = pos;
}
long long sum[N], max_sum[N];
int op[N];
void push_up(int t) {
  sum[t] = sum[t << 1] + sum[t << 1 | 1];
  max_sum[t] = max(max_sum[t << 1 | 1], max_sum[t << 1] + sum[t << 1 | 1]);
}
void ff(int t, int l, int r) {
  sum[t] = -1 * (r - l + 1);
  max_sum[t] = -1;
}
void push_down(int t, int l, int r) {
  if (op[t] == 0) return;
  op[t << 1] = -1;
  op[t << 1 | 1] = -1;
  int mid = (l + r) >> 1;
  ff(t << 1, l, mid);
  ff(t << 1 | 1, mid + 1, r);
  op[t] = 0;
}
void build(int t, int l, int r) {
  if (l == r) {
    sum[t] = -1;
    max_sum[t] = -1;
    return;
  }
  if (l > r) return;
  int mid = (l + r) >> 1;
  build(t << 1, l, mid);
  build(t << 1 | 1, mid + 1, r);
  push_up(t);
}
void add(int t, int l, int r, int ql, int qr, int v) {
  if (l > r) {
    assert(1 == 0);
    return;
  }
  push_down(t, l, r);
  if (qr < l || ql > r) {
    return;
  }
  if (ql <= l && qr >= r) {
    sum[t] += (v) * (r - l + 1);
    max_sum[t] += v;
    return;
  }
  int mid = (l + r) >> 1;
  add(t << 1, l, mid, ql, qr, v);
  add(t << 1 | 1, mid + 1, r, ql, qr, v);
  push_up(t);
}
void set_v(int t, int l, int r, int ql, int qr, int v) {
  if (l > r) {
    assert(1 == 0);
    return;
  }
  push_down(t, l, r);
  if (qr < l || ql > r) {
    return;
  }
  if (ql <= l && qr >= r) {
    sum[t] = (v) * (r - l + 1);
    max_sum[t] = v;
    op[t] = v;
    return;
  }
  int mid = (l + r) >> 1;
  set_v(t << 1, l, mid, ql, qr, v);
  set_v(t << 1 | 1, mid + 1, r, ql, qr, v);
  push_up(t);
}
pair<int, int> query(int t, int l, int r, int ql, int qr) {
  push_down(t, l, r);
  if (qr < l || ql > r) {
    return make_pair(-inf, 0);
  }
  if (ql <= l && qr >= r) {
    return make_pair(max_sum[t], sum[t]);
  }
  pair<int, int> l_ret = make_pair(-inf, 0), r_ret = make_pair(-inf, 0);
  int mid = (l + r) >> 1;
  if (ql <= mid) {
    l_ret = query(t << 1, l, mid, ql, qr);
  }
  if (qr > mid) {
    r_ret = query(t << 1 | 1, mid + 1, r, ql, qr);
  }
  push_up(t);
  return make_pair(max(l_ret.first + r_ret.second, r_ret.first),
                   l_ret.second + r_ret.second);
}
int query(int u) {
  int ans = -1;
  int d = 0;
  while (u != 0) {
    pair<int, int> ret = query(1, 1, pos, in[top[u]], in[u]);
    if (ret.first + d >= 0) {
      ans = max(ret.first + d, ans);
    }
    d += ret.second;
    u = fa[top[u]];
  }
  return ans;
}
int main() {
  int q;
  cin >> n >> q;
  for (int i = 2; i < n + 1; ++i) {
    int p;
    scanf("%d", &p);
    g[i].push_back(p);
    g[p].push_back(i);
  }
  pos = 0;
  dfs(1, 1);
  dfs2(1, 0, 1);
  build(1, 1, pos);
  while (q--) {
    int c, u;
    scanf("%d%d", &c, &u);
    if (c == 1) {
      add(1, 1, pos, in[u], in[u], 1);
    } else if (c == 2) {
      int ans = query(u);
      add(1, 1, pos, in[u], in[u], -ans - 1);
      if (in[u] < out[u]) set_v(1, 1, pos, in[u] + 1, out[u], -1);
    } else if (c == 3) {
      int ans = query(u);
      if (ans >= 0)
        printf("black\n");
      else
        printf("white\n");
    }
  }
}
