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>
#pragma comment(linker, "/STACK:512000000")
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline string tostr(const T &x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
const long double EPS = 1e-12;
const int INF = 1000 * 1000 * 1000;
const char CINF = 102;
const long long LINF = INF * 1ll * INF;
const long double DINF = 1e200;
const long double PI = 3.1415926535897932384626433832795l;
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
long long powmod(long long a, long long p, long long m) {
  long long r = 1;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
int n;
struct tree {
  vector<int> gr[210000];
  int par[210000];
  int tin[210000];
  int tout[210000];
  int now;
  void dfs(int v) {
    tin[v] = now++;
    for (int i = 0; i < (((int)(gr[v]).size())); ++i) {
      dfs(gr[v][i]);
    }
    tout[v] = now;
  }
  void read() {
    for (int i = 0; i < (n - 1); ++i) {
      int a;
      scanf("%d", &a);
      --a;
      gr[a].push_back(i + 1);
      par[i + 1] = a;
    }
    now = 0;
    dfs(0);
  }
};
struct segtree {
  int tree[210000 * 4];
  void init(int a, int b, int k) {
    tree[k] = -INF;
    if (b == a + 1) return;
    int c = (a + b) / 2;
    init(a, c, k * 2 + 1);
    init(c, b, k * 2 + 2);
  }
  void setval(int p, int v, int a, int b, int k) {
    if (b == a + 1) {
      tree[k] = v;
      return;
    }
    int c = (a + b) / 2;
    if (p < c)
      setval(p, v, a, c, k * 2 + 1);
    else
      setval(p, v, c, b, k * 2 + 2);
    tree[k] = max(tree[k * 2 + 1], tree[k * 2 + 2]);
  }
  void get(int l, int r, int v, vector<int> &res, int a, int b, int k) {
    if (l >= b || r <= a) return;
    if (tree[k] < v) return;
    if (b == a + 1) {
      res.push_back(a);
      return;
    }
    int c = (a + b) / 2;
    get(l, r, v, res, a, c, k * 2 + 1);
    get(l, r, v, res, c, b, k * 2 + 2);
  }
};
struct pairset {
  segtree mn, mx;
  vector<pair<pair<int, int>, int> > vmx, vmn;
  int smx, smn;
  void add(int a, int b, int id) {
    if (b < a) swap(a, b);
    vmx.push_back(make_pair(make_pair(a, b), id));
    vmn.push_back(make_pair(make_pair(n - b - 1, n - a - 1), id));
  }
  void init() {
    sort((vmx).begin(), (vmx).end());
    sort((vmn).begin(), (vmn).end());
    smx = max(1, ((int)(vmx).size()));
    smn = max(1, ((int)(vmn).size()));
    mx.init(0, smx, 0);
    mn.init(0, smn, 0);
    for (int i = 0; i < (((int)(vmx).size())); ++i) {
      mx.setval(i, vmx[i].first.second, 0, smx, 0);
    }
    for (int i = 0; i < (((int)(vmn).size())); ++i) {
      mn.setval(i, vmn[i].first.second, 0, smn, 0);
    }
  }
  void pop(int a, int b, vector<int> &res) {
    int i1, i2;
    vector<int> v1;
    i1 = lower_bound((vmx).begin(), (vmx).end(),
                     make_pair(make_pair(a, -INF), -INF)) -
         vmx.begin();
    i2 = upper_bound((vmx).begin(), (vmx).end(),
                     make_pair(make_pair(b, -INF), -INF)) -
         vmx.begin();
    mx.get(i1, i2, b, v1, 0, smx, 0);
    vector<int> v2;
    i1 = lower_bound((vmn).begin(), (vmn).end(),
                     make_pair(make_pair(n - b, -INF), -INF)) -
         vmn.begin();
    i2 = upper_bound((vmn).begin(), (vmn).end(),
                     make_pair(make_pair(n - a, -INF), -INF)) -
         vmn.begin();
    mn.get(i1, i2, n - a, v2, 0, smn, 0);
    for (int i = 0; i < (((int)(v1).size())); ++i) {
      mx.setval(v1[i], -INF, 0, smx, 0);
      res.push_back(vmx[v1[i]].second);
    }
    for (int i = 0; i < (((int)(v2).size())); ++i) {
      mn.setval(v2[i], -INF, 0, smn, 0);
      res.push_back(vmn[v2[i]].second);
    }
  }
};
tree ts[2];
pairset ss[2];
int main() {
  cin >> n;
  ts[0].read();
  ts[1].read();
  vector<int> es(1);
  cin >> es[0];
  for (int i = 0; i < (n - 1); ++i) {
    ss[0].add(ts[0].tin[i + 1], ts[0].tin[ts[1].par[i + 1]], i + 1);
    if (i + 1 != es[0])
      ss[1].add(ts[1].tin[i + 1], ts[1].tin[ts[0].par[i + 1]], i + 1);
  }
  ss[0].init();
  ss[1].init();
  set<int> was[2];
  int cur = 0, asdprev = 1;
  while (((int)(es).size())) {
    sort((es).begin(), (es).end());
    vector<int> nes;
    for (int i = 0; i < (((int)(es).size())); ++i) {
      if (was[cur].count(es[i])) continue;
      was[cur].insert(es[i]);
      nes.push_back(es[i]);
    }
    es = nes;
    if (!((int)(es).size())) break;
    printf(cur ? "Red\n" : "Blue\n");
    for (int i = 0; i < (((int)(es).size())); ++i) {
      printf("%d ", es[i]);
    }
    printf("\n");
    nes.clear();
    for (int i = 0; i < (((int)(es).size())); ++i) {
      int v = es[i];
      ss[cur].pop(ts[cur].tin[v], ts[cur].tout[v], nes);
    }
    es = nes;
    swap(cur, asdprev);
  }
  return 0;
}