Two scoreboards each store scores as a singly linked chain sorted in non-decreasing order. Fuse them into a single chain that is also sorted in non-decreasing order (keeping every value, including duplicates across the two chains).
Input format
Line 1: an integer p, the length of chain A.
Line 2: p space-separated integers of chain A, non-decreasing (empty line when p is 0).
Line 3: an integer q, the length of chain B.
Line 4: q space-separated integers of chain B, non-decreasing (empty line when q is 0).
Output format
Line 1: the total number of values, p + q.
Line 2: all values merged into non-decreasing order, space-separated (empty line if both are empty).
Constraints
- 0 <= p, q <= 100000
- Each chain is given in non-decreasing order.
- -1000000000 <= each value <= 1000000000