Hello#7662

Hello

1 secondo
64 megabyte
Difficile

In the distant future, when cyborgs on Olympia have entirely replaced humans, a central societal issue will emerge: cyborgs who prefer the aesthetic of a mechanical watch will struggle to read the current time from it.

z1.gif

Task

Address this existential challenge now! Develop a program named watcha that can determine the current time based on the appearance of a mechanical watch.

Input

The input consists of one or more black-and-white images of a clock. The file contains one or more blocks, with up to blocks in total. Each block is composed of rows, each containing characters. Each character is either a (representing a white pixel: background) or a (representing a black pixel: clock element). There are no spaces between characters. Blocks are separated by empty lines (one empty line between each pair of adjacent blocks). The input always depicts a clock of a single type, as shown below. Additionally, the clock is always the same size: the first and last rows and columns form a frame of white pixels, while the second and penultimate rows and columns contain at least one black pixel of the clock.

Output

The output should consist of as many lines as there are blocks in the input file. Each line should indicate the time displayed on the clock in the corresponding block, formatted as hours (from to , without leading zeros) followed by a colon and the minutes.

Esempi

Esempio 1

Loading
Loading

Punteggio

The test set includes tests of equal value.