#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
const int SINF = 0x7fffffff;
const long long LINF = 0x3fffffffffffffff;
const long long SLINF = 0x7fffffffffffffff;
const int MINF = 0x3f3f3f3f;
const int MAXN = 200007;
const int MAX = 262144;
const int MAXS = MAXN * 4;
class stT {
 public:
  stT() {
    memset(maxi, -MINF, sizeof(maxi));
    memset(mini, MINF, sizeof(mini));
  }
  void ins(int p, int x) {
    p += MAX - 1;
    data[p].insert(x);
    maxi[p] = *data[p].rbegin(), mini[p] = *data[p].begin();
    for (p >>= 1; p; p >>= 1)
      maxi[p] = (((maxi[p << 1]) > (maxi[p << 1 | 1])) ? (maxi[p << 1])
                                                       : (maxi[p << 1 | 1])),
      mini[p] = (((mini[p << 1]) < (mini[p << 1 | 1])) ? (mini[p << 1])
                                                       : (mini[p << 1 | 1]));
  }
  void del(int p, int x) {
    p += MAX - 1;
    data[p].erase(x);
    if (data[p].empty()) maxi[p] = -INF, mini[p] = INF;
    for (p >>= 1; p; p >>= 1)
      maxi[p] = (((maxi[p << 1]) > (maxi[p << 1 | 1])) ? (maxi[p << 1])
                                                       : (maxi[p << 1 | 1])),
      mini[p] = (((mini[p << 1]) < (mini[p << 1 | 1])) ? (mini[p << 1])
                                                       : (mini[p << 1 | 1]));
  }
  void querylt(int l, int r, int c, pair<int, int> del[], int &kd, int now = 1,
               int ll = 1, int rr = MAX) {
    if (l > r) return;
    if (mini[now] > c) return;
    if (ll >= l && rr <= r) {
      if (ll == rr) {
        set<int>::iterator it = data[now].begin();
        for (; it != data[now].end() && *it <= c; ++it)
          del[++kd] = make_pair(ll, *it);
      } else {
        int mid = (ll + rr) >> 1;
        querylt(l, r, c, del, kd, now << 1, ll, mid);
        querylt(l, r, c, del, kd, now << 1 | 1, mid + 1, rr);
      }
    } else if (rr < l || ll > r)
      return;
    else {
      int mid = (ll + rr) >> 1;
      querylt(l, r, c, del, kd, now << 1, ll, mid);
      querylt(l, r, c, del, kd, now << 1 | 1, mid + 1, rr);
    }
  }
  void querygt(int l, int r, int c, pair<int, int> del[], int &kd, int now = 1,
               int ll = 1, int rr = MAX) {
    if (l > r) return;
    if (maxi[now] < c) return;
    if (ll >= l && rr <= r) {
      if (ll == rr) {
        set<int>::reverse_iterator it = data[now].rbegin();
        for (; it != data[now].rend() && *it >= c; ++it)
          del[++kd] = make_pair(ll, *it);
      } else {
        int mid = (ll + rr) >> 1;
        querygt(l, r, c, del, kd, now << 1, ll, mid);
        querygt(l, r, c, del, kd, now << 1 | 1, mid + 1, rr);
      }
    } else if (rr < l || ll > r)
      return;
    else {
      int mid = (ll + rr) >> 1;
      querygt(l, r, c, del, kd, now << 1, ll, mid);
      querygt(l, r, c, del, kd, now << 1 | 1, mid + 1, rr);
    }
  }

 private:
  set<int> data[MAXS];
  int maxi[MAXS], mini[MAXS];
} sta, stb;
struct eT {
  void setd(int _u, int _v, int _l) { u = _u, v = _v, last = _l; }
  int u, v, last;
} ea[MAXN], eb[MAXN];
int n;
int ka, kb, la[MAXN], lb[MAXN];
int fa[MAXN], fb[MAXN];
pair<int, int> da[MAXN], db[MAXN];
int kda, kdb;
int kp;
int ila[MAXN], ira[MAXN], ida[MAXN], ilb[MAXN], irb[MAXN], idb[MAXN];
void init();
void input();
void work();
void dfs(int now, eT e[], int la[], int il[], int ir[], int id[]);
void simulate(int fa[], int fb[], stT &sta, stT &stb, int il[], int ir[],
              int id[], int oil[], int oir[], int oid[], pair<int, int> del[],
              int &kd, pair<int, int> nd[], int &kn, int f);
int main() {
  init();
  input();
  work();
}
void init() { ios::sync_with_stdio(false); }
void input() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) scanf("%d", &fa[i]);
  for (int i = 2; i <= n; ++i) scanf("%d", &fb[i]);
  kda = 1;
  scanf("%d", &da[1].first);
  ++da[1].first, da[1].second = fa[da[1].first];
}
void work() {
  memset(la, -1, sizeof(la));
  memset(lb, -1, sizeof(lb));
  for (int i = 2; i <= n; ++i) {
    ea[ka].setd(fa[i], i, la[fa[i]]);
    la[fa[i]] = ka++;
    eb[kb].setd(fb[i], i, lb[fb[i]]);
    lb[fb[i]] = kb++;
  }
  kp = 0;
  dfs(1, ea, la, ila, ira, ida);
  kp = 0;
  dfs(1, eb, lb, ilb, irb, idb);
  for (int i = 2; i <= n; ++i) {
    sta.ins(ila[i], ila[fb[i]]), sta.ins(ila[fb[i]], ila[i]);
    if (i ^ da[1].first)
      stb.ins(ilb[i], ilb[fa[i]]), stb.ins(ilb[fa[i]], ilb[i]);
  }
  simulate(fa, fb, sta, stb, ila, ira, ida, ilb, irb, idb, da, kda, db, kdb, 0);
}
void dfs(int now, eT e[], int la[], int il[], int ir[], int id[]) {
  il[now] = ir[now] = ++kp;
  id[kp] = now;
  int v;
  for (int i = la[now]; ~i; i = e[i].last) {
    v = e[i].v;
    dfs(v, e, la, il, ir, id);
    ir[now] = ir[v];
  }
}
void simulate(int fa[], int fb[], stT &sta, stT &stb, int il[], int ir[],
              int id[], int oil[], int oir[], int oid[], pair<int, int> del[],
              int &kd, pair<int, int> nd[], int &kn, int f) {
  if (!kd) return;
  sort(del + 1, del + 1 + kd);
  printf(f ? "Red\n" : "Blue\n");
  for (int i = 1; i <= kd; ++i) printf("%d ", del[i].first - 1);
  putchar('\n');
  kn = 0;
  int pn;
  for (int i = 1; i <= kd; ++i) {
    int u = del[i].first;
    int nl = il[u], nr = ir[u];
    pn = kn;
    sta.querylt(nl, nr, nl - 1, nd, kn);
    sta.querygt(nl, nr, nr + 1, nd, kn);
    for (int j = pn + 1; j <= kn; ++j) {
      sta.del(nd[j].first, nd[j].second);
      sta.del(nd[j].second, nd[j].first);
    }
  }
  for (int i = 1; i <= kn; ++i) {
    nd[i].first = id[nd[i].first], nd[i].second = id[nd[i].second];
    if (fb[nd[i].second] == nd[i].first) swap(nd[i].first, nd[i].second);
  }
  simulate(fb, fa, stb, sta, oil, oir, oid, il, ir, id, nd, kn, del, kd, f ^ 1);
}
