Those cows who play tennis professionally are ranked by the Bovine Tennis Professionals (BTP) governing body.
Sometimes it is possible to predict perfectly the results of a tennis match. If the rank difference between two cows is larger than a given K (0 ≤ K ≤ N-1) (i.e., | cow1rank - cow2rank | > K) then the cow with the better rank will always win in a match between the two cows.
There is a big single-elimination competition next week, with N cows (N=2, 4, 8, ..., 65536 -- always a power of two) from which one will be chosen the winner. In the first round, N/2 matches are played and the resulting N/2 winners proceed to the next round. On each successive round, the winning half of the cows proceed in the tournament until only one cow remains.
The rest of the cows (who are betting on the competition, of course) want to know the rank of the lowest-ranked cow who has a chance of winning the tournament, along with a scenario that would result in her victory.
Your job is to calculate the lowest-ranked cow that could win the tournament and show a schedule which would enable that cow to win.