#include <bits/stdc++.h>
using namespace std;
const long long N = 1050000;
long long n, q;
struct A {
  long long to, nxt;
} ed[N * 2];
long long head[N], cnt;
void add(long long a, long long b) {
  ed[++cnt].to = b;
  ed[cnt].nxt = head[a];
  head[a] = cnt;
}
struct TRE {
  long long val, tag, sum;
} tr[N * 4];
struct B {
  long long tp, fa, siz, dep, hvs, rec;
} po[N];
long long cntc;
long long lstv[N];
long long dfs1(long long u, long long fa, long long dep) {
  po[u].dep = dep;
  po[u].fa = fa;
  po[u].siz = 1;
  long long hvs = 0, mas = 0, sizz;
  for (long long i = head[u]; i; i = ed[i].nxt) {
    long long x = ed[i].to;
    if (x != fa) {
      sizz = dfs1(x, u, dep + 1);
      if (sizz > mas) mas = sizz, hvs = x;
      po[u].siz += sizz;
    }
  }
  po[u].hvs = hvs;
  return po[u].siz;
}
void dfs2(long long u, long long tp) {
  po[u].rec = ++cntc;
  lstv[cntc] = u;
  po[u].tp = tp;
  if (po[u].hvs) dfs2(po[u].hvs, tp);
  for (long long i = head[u]; i; i = ed[i].nxt) {
    long long x = ed[i].to;
    if (!po[x].tp) dfs2(x, x);
  }
}
void push_down(long long u, long long l, long long r) {
  if (tr[u].tag == -1) {
    tr[u * 2].tag = -1;
    tr[u * 2 + 1].tag = -1;
    tr[u * 2].sum = -1 * ((l + r) / 2 - l + 1);
    tr[u * 2 + 1].sum = -1 * (r - (l + r) / 2);
    tr[u * 2].val = -1;
    tr[u * 2 + 1].val = -1;
  } else {
    tr[u * 2].tag += tr[u].tag;
    tr[u * 2 + 1].tag += tr[u].tag;
    tr[u * 2].sum += tr[u].tag * ((l + r) / 2 - l + 1);
    tr[u * 2 + 1].sum += tr[u].tag * (r - (l + r) / 2);
    tr[u * 2].val = max(tr[u * 2].val, tr[u * 2].sum);
    tr[u * 2 + 1].val = max(tr[u * 2 + 1].val, tr[u * 2 + 1].sum);
  }
  tr[u].tag = 0;
}
void update(long long u) {
  tr[u].sum = tr[u * 2].sum + tr[u * 2 + 1].sum;
  tr[u].val =
      max(max(tr[u * 2 + 1].val, tr[u * 2].val + tr[u * 2 + 1].sum), tr[u].sum);
}
void build(long long u, long long l, long long r) {
  if (l == r) {
    tr[u].sum = -1;
    tr[u].val = -1;
    return;
  }
  build(u * 2, l, (l + r) / 2);
  build(u * 2 + 1, (l + r) / 2 + 1, r);
  update(u);
}
void insert(long long u, long long l, long long r, long long x, long long y,
            long long v) {
  if (l >= x && y >= r) {
    tr[u].tag += v;
    tr[u].sum += v * (r - l + 1);
    tr[u].val += v;
    return;
  }
  push_down(u, l, r);
  if ((l + r) / 2 >= x) insert(u * 2, l, (l + r) / 2, x, y, v);
  if ((l + r) / 2 + 1 <= y) insert(u * 2 + 1, (l + r) / 2 + 1, r, x, y, v);
  update(u);
}
void cover(long long u, long long l, long long r, long long x, long long y) {
  if (l >= x && y >= r) {
    tr[u].tag = -1;
    tr[u].sum = -1 * (r - l + 1);
    tr[u].val = -1;
    return;
  }
  push_down(u, l, r);
  if ((l + r) / 2 >= x) cover(u * 2, l, (l + r) / 2, x, y);
  if ((l + r) / 2 + 1 <= y) cover(u * 2 + 1, (l + r) / 2 + 1, r, x, y);
  update(u);
}
long long query2(long long u, long long l, long long r, long long x,
                 long long y) {
  if (l >= x && y >= r) return tr[u].sum;
  push_down(u, l, r);
  long long ans = 0;
  if ((l + r) / 2 >= x) ans += query2(u * 2, l, (l + r) / 2, x, y);
  if ((l + r) / 2 + 1 <= y) ans += query2(u * 2 + 1, (l + r) / 2 + 1, r, x, y);
  update(u);
  return ans;
}
long long query(long long u, long long l, long long r, long long x,
                long long y) {
  if (l == x && y == r) return tr[u].val = max(tr[u].sum, tr[u].val);
  push_down(u, l, r);
  long long ans = -20021013ll;
  if (x >= (l + r) / 2 + 1 && r >= y) {
    ans = max(ans, query(u * 2 + 1, (l + r) / 2 + 1, r, x, y));
  } else if (x >= l && y <= (l + r) / 2) {
    ans = max(ans, query(u * 2, l, (l + r) / 2, x, y));
  } else {
    ans =
        max(ans,
            max(query(u * 2 + 1, (l + r) / 2 + 1, r, (l + r) / 2 + 1, y),
                query(u * 2, l, (l + r) / 2, x, (l + r) / 2) +
                    query2(u * 2 + 1, (l + r) / 2 + 1, r, (l + r) / 2 + 1, y)));
  }
  update(u);
  return ans;
}
long long check(long long xx) {
  long long uu = xx, ans = -20021013ll, sum = 0ll;
  while (uu != 0) {
    long long u = po[uu].rec, tp = po[uu].tp, x = po[tp].rec;
    ans = max(ans, query(1, 1, n, x, u) + sum);
    sum += query2(1, 1, n, x, u);
    uu = po[tp].fa;
  }
  return ans;
}
long long fa[N];
signed main() {
  cin >> n >> q;
  for (long long i = 2, u; i <= n; ++i) {
    scanf("%lld", &u);
    add(i, u);
    add(u, i);
    fa[i] = u;
  }
  dfs1(1, 0, 1);
  dfs2(1, 1);
  build(1, 1, n);
  for (long long _ = 1, t, v; _ <= q; ++_) {
    scanf("%lld %lld", &t, &v);
    if (t == 1) {
      insert(1, 1, n, po[v].rec, po[v].rec, 1);
    } else if (t == 2) {
      cover(1, 1, n, po[v].rec, po[v].rec + po[v].siz - 1);
      insert(1, 1, n, po[v].rec, po[v].rec, -(check(v) + 1));
    } else if (t == 3) {
      if (check(v) >= 0)
        puts("black");
      else
        puts("white");
    } else
      puts("ERR #01");
  }
}
