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;
int n, i, j, k, d[200005], tmpd[200005];
struct node {
  int x, i;
  node(int _x = 0, int _i = 0) { x = _x, i = _i; }
};
void read(int &x) {
  x = 0;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
}
struct Graph {
  int tot, dfn[200005], sz[200005], used[200005];
  int em, e[200005 * 2], nx[200005 * 2], ls[200005], E[200005];
  vector<node> t[2][800005];
  int fi[2][800005], ed[2][800005];
  void insert(int x, int y) {
    em++;
    e[em] = y;
    nx[em] = ls[x];
    ls[x] = em;
    em++;
    e[em] = x;
    nx[em] = ls[y];
    ls[y] = em;
  }
  void dfs(int x, int p) {
    dfn[x] = ++tot, sz[x] = 1;
    for (int i = ls[x]; i; i = nx[i])
      if (e[i] != p) dfs(e[i], x), sz[x] += sz[e[i]];
  }
  void init() {
    for (int i = 2; i <= n; i++) read(E[i]), insert(i, E[i]);
    dfs(1, 0);
  }
  void add(int tp, int x, int l, int r, int p, node q) {
    t[tp][x].push_back(q), ed[tp][x]++;
    if (l == r) return;
    int mid = (l + r) >> 1;
    if (p <= mid)
      add(tp, x << 1, l, mid, p, q);
    else
      add(tp, x << 1 ^ 1, mid + 1, r, p, q);
  }
  void find(int tp, int x, int l, int r, int ll, int rr) {
    if (l > rr || r < ll) return;
    if (ll <= l && r <= rr) {
      if (fi[tp][x] < ed[tp][x]) {
        node now = t[tp][x][fi[tp][x]];
        while ((tp) ? now.x > rr : now.x < ll) {
          if (!used[now.i]) tmpd[++tmpd[0]] = now.i, used[now.i] = 1;
          if (++fi[tp][x] == ed[tp][x]) break;
          now = t[tp][x][fi[tp][x]];
        }
      }
      return;
    }
    int mid = (l + r) >> 1;
    find(tp, x << 1, l, mid, ll, rr), find(tp, x << 1 ^ 1, mid + 1, r, ll, rr);
  }
} G[2];
struct com {
  int x, y, i;
} a[200005];
int cmp1(com a, com b) { return a.x < b.x; }
int cmp2(com a, com b) { return a.y > b.y; }
void prepare(int p) {
  int q = p ^ 1;
  for (i = 2; i <= n; i++) {
    a[i - 1].x = G[p].dfn[G[q].E[i]], a[i - 1].y = G[p].dfn[i],
          a[i - 1].i = i - 1;
    if (a[i - 1].x > a[i - 1].y) swap(a[i - 1].x, a[i - 1].y);
  }
  sort(a + 1, a + n, cmp1);
  for (i = 1; i < n; i++) G[p].add(0, 1, 1, n, a[i].y, node(a[i].x, a[i].i));
  sort(a + 1, a + n, cmp2);
  for (i = 1; i < n; i++) G[p].add(1, 1, 1, n, a[i].x, node(a[i].y, a[i].i));
}
void Doit() {
  d[0] = 1, read(d[1]), G[1].used[d[1]] = 1;
  int p = 0, q = 1;
  while (d[0]) {
    if (p)
      printf("Red\n");
    else
      printf("Blue\n");
    sort(d + 1, d + 1 + d[0]);
    for (int i = 1; i <= d[0]; i++) printf("%d ", d[i]);
    printf("\n");
    tmpd[0] = 0;
    while (d[0]) {
      int x = d[d[0]] + 1;
      if (G[p].dfn[x] < G[p].dfn[G[p].E[x]]) x = G[p].E[x];
      G[p].find(0, 1, 1, n, G[p].dfn[x], G[p].dfn[x] + G[p].sz[x] - 1);
      G[p].find(1, 1, 1, n, G[p].dfn[x], G[p].dfn[x] + G[p].sz[x] - 1);
      d[0]--;
    }
    while (tmpd[0]) d[++d[0]] = tmpd[tmpd[0]--];
    p ^= 1, q ^= 1;
  }
}
int main() {
  read(n);
  G[0].init(), G[1].init();
  prepare(0), prepare(1);
  Doit();
}