10201 - Adventures in Moving - Part IV

For the actual description of the input and output files, read the HTML version of the problem. Thanks.