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 JAVA):

Solution:
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    static class Tree {
        String name;
        int[] dest;
        int[] first;
        int[] next;
        int[] from;
        boolean[] killed;
        boolean[] fullyKilled;
        int[] kill;
        int nkill;
        int[] component;
        int ncomp;
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        Tree t1 = readTree(in, n);
        Tree t2 = readTree(in, n);
        t1.name = "Blue";
        t2.name = "Red";
        int[] qa = new int[n];
        int[] qb = new int[n];
        t1.nkill = 1;
        t1.kill[0] = in.nextInt() - 1;
        t1.killed[t1.kill[0]] = true;
        Random random = new Random(54713543151L);
        for (int step = 0;; ++step) {
            Tree cur;
            Tree other;
            if ((step & 1) == 0) {
                cur = t1;
                other = t2;
            } else {
                cur = t2;
                other = t1;
            }
            if (cur.nkill == 0) break;
            other.nkill = 0;
            for (int i = 0; i < cur.nkill; ++i) {
                int j = i + random.nextInt(cur.nkill - i);
                int tmp = cur.kill[i];
                cur.kill[i] = cur.kill[j];
                cur.kill[j] = tmp;
            }
            Arrays.sort(cur.kill, 0, cur.nkill);
            out.println(cur.name);
            for (int i = 0; i < cur.nkill; ++i) {
                if (i > 0) out.print(" ");
                out.print(cur.kill[i] + 1);
                int a = cur.dest[cur.kill[i] * 2];
                int b = cur.dest[cur.kill[i] * 2 + 1];
                cur.fullyKilled[cur.kill[i]] = true;
                if (cur.component[a] == cur.component[b]) {
                    int qta = 0;
                    int qha = 1;
                    int tailA = -2;
                    int tailB = -2;
                    int prevA = -1;
                    int prevB = -1;
                    qa[0] = a;
                    cur.from[a] = b;
                    cur.from[b] = a;
                    int qtb = 0;
                    int qhb = 1;
                    qb[0] = b;
                    while (qta < qha && qtb < qhb) {
                        {
                            int v = qa[qta];
                            if (tailA == -2) tailA = cur.first[v];
                            while (tailA >= 0 && cur.fullyKilled[tailA >> 1]) {
                                int nxt = cur.next[tailA];
                                if (prevA < 0) cur.first[v] = nxt; else cur.next[prevA] = nxt;
                                tailA = nxt;
                            }
                            if (tailA < 0) {
                                ++qta;
                                tailA = -2;
                                prevA = -1;
                            } else {
                                if (cur.dest[tailA] != cur.from[v]) {
                                    qa[qha++] = cur.dest[tailA];
                                    cur.from[cur.dest[tailA]] = v;
                                }
                                prevA = tailA;
                                tailA = cur.next[tailA];
                            }
                        }
                        {
                            int v = qb[qtb];
                            if (tailB == -2) tailB = cur.first[v];
                            while (tailB >= 0 && cur.fullyKilled[tailB >> 1]) {
                                int nxt = cur.next[tailB];
                                if (prevB < 0) cur.first[v] = nxt; else cur.next[prevB] = nxt;
                                tailB = nxt;
                            }
                            if (tailB < 0) {
                                ++qtb;
                                tailB = -2;
                                prevB = -1;
                            } else {
                                if (cur.dest[tailB] != cur.from[v]) {
                                    qb[qhb++] = cur.dest[tailB];
                                    cur.from[cur.dest[tailB]] = v;
                                }
                                prevB = tailB;
                                tailB = cur.next[tailB];
                            }
                        }
                    }
                    if (qta == qha) {
                        for (int j = 0; j < qha; ++j) {
                            int v = qa[j];
                            cur.component[v] = cur.ncomp;
                        }
                        for (int j = 0; j < qha; ++j) {
                            int v = qa[j];
                            int prevEdge = -1;
                            int curEdge = other.first[v];
                            while (curEdge >= 0) {
                                if (other.fullyKilled[curEdge >> 1]) {
                                    int nxt = other.next[curEdge];
                                    if (prevEdge < 0) other.first[v] = nxt; else other.next[prevEdge] = nxt;
                                    curEdge = nxt;
                                    continue;
                                }
                                if (cur.component[other.dest[curEdge]] != cur.component[v] && !other.killed[curEdge >> 1]) {
                                    other.killed[curEdge >> 1] = true;
                                    other.kill[other.nkill++] = curEdge >> 1;
                                }
                                prevEdge = curEdge;
                                curEdge = other.next[curEdge];
                            }
                        }
                    } else {
                        for (int j = 0; j < qhb; ++j) {
                            int v = qb[j];
                            cur.component[v] = cur.ncomp;
                        }
                        for (int j = 0; j < qhb; ++j) {
                            int v = qb[j];
                            int prevEdge = -1;
                            int curEdge = other.first[v];
                            while (curEdge >= 0) {
                                if (other.fullyKilled[curEdge >> 1]) {
                                    int nxt = other.next[curEdge];
                                    if (prevEdge < 0) other.first[v] = nxt; else other.next[prevEdge] = nxt;
                                    curEdge = nxt;
                                    continue;
                                }
                                if (cur.component[other.dest[curEdge]] != cur.component[v] && !other.killed[curEdge >> 1]) {
                                    other.killed[curEdge >> 1] = true;
                                    other.kill[other.nkill++] = curEdge >> 1;
                                }
                                prevEdge = curEdge;
                                curEdge = other.next[curEdge];
                            }
                        }
                    }
                    ++cur.ncomp;
                } else {
                    throw new RuntimeException();
                }
            }
            out.println();
        }
    }

    private Tree readTree(InputReader in, int n) {
        Tree t = new Tree();
        t.dest = new int[2 * (n - 1)];
        t.next = new int[2 * (n - 1)];
        t.first = new int[n];
        Arrays.fill(t.first, -1);
        for (int i = 0; i < n - 1; ++i) {
            int a = in.nextInt() - 1;
            t.dest[i * 2] = a;
            t.next[i * 2] = t.first[i + 1];
            t.first[i + 1] = i * 2;
            t.dest[i * 2 + 1] = i + 1;
            t.next[i * 2 + 1] = t.first[a];
            t.first[a] = i * 2 + 1;
        }
        t.killed = new boolean[n - 1];
        t.fullyKilled = new boolean[n - 1];
        t.from = new int[n];
        t.kill = new int[n - 1];
        t.component = new int[n];
        t.ncomp = 1;
        return t;
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }