Spy Cam

Time limit1sMemory limit128 MB

Problem

An overhead camera has photographed the papers lying on an official's desk. Many of the papers overlap, but because the official is a bit of a neatness freak, every sheet is aligned with its edges parallel to the edges of the desk.

As a preliminary step, other programs have already used cues such as paper color and edges to label each pixel of the image with the sheet of paper that is visible at that location. The result looks something like this:

...aaaaaaaa.dd
...aaaaaaaa.ee
.ccaaaaaaaa...
.ccaaaabbaa...
.ccaaaabbaa...
.ccaaaabbaa...
.ccaaaaaaaa...
..............

A '.' marks the bare desktop, and each lowercase letter ('a', 'b', 'c', ...) marks a distinct sheet of paper. The labels are assigned in an arbitrary order, but they are dense (no letter is skipped during labeling).

Assume that every sheet is a rectangle, that no meaningful information is lost between pixels, that the camera captured the entire desktop, and that no sheet is completely hidden from view.

For each sheet of paper (in label order), decide whether the visual evidence proves that the entire sheet is visible, or whether it is at least possible that part of the sheet is hidden beneath another sheet.

Input

The input contains several snapshots.

Each snapshot begins with a line containing two integers $R$ and $C$, the number of rows and columns of pixels in the snapshot ($1 \le R, C \le 40$).

The next $R$ lines each contain $C$ characters. Each character is either a lowercase letter or a period ('.'). A letter marks a visible portion of a distinct sheet of paper; a period marks a portion of the desktop.

Every snapshot corresponds to a valid arrangement of rectangular sheets; there are no impossible arrangements.

The final snapshot is followed by a line containing two zeros separated by a space.

Output

For each snapshot, print one line. The line begins with the word "Uncovered:" followed by a single space. Then, on the same line and in order of character code with no separating spaces, list every sheet that is definitely completely visible.