Problem: You know that Japan is the country with almost the largest 'electronic devices per person' ratio. So you might be quite surprised to find out that the primary school in Japan teaches to count using a Soroban — an abacus developed in Japan. This phenomenon has its reasons, of course, but we are not going to speak about them. Let's have a look at the Soroban's construction.

<image>

Soroban consists of some number of rods, each rod contains five beads. We will assume that the rods are horizontal lines. One bead on each rod (the leftmost one) is divided from the others by a bar (the reckoning bar). This single bead is called go-dama and four others are ichi-damas. Each rod is responsible for representing a single digit from 0 to 9. We can obtain the value of a digit by following simple algorithm:

  * Set the value of a digit equal to 0. 
  * If the go-dama is shifted to the right, add 5. 
  * Add the number of ichi-damas shifted to the left. 



Thus, the upper rod on the picture shows digit 0, the middle one shows digit 2 and the lower one shows 7. We will consider the top rod to represent the last decimal digit of a number, so the picture shows number 720.

Write the program that prints the way Soroban shows the given number n.

Input

The first line contains a single integer n (0 ≤ n < 109).

Output

Print the description of the decimal digits of number n from the last one to the first one (as mentioned on the picture in the statement), one per line. Print the beads as large English letters 'O', rod pieces as character '-' and the reckoning bar as '|'. Print as many rods, as many digits are in the decimal representation of number n without leading zeroes. We can assume that number 0 has no leading zeroes.

Examples

Input

2


Output

O-|OO-OO


Input

13


Output

O-|OOO-O
O-|O-OOO


Input

720


Output

O-|-OOOO
O-|OO-OO
-O|OO-OO

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class solution {
    public static void merge(long arr[], int l, int m, int r) {
        int n1 = m - l + 1;
        int n2 = r - m;
        long L[] = new long[n1];
        long R[] = new long[n2];
        for (int i = 0; i < n1; ++i)
            L[i] = arr[l + i];
        for (int j = 0; j < n2; ++j)
            R[j] = arr[m + 1 + j];

        int i = 0, j = 0;

        int k = l;
        while (i < n1 && j < n2) {
            if (L[i] <= R[j]) {
                arr[k] = L[i];
                i++;
            } else {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        while (i < n1) {
            arr[k] = L[i];
            i++;
            k++;
        }


        while (j < n2) {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    public static void sort(long arr[], int l, int r) {
        if (l < r) {
            int m = (l + r) / 2;

            sort(arr, l, m);
            sort(arr, m + 1, r);

            merge(arr, l, m, r);
        }
    }

    public static boolean check(int n) {
        String s = "";
        s += n;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) != '4' && s.charAt(i) != '7') {
                return false;
            }
        }
        return true;
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        } else {
            return gcd(b, a % b);
        }
    }

    public static long findTrailingZeros(long n) {
        // Initialize result
        long count = 0;

        // Keep dividing n by powers
        // of 5 and update count
        for (long i = 5; n / i >= 1; i *= 5)
            count += n / i;

        return count;
    }

    public static int ceilSearch(long arr[], int low, int high, long x) {
        int mid;

        if (x <= arr[low])
            return low;
        if (x > arr[high])
            return -1;


        mid = (low + high) / 2;

        if (arr[mid] == x)
            return mid;


        else if (arr[mid] < x) {
            if (mid + 1 <= high && x <= arr[mid + 1])
                return mid + 1;
            else
                return ceilSearch(arr, mid + 1, high, x);
        } else {
            if (mid - 1 >= low && x > arr[mid - 1])
                return mid;
            else
                return ceilSearch(arr, low, mid - 1, x);
        }
    }

    public static double dis(double x, double x1, double y, double y1) {
        double dis = Math.sqrt(Math.pow((x - x1), 2) + Math.pow((y - y1), 2));
        return dis;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s0 = "O-|-OOOO";
        String s1 = "O-|O-OOO";
        String s2 = "O-|OO-OO";
        String s3 = "O-|OOO-O";
        String s4 = "O-|OOOO-";
        String s5 = "-O|-OOOO";
        String s6 = "-O|O-OOO";
        String s7 = "-O|OO-OO";
        String s8 = "-O|OOO-O";
        String s9 = "-O|OOOO-";
        ArrayList<String> A = new ArrayList<>();
        A.add(s0);
        A.add(s1);
        A.add(s2);
        A.add(s3);
        A.add(s4);
        A.add(s5);
        A.add(s6);
        A.add(s7);
        A.add(s8);
        A.add(s9);
        long n = Long.parseLong(br.readLine());
        ArrayList<String> Ans = new ArrayList<>();
        if (n == 0) {
            System.out.println(s0);
        } else {
            while (n > 0) {
                int r = (int) n % 10;
                Ans.add(A.get(r));
                n /= 10;
            }
            for (int i = 0; i < Ans.size(); i++) {
                System.out.println(Ans.get(i));
            }
        }
    }
}