Guessing Answers

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Yunee did not study for the final exam. So Yunee decided to guess the answers to all problems in the final exam. The final exam consists of NN single choice questions numbered from 11 to NN, each with a choice of 11 to 55.

Yunee gets anxious when the answers to two successive problems are the same. So Yunee always selects an answer different from the answer to the previous problem (except for the first problem). After submitting the answers, Yunee received the grading result, which stated whether each answer was correct.

Given the correct answers to all problems and the MM problems that Yunee guessed correctly, reconstruct a possible sequence of Yunee's answers. It is guaranteed that at least one such sequence exists for each input.

입력

The first line contains two integers NN and MM (1N100,000,1MN)(1 \leq N \leq 100,000, 1\leq M \leq N). NN is the total number of problems. MM is the number of problems that Yunee guessed correctly.

The second line contains NN integers from 11 to 55. The ii-th integer represents the correct answer to the ii-th problem.

The third line contains MM distinct integers from 11 to NN. They represent the MM problems that Yunee guessed correctly.

출력

Output a possible sequence of Yunee's answers. Each number should be separated by a blank.