Aidana and Pita

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

문제

Aidana loves pita. Yesterday she brought home nn pitas. Each pita has a tastiness value, which is an integer. Today three friends of Aidana will come to dinner. She will distribute all nn pitas among them; each pita will go to exactly one friend. The happiness of a friend is the sum of tastiness values of all pitas he or she received. Aidana wants to be fair. So help her find a distribution of pitas that minimizes the difference between her friends' maximum and minimum happiness.

입력

The first line contains one integer nn, the number of pitas (3n25)(3 \le n \le 25).

The second line contains nn integers, a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n, which are tastiness values for pitas (1a_i1071 \le a\_i \le 10^7).

출력

Print nn integers: for each pita, print the friend's index to which this pita should go (friends' indices are 1, 2, and 3).

If there are several possible answers which minimize the difference between maximum and minimum happiness, print any one of them.