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;
inline int read() {
  int n = 0;
  char c;
  for (c = getchar(); c < '0' || c > '9'; c = getchar())
    ;
  for (; c >= '0' && c <= '9'; c = getchar())
    n = (n << 1) + (n << 3) + (c & 15);
  return n;
}
void pint(int x) {
  if (x >= 10) pint(x / 10);
  putchar(x % 10 + 48);
}
const int N = 2e5 + 5;
int i, j, n, idx, t, id[N], L, R;
int in[2][N], ou[2][N], u[2][N], v[2][N];
vector<int> g[2][N];
vector<int> t1[2][N << 2], t2[2][N << 2];
int num, an[N], cnt, ans[N];
bool bz[2][N];
void dfs(int t, int x, int fa) {
  in[t][x] = ++num;
  for (int i = 0; i < g[t][x].size(); i++) {
    int y = g[t][x][i];
    if (y != fa) dfs(t, y, x);
  }
  ou[t][x] = num;
}
bool cmp1(int x, int y) { return in[t ^ 1][v[t][x]] < in[t ^ 1][v[t][y]]; }
bool cmp2(int x, int y) { return in[t ^ 1][u[t][x]] > in[t ^ 1][u[t][y]]; }
void ins1(int k, int l, int r, int x, int id) {
  t1[t][k].push_back(id);
  if (l == r) return;
  int m = (l + r) >> 1, lk = k << 1, rk = lk + 1;
  if (x <= m)
    ins1(lk, l, m, x, id);
  else
    ins1(rk, m + 1, r, x, id);
}
void ins2(int k, int l, int r, int x, int id) {
  t2[t][k].push_back(id);
  if (l == r) return;
  int m = (l + r) >> 1, lk = k << 1, rk = lk + 1;
  if (x <= m)
    ins2(lk, l, m, x, id);
  else
    ins2(rk, m + 1, r, x, id);
}
void add(int t, int x) {
  if (!bz[t][x]) bz[t][x] = 1, ans[++cnt] = x;
}
void find1(int k, int l, int r) {
  if (L <= l && r <= R) {
    for (; !t1[t ^ 1][k].empty();) {
      int now = t1[t ^ 1][k].back();
      if (in[t][v[t ^ 1][now]] > R)
        add(t ^ 1, now), t1[t ^ 1][k].pop_back();
      else
        break;
    }
    return;
  }
  int m = (l + r) >> 1, lk = k << 1, rk = lk + 1;
  if (L <= m) find1(lk, l, m);
  if (R > m) find1(rk, m + 1, r);
}
void find2(int k, int l, int r) {
  if (L <= l && r <= R) {
    for (; !t2[t ^ 1][k].empty();) {
      int now = t2[t ^ 1][k].back();
      if (in[t][u[t ^ 1][now]] < L)
        add(t ^ 1, now), t2[t ^ 1][k].pop_back();
      else
        break;
    }
    return;
  }
  int m = (l + r) >> 1, lk = k << 1, rk = lk + 1;
  if (L <= m) find2(lk, l, m);
  if (R > m) find2(rk, m + 1, r);
}
int main() {
  n = read();
  for (t = 0; t <= 1; t++)
    for (i = 2; i <= n; i++) {
      j = read(), g[t][i].push_back(j), g[t][j].push_back(i);
      id[i - 1] = i - 1, u[t][i - 1] = i, v[t][i - 1] = j;
    }
  dfs(0, 1, 0);
  num = 0, dfs(1, 1, 0);
  for (t = 0; t <= 1; t++) {
    for (i = 1; i <= n - 1; i++)
      if (in[t ^ 1][u[t][i]] > in[t ^ 1][v[t][i]]) swap(u[t][i], v[t][i]);
    sort(id + 1, id + n, cmp1);
    for (j = 1; j <= n - 1; j++) {
      i = id[j];
      ins1(1, 1, n, in[t ^ 1][u[t][i]], i);
    }
    sort(id + 1, id + n, cmp2);
    for (j = 1; j <= n - 1; j++) {
      i = id[j];
      ins2(1, 1, n, in[t ^ 1][v[t][i]], i);
    }
  }
  idx = read();
  bz[0][idx] = 1, an[num = 1] = idx;
  for (t = 0; num; t ^= 1) {
    cnt = 0;
    if (!t)
      puts("Blue");
    else
      puts("Red");
    for (j = 1; j <= num; j++) {
      i = an[j];
      pint(i), putchar(j < num ? ' ' : '\n');
      int x = u[t][i], y = v[t][i];
      if (in[t][x] < in[t][y]) swap(x, y);
      L = in[t][x], R = ou[t][x];
      find1(1, 1, n), find2(1, 1, n);
    }
    num = cnt, cnt = 0;
    for (i = 1; i <= num; i++) an[i] = ans[i];
    sort(an + 1, an + 1 + num);
  }
}