You are given a rooted tree with N vertices. The vertices are numbered 0,1,…,N−1. The root is vertex 0, and the parent of vertex i (i=1,2,…,N−1) is Vertex p_i.
Initially, an integer a_i is written in vertex i. Here, (a_0,a_1,…,a_N−1) is a permutation of (0,1,…,N−1).
You can execute the following operation at most 25,000 times. The goal is to make the value written in vertex i equal to i.
Input is given in the following format:
N
p_1 p_2 ... p_N−1
a_0 a_1 ... a_N−1
In the first line, print the number of operations, Q. In the second through (Q+1)-th lines, print the chosen vertices in order.
2≤N≤2000, 0≤p_i≤i−1, (a_0,a_1,…,a_N−1) is a permutation of (0,1,…,N−1).
In Sample 1, after the first operation, the values written in vertex 0,1,…,4 are 4,0,1,2,3.
In Sample 2, after the first operation, the values written in vertex 0,1,…,4 are 3,1,0,2,4. After the second operation, the values written in vertex 0,1,…,4 are 1,0,2,3,4.