spoj#DIGNUM. Digital LED Number

Digital LED Number

Given a digital LED pattern of a number. You have to find the number and print it. All inputs will be valid as shown.

Input

Input consists of LED patterns. Each pattern is given in set of fixed number of lines. You have to read input till EOF.

Output

Print the number corresponding to each pattern.

Example

Input:
_ _  _  _  _ _
 _| _| _|| ||_||_
|_  _||_ |_|  | _|
_     _    _
  ||_ |_||_  || |
  ||_|  ||_| ||_|
_  _  _  _    _
  ||_||_||_  ||_|
  |  | | _| ||_|


Output:


232095
164610
799518