F. 练52.3 插队

    Type: Default 1000ms 64MiB

练52.3 插队

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

There are nn people, each with their own ID, standing in a queue. Now, a person with ID bb wants to insert themselves after the aa-th person (not the person with ID aa). Find the order of the queue after the insertion.

Input Format

The first line contains nn, the second line contains nn numbers representing the original queue order (n200n\le 200).
The third line contains two numbers aa and bb.

Output Format

Output one line containing the order of the queue after the insertion.

Sample

5
1 2 3 4 5
2 7
1 2 7 3 4 5

20230913C班作业(1)

Not Claimed
Status
Done
Problem
6
Open Since
2025-9-13 0:00
Deadline
2025-9-21 23:59
Extension
24 hour(s)