SP5158 HEROARR - Heroes Arrangement

Description

Please click [here](http://www.spoj.com/content/john_jones:shanghai2009.pdf) to download a PDF version of the contest problems. The problem is problem H in the PDF.

Input Format

N/A

Output Format

N/A