Archaeologists study writing in ancient languages to understand early civilizations. About $3000$ years ago, the Egyptians used an ancient script called hieroglyphs, whose characters were modeled on animals, objects, and parts of the body.
In this problem you write a program that recognizes the following six hieroglyphs. Each hieroglyph is a single shape made of connected black pixels, and the six are distinguished by having different numbers of holes (white regions completely enclosed by the shape). In other words, the number of holes alone determines which hieroglyph it is.
| Hieroglyph | Code | Holes |
|---|---|---|
| Ankh | A | 1 |
| Wedjat | J | 3 |
| Djed | D | 5 |
| Scarab | S | 4 |
| Was | W | 2 |
| Akhet | K | 0 |
Determine every hieroglyph that appears in the given image.
The input consists of several test cases. Each test case is a single image containing one or more hieroglyphs. The image is made of $0$s and $1$s, where $1$ is a black pixel and $0$ is a white pixel.
Each line of the image is encoded in hexadecimal. For example, the eight pixels $10011100$ are encoded as 9c. The hexadecimal encoding uses the characters 0–9 and a–f.
The first line of each test case contains two integers $H$ and $W$. $H$ ($0 < H \le 200$) is the number of image lines and $W$ ($0 < W \le 50$) is the number of hexadecimal characters on each line, so the image is $4W$ pixels wide. The next $H$ lines give the image.
Each input image satisfies the following rules.
The line after the last test case contains two $0$s.
For each test case, print one line in the form Case x: codes, where $x$ is the test case number starting from $1$ and codes is the string of hieroglyph codes appearing in the image, sorted in alphabetical order.