Input to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set will be formatted according to the following description, and there will be no blank lines separating data sets.
A single data set has 5 components:
- Start line - A single line, "START"
- Number of Treasures - A single line with a single integer, t, where 1 <= t <= 8, indicating the number of treasures.
- Number of Hunters - A single line with a single integer, h, where 1 <= h <= 6, indicating the number of treasure hunters.
- Treasure Value List - A series of h lines, one for each hunter in sequence (line 1 for hunter 1, line 2 for hunter 2, etc.). Each line contains a space-separated list of estimated treasure values for that hunter. The first estimate on each line is for treasure 1, the second is for treasure 2, etc., and an estimate for each treasure will appear for every hunter. Each estimate will be a positive integer strictly less than 10000.
- End line - A single line, "END"