SP7637 RANJAN05 - Road Map

Description

There are _x_ villages in Andhere Nagar. Each village has its index — an integer number from 1 to _x_. The capital has index a. All the roads in Andhere Nagar are two-way. The road system is such that there is exactly one path from the capital to each city, i.e. the road map looks like a tree. In Andhere Nagar's chronicles the road map is kept in the following way: for each village _i_, different from the capital, there is kept number _p_ $ _{i} $ — index of the last village on the way from the capital to _i_. Once the king of Andhere Nagar, Choupat Raja, decided to move the capital from village a to village b. Naturally, after this the old representation of the road map in Andhere Nagar 's chronicles became incorrect. Please, help the king find out a new representation of the road map in the way described above.

Input Format

The first line contains three space-separated integers _x_, a, b (2 x n) — amount of villages in Andhere Nagar, index of the old capital and index of the new one, correspondingly. The following line contains _x_ - 1 space-separated integers — the old representation of the road map. For each city, apart from a, there is given integer _p_ $ _{i} $ — index of the last city on the way from the capital to city _i_. All the cities are described in order of increasing indexes.

Output Format

Output _x_ - 1 numbers — new representation of the road map in the same format.