English version is in beta. All contents of the site should be already translated (mostly using machine translation), and everything should work properly. However, if you find any problems, please contact me.
The problem statement has been automatically translated from Russian. If the statement is not clear, or you have any comments about it, please contact me. Anyway, I hope that someday I will fix the translation manually.

Weights: three piles of the same size

A set of weights with a mass of m 1, ..., m N. is given. Divide it into three piles of equal mass containing an equal number of weights.

Input data format

Input data

The first line of input data contains a natural number N, not exceeding 18. Next comes N natural numbers m i, not exceeding 100.

Output data

The program should output the numbers of weights for each of the sets in three lines or the line No solution, if there is no solution.

Examples
Input data
6
10 20 30 40 50 60
Output data
1 6 
2 5 
3 4 

This problem on informatics