eolymp
bolt
Try our new interface for solving problems
Problems

Frame-workout 1

Frame-workout 1

Replace the array elements according to the assignment. \InputFile In the input file is written first, the number \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{100}), and then \textbf{N} numbers from \textbf{1} to \textbf{100} - the array elements \textbf{A}\[\textbf{i}\]. Further, recorded two numbers \textbf{q} and \textbf{w} (from \textbf{1} to \textbf{N}, not necessarily distinct). Requires all the elements that are equal to \textbf{A\[q\]}, made ​​equal to \textbf{A\[w\]}. Try first to read the data, then do what you want, and then display the result (instead of doing the conversion on the output stage). Try not to use dopolnitelnymi arrays. \OutputFile The output file output \textbf{N} numbers - the array elements \textbf{A\[i\]} after the conversion.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5
1 4 2 2 5
3 2
Output example #1
1 4 4 4 5