0123456789

No attempts yetTime limit1sMemory limit128 MB

Problem

 _     _  _       _   _  _   _   _
| | |  _| _| |_| |_  |_   | |_| |_|
|_| | |_  _|   |  _| |_|  | |_|  _|

Most digital devices display numbers using a seven-segment display. The seven segments are arranged like this:

 * * *
*     *
*     *
*     *
 * * *
*     *
*     *
*     *
 * * *

In this problem, each segment is drawn as three asterisks on a single line, as shown above.

Any digit from 0 to 9 can be shown by lighting up the appropriate segments. For example, the digit 1 uses only the two segments on the right side:

      *
      *
      *

      *
      *
      *

The digit 4 needs four segments:

*     *
*     *
*     *
 * * *
      *
      *
      *

Write a program that reads a single digit (0-9) and draws that digit on a seven-segment display. You may assume that each segment is made of three asterisks. A segment that is off produces an empty line.

Output rules: no line may contain trailing whitespace, and the last line must end with a newline.