eolymp
bolt
Try our new interface for solving problems
Problems

Merge the sequences

Merge the sequences

Two sorted sequences are given. Merge them. \InputFile First line contains the length of the first sequence $n~(n \le 10^6)$, followed by $n$ sorted integers. Second line contains the length of the second sequence $m~(m \le 10^6)$, followed by $m$ sorted integers. \OutputFile Merge two given sequences and print the result in one line.
Time limit 0.5 seconds
Memory limit 128 MiB
Input example #1
5 2 4 6 7 9
6 1 2 2 4 5 6
Output example #1
1 2 2 2 4 4 5 6 6 7 9
Author Michael Medvedev