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;
struct node {
  vector<pair<int, int> > V;
  int s, e;
};
int N;
int pre[2][200100], post[2][200100], ind[2][200100];
int par[2][200100];
vector<int> T[2][200100];
node SEG[2][4 * 200100];
int idx;
bool done[2][200100];
int Q[2][200100];
int head[2], tail[2];
void dfs(int cur, int t) {
  ind[t][idx] = cur;
  pre[t][cur] = idx++;
  for (int i = 0; i < T[t][cur].size(); i++) {
    int ch = T[t][cur][i];
    if (ch == par[t][cur]) continue;
    dfs(ch, t);
  }
  post[t][cur] = idx - 1;
}
void build(int i1, int i2, int cur, int l, int r, int t) {
  if (i1 >= r || i1 < l) return;
  SEG[t][cur].V.push_back(pair<int, int>(i2, i1));
  if (l + 1 == r) return;
  int mid = (l + r) / 2;
  build(i1, i2, 2 * cur, l, mid, t);
  build(i1, i2, 2 * cur + 1, mid, r, t);
}
void rem(pair<int, int> E, int t) {
  int i1 = E.first, i2 = E.second;
  int v1 = ind[t][i1], v2 = ind[t][i2];
  int s;
  if (pre[(t + 1) % 2][v1] < pre[(t + 1) % 2][v2])
    s = v2;
  else
    s = v1;
  if (!done[(t + 1) % 2][s]) {
    Q[(t + 1) % 2][tail[(t + 1) % 2]++] = s;
    done[(t + 1) % 2][s] = true;
  }
}
void query(int left, int right, int t, int cur, int l, int r) {
  if (left >= r || l >= right) return;
  if (left <= l && r <= right) {
    int i;
    for (i = SEG[t][cur].s; i <= SEG[t][cur].e && SEG[t][cur].V[i].first < left;
         i++) {
      rem(SEG[t][cur].V[i], t);
    }
    SEG[t][cur].s = i;
    for (i = SEG[t][cur].e;
         i >= SEG[t][cur].s && SEG[t][cur].V[i].first >= right; i--) {
      rem(SEG[t][cur].V[i], t);
    }
    SEG[t][cur].e = i;
    return;
  }
  int mid = (l + r) / 2;
  query(left, right, t, 2 * cur, l, mid);
  query(left, right, t, 2 * cur + 1, mid, r);
}
void go(int t) {
  for (int i = head[t]; i < tail[t]; i++) {
    int cur = Q[t][i];
    int p1 = pre[t][cur], p2 = post[t][cur];
    query(p1, p2 + 1, t, 1, 0, N);
  }
}
int main() {
  scanf("%d", &N);
  par[0][0] = par[1][0] = -1;
  for (int i = 0; i < 2; i++)
    for (int j = 1; j < N; j++) {
      int a;
      scanf("%d", &a);
      a--;
      par[i][j] = a;
      T[i][j].push_back(a);
      T[i][a].push_back(j);
    }
  idx = 0;
  dfs(0, 0);
  idx = 0;
  dfs(0, 1);
  for (int i = 0; i < N; i++) done[0][i] = done[1][i] = false;
  for (int i = 0; i < 2; i++)
    for (int j = 1; j < N; j++) {
      build(pre[(i + 1) % 2][par[i][j]], pre[(i + 1) % 2][j], 1, 0, N,
            (i + 1) % 2);
      build(pre[(i + 1) % 2][j], pre[(i + 1) % 2][par[i][j]], 1, 0, N,
            (i + 1) % 2);
    }
  for (int i = 1; i < 4 * N; i++) {
    sort(SEG[0][i].V.begin(), SEG[0][i].V.end());
    sort(SEG[1][i].V.begin(), SEG[1][i].V.end());
    SEG[0][i].s = 0;
    SEG[0][i].e = (int)SEG[0][i].V.size() - 1;
    SEG[1][i].s = 0;
    SEG[1][i].e = (int)SEG[1][i].V.size() - 1;
  }
  head[0] = head[1] = tail[0] = tail[1] = 0;
  int C;
  scanf("%d", &C);
  Q[0][tail[0]++] = C;
  done[0][C] = true;
  int m = 0;
  while (head[m] != tail[m]) {
    sort(&Q[m][head[m]], &Q[m][tail[m]]);
    go(m);
    if (m == 0)
      printf("Blue\n");
    else
      printf("Red\n");
    printf("%d", Q[m][head[m]]);
    for (int i = head[m] + 1; i < tail[m]; i++) printf(" %d", Q[m][i]);
    printf("\n");
    head[m] = tail[m] = 0;
    m = (m + 1) % 2;
  }
}