Problem: You have two rooted undirected trees, each contains n vertices. Let's number the vertices of each tree with integers from 1 to n. The root of each tree is at vertex 1. The edges of the first tree are painted blue, the edges of the second one are painted red. For simplicity, let's say that the first tree is blue and the second tree is red.

Edge {x, y} is called bad for edge {p, q} if two conditions are fulfilled: 

  1. The color of edge {x, y} is different from the color of edge {p, q}. 
  2. Let's consider the tree of the same color that edge {p, q} is. Exactly one of vertices x, y lies both in the subtree of vertex p and in the subtree of vertex q. 



In this problem, your task is to simulate the process described below. The process consists of several stages:

  1. On each stage edges of exactly one color are deleted. 
  2. On the first stage, exactly one blue edge is deleted. 
  3. Let's assume that at the stage i we've deleted edges {u1, v1}, {u2, v2}, ..., {uk, vk}. At the stage i + 1 we will delete all undeleted bad edges for edge {u1, v1}, then we will delete all undeleted bad edges for edge {u2, v2} and so on until we reach edge {uk, vk}. 



For each stage of deleting edges determine what edges will be removed on the stage. Note that the definition of a bad edge always considers the initial tree before it had any edges removed.

Input

The first line contains integer n (2 ≤ n ≤ 2·105) — the number of vertices in each tree.

The next line contains n - 1 positive integers a2, a3, ..., an (1 ≤ ai ≤ n; ai ≠ i) — the description of edges of the first tree. Number ai means that the first tree has an edge connecting vertex ai and vertex i.

The next line contains n - 1 positive integers b2, b3, ..., bn (1 ≤ bi ≤ n; bi ≠ i) — the description of the edges of the second tree. Number bi means that the second tree has an edge connecting vertex bi and vertex i. 

The next line contains integer idx (1 ≤ idx < n) — the index of the blue edge that was removed on the first stage. Assume that the edges of each tree are numbered with numbers from 1 to n - 1 in the order in which they are given in the input. 

Output

For each stage of removing edges print its description. Each description must consist of exactly two lines. If this is the stage when blue edges are deleted, then the first line of the description must contain word Blue, otherwise — word Red. In the second line print the indexes of the edges that will be deleted on this stage in the increasing order.

Examples

Input

5
1 1 1 1
4 2 1 1
3


Output

Blue
3
Red
1 3
Blue
1 2
Red
2

Note

For simplicity let's assume that all edges of the root tree received some direction, so that all vertices are reachable from vertex 1. Then a subtree of vertex v is a set of vertices reachable from vertex v in the resulting directed graph (vertex v is also included in the set).

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10, MN = 4e5 + 10, MS = MN << 2;
vector<int> adj[2][MN];
int L[2][MS], R[2][MS];
pair<int, int> seg[2][20][MN], edge[2][MN];
int n;
int st[2][MN], ft[2][MN], Time;
bool mk[2][MN];
struct trip {
  int X, Y, id;
  trip(int X_ = 0, int Y_ = 0, int id_ = 0) { X = X_, Y = Y_, id = id_; }
} P[2][MN];
bool cmp(const trip &a, const trip &b) {
  if (a.X ^ b.X) return a.X < b.X;
  if (a.Y ^ b.Y) return a.Y < b.Y;
  return a.id < b.id;
}
void build(int D, int id, int layer, int b, int e) {
  L[D][id] = b, R[D][id] = e;
  if (e - b == 1) {
    seg[D][layer][b] = {P[D][b].Y, P[D][b].id};
    return;
  }
  int mid = b + e >> 1;
  build(D, id << 1, layer + 1, b, mid),
      build(D, id << 1 | 1, layer + 1, mid, e);
  merge(seg[D][layer + 1] + b, seg[D][layer + 1] + mid, seg[D][layer + 1] + mid,
        seg[D][layer + 1] + e, seg[D][layer] + b);
}
void dfs(int id, int s) {
  st[id][s] = Time++;
  for (auto v : adj[id][s]) dfs(id, v);
  ft[id][s] = Time;
}
void init() {
  cin >> n;
  for (int id = 0; id < 2; ++id) {
    for (int i = 0; i < n - 1; ++i) {
      int t;
      cin >> t;
      adj[id][t - 1].push_back(i + 1);
      edge[id][i] = {t - 1, i + 1};
    }
  }
  dfs(0, 0), Time = 0, dfs(1, 0);
  for (int id = 0; id < 2; ++id) {
    for (int i = 0; i < n - 1; ++i) {
      int x = edge[id][i].first, y = edge[id][i].second;
      P[id][2 * i] = trip(st[1 - id][x], st[1 - id][y], i);
      P[id][2 * i + 1] = trip(st[1 - id][y], st[1 - id][x], i);
    }
    sort(P[id], P[id] + n + n - 2, cmp);
    build(id, 1, 0, 0, n + n - 2);
  }
}
void upd(int D, int id, int layer, int b, int e, int l, int r, int vl, int vr,
         vector<int> &T) {
  if (r <= b || e <= l) return;
  if (l <= b && e <= r) {
    while (L[D][id] < R[D][id] && seg[D][layer][L[D][id]].first < vl) {
      int ind = seg[D][layer][L[D][id]].second;
      if (!mk[D][ind]) T.push_back(ind);
      mk[D][ind] = true;
      ++L[D][id];
    }
    while (R[D][id] > L[D][id] && seg[D][layer][R[D][id] - 1].first >= vr) {
      int ind = seg[D][layer][R[D][id] - 1].second;
      if (!mk[D][ind]) T.push_back(ind);
      mk[D][ind] = true;
      --R[D][id];
    }
    return;
  }
  int mid = b + e >> 1;
  upd(D, id << 1, layer + 1, b, mid, l, r, vl, vr, T);
  upd(D, id << 1 | 1, layer + 1, mid, e, l, r, vl, vr, T);
}
void solve() {
  bool turn = false;
  vector<int> Cur;
  Cur.resize(1), cin >> Cur[0], --Cur[0];
  mk[0][Cur[0]] = true;
  while (1) {
    if (Cur.empty()) break;
    int x = 0;
    if (!turn)
      cout << "Blue\n", x = 1;
    else
      cout << "Red\n";
    vector<int> Tmp;
    for (auto y : Cur) {
      cout << y + 1 << ' ';
      pair<int, int> e = edge[1 - x][y];
      int l = max(st[1 - x][e.first], st[1 - x][e.second]),
          r = min(ft[1 - x][e.first], ft[1 - x][e.second]);
      int vl = l, vr = r;
      l = lower_bound(P[x], P[x] + n + n - 2, trip(vl, -INF, -INF), cmp) - P[x];
      r = lower_bound(P[x], P[x] + n + n - 2, trip(vr - 1, INF, INF), cmp) -
          P[x];
      upd(x, 1, 0, 0, n + n - 2, l, r, vl, vr, Tmp);
    }
    sort(Tmp.begin(), Tmp.end());
    Cur = Tmp;
    turn = !turn;
    cout << '\n';
  }
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  init();
  solve();
  return 0;
}