**I. 103.** A square lattice of size *mxn* (with positive integers *m* and *n*) is given and unit square based columns are put onto each square. The front and side views of this bar chart-like solid are represented by the numbers *u*_{1}, *u*_{2}, ..., *u*_{m} and *v*_{1}, *v*_{2}, ..., *v*_{n}, where *u*_{i} and *v*_{j} denote the heights of the rectangles being shadows of the columns.

Write a program whose input consists of the numbers *m*, *n*, further the numbers *u*_{1}, *u*_{2}, ..., *u*_{m} and *v*_{1}, *v*_{2}, ..., *v*_{n} (in the same format as in problem **I. 100.**), then it computes the matrix describing heights of the columns of *the* (or, *a possible*) solid of *minimal volume.* If no such solid exists, your program should mark the inconsistent numbers in the data.

Notice that this is again a converse of problem **I. 98.**, where a matrix describing the heights of individual columns was given and we had to display the front and side views of the solid. Now we have to reconstruct the solid of minimal volume from the front and side views.

A text file (i103.txt) is to be submitted containing the precise description of the algorithm (*5 points*), further, the detailed justification of the fact that your algorithm always correctly decides whether the/a solid exists, and, if it does, the algorithm produces a solid with required property (*8 points*). Your program (i103.pas, ...) should also be submitted (*4 points*).

(17 points)

**I. 104.** Let us fix a natural number *n*. Do there exist *n* positive *integers* such that their sum equals their product?

Write a program (i104.pas, ...) that decides this question, further, if the answer is affirmative, it gives all these *n*-tuples in increasing order. Your program should be submitted.

(10 points)

**S. 8.** Write a program which suggests a step in the game *five-in-a-row* on a 15*x*15 board, in an arbitrary position.

Read the current state of the board from the standard input. The empty squares, the figures of the machine and of the opponent are denoted by the characters `.`, `O` and `X`, respectively. Write your best next step to the standard output. Rows are represented by the letters `A`, ..., `O`, while columns by the numbers `1`, ..., `15`. (For example, `C9` denotes the ninth square in the third row.)

The solutions will be tested on a 2GHz machine. Your program has at most 10 seconds to choose a step. The programs will compete against one another in a tournament; the winner receives at most 10 points - depending on the documentation -, the second one 8 points, and the rest at most 7 points.

See the *example.*

Input | Output |

...............
...............
...............
...............
...............
...............
......O........
......XXX......
.......O.......
...............
...............
...............
...............
...............
...............
............... | `H6` |

(10 points)