Stylish clothing
Gleb loves shopping. One day, he decided to select a cap, a t-shirt, pants, and boots in a way that would make him look as stylish as possible. For Gleb, style increases when the color difference between the elements of his outfit decreases.
There are N_1 caps, N_2 t-shirts, N_3 pants, and N_4 pairs of boots available (1 ≤ N_i ≤ 100000). Each clothing item has a known color, represented as an integer from 1 to 100000.
An outfit is made up of one cap, one t-shirt, one pair of pants, and one pair of boots. The style of an outfit is determined by the maximum color difference between any two items in the outfit.
Help Gleb choose the most stylish outfit, which means finding the outfit with the smallest color difference.
Input
For each type of clothing i (i = 1, 2, 3, 4), you are first given the number N_i of items of that type, followed by a sequence of N_i integers on the next line, representing the colors of the items.
The input is provided in sequence, starting with caps and ending with boots.
All input numbers are positive integers and do not exceed 100000.
Output
Output four integers representing the colors of the cap, t-shirt, pants, and boots that Gleb should choose to achieve the most stylish look. If there are multiple solutions, you may output any one of them.