Digital Display

No attempts yetTime limit1sMemory limit128 MB

Problem

Some officials are suspected of back-dating important documents to record a false time for events and profit from it. To make such fraud harder, every office is fitted with a large digital clock on the wall, so that anyone can read the current time at a glance and check that it matches the time written on a document.

Your task is to write the firmware for this clock. Each digit is drawn with the classic seven-segment display.

Input

Each input line contains exactly five characters: two digits, a colon (:), and two more digits. Together they describe a time from 00:00 to 23:59 inclusive.

After the last time, a line containing the word end marks the end of the input.

Output

For each input time, print the clock face: seven rows of exactly 29 characters each. The only characters that may appear are:

  • - (dash) for horizontal segments,
  • | (pipe) for vertical segments,
  • + (plus) for the corners where segments meet,
  • o (lowercase letter o) for the two dots of the colon between the hours and the minutes,
  • (space) for every other position.

Each digit occupies an area exactly 5 characters wide. There are exactly two blank columns between two neighbouring digit areas, and also between a digit area and the colon. The colon column is 1 character wide, with its dots o on the 3rd and 5th rows. The exact shape of every digit can be seen in the examples.

After the seven rows of each time, always print two empty lines. Finally, once every time has been printed, print the word end.