P10946 Pushing Boxes【征集数据】
Description

Input Format
There will be multiple data sets for this problem. The first line of each data set will be two integers giving the height and width of the room. (We'll visualize the room as if on a piece of paper, as drawn above.) Each dimension will be no more than 20. The next line will contain an integer n (0 < n
Output Format
For each data set you are to produce one line of output of the form:
Data set d ends with boxes at locations (r1, c1) (r2, c2) ... (rn, cn).
where the (ri, ci) are the locations of the boxes given from top-to-bottom, left-to-right, (separated by one space) and d is the data set number (starting at 1).