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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void Code_780A_AndryushaAndSocks();
void Code_625A_GuestFromThePast();
void Code_799A_CarrotCakes();
void Code_222A_ShooshunsAndSequence();
void Code_336A_VasilyTheBearAndTriangle();
void Code_157A_GameOutcome();
void Code_485A_Factory();
void Code_16A_Flag();
void Code_382A_KseniaAndPanScales();
void Code_408A_LineToCashier();
void Code_143A_HelpVasilisaTheWise2();
void Code_363A_Soroban();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  Code_363A_Soroban();
  return 0;
}
inline void Code_363A_Soroban() {
  string s;
  cin >> s;
  int size = s.size();
  for (int i = size - 1; i >= 0; --i) {
    int get = s[i] - '0';
    if (get >= 5) {
      cout << "-O|";
      get -= 5;
    } else
      cout << "O-|";
    for (int i = 1; i <= get; ++i) cout << "O";
    cout << "-";
    for (int i = get + 1; i <= 4; ++i) cout << "O";
    cout << endl;
  }
}
inline void Code_143A_HelpVasilisaTheWise2() {
  int r1, r2, c1, c2, d1, d2;
  cin >> r1 >> r2 >> c1 >> c2 >> d1 >> d2;
  for (int a = 1; a <= 9; ++a) {
    int b = r1 - a, c = c1 - a, d = d1 - a;
    if (b <= 0 || c <= 0 || d <= 0 || b > 9 || c > 9 || d > 9) continue;
    if (a == b || a == c || a == d || b == c || b == d || c == d) continue;
    if (b + d != c2 || c + d != r2 || b + c != d2) continue;
    cout << a << " " << b << endl;
    cout << c << " " << d << endl;
    return;
  }
  cout << -1;
}
inline void Code_408A_LineToCashier() {
  int n;
  cin >> n;
  int k[n];
  long long minTime = 999999999, counter, get;
  for (int i = 0; i < n; ++i) cin >> k[i];
  for (int i = 0; i < n; ++i) {
    counter = 15 * k[i];
    while (k[i]--) {
      cin >> get;
      counter += 5 * get;
    }
    minTime = min(minTime, counter);
  }
  cout << minTime;
}
inline void Code_382A_KseniaAndPanScales() {
  string line1, line2;
  cin >> line1 >> line2;
  int left = 0, right = 0, i = 0, residual = line2.size(), limit = line1.size();
  while (i < limit && line1[i] != '|') {
    ++left;
    ++i;
  }
  ++i;
  while (i < limit) {
    ++right;
    ++i;
  }
  int required = abs(left - right);
  if (residual - required < 0 || (residual - required) % 2)
    cout << "Impossible";
  else {
    if (left <= right) {
      cout << line2.substr(0, required + (residual - required) / 2);
      cout << line1;
      cout << line2.substr(required + (residual - required) / 2);
    } else {
      cout << line2.substr(required + (residual - required) / 2);
      cout << line1;
      cout << line2.substr(0, required + (residual - required) / 2);
    }
  }
}
inline void Code_16A_Flag() {
  int row, col;
  cin >> row >> col;
  char flag[row][col];
  for (int i = 0; i < row; ++i)
    for (int j = 0; j < col; ++j) cin >> flag[i][j];
  bool isISO = true;
  for (int j = 0; j < col; ++j) {
    if (flag[0][j] != flag[0][0]) {
      isISO = false;
      break;
    }
  }
  for (int i = 1; i < row && isISO; ++i) {
    if (flag[i - 1][0] == flag[i][0]) {
      isISO = false;
      break;
    }
    for (int j = 0; j < col; ++j) {
      if (flag[i][j] != flag[i][0]) {
        isISO = false;
        break;
      }
    }
  }
  if (isISO)
    cout << "YES";
  else
    cout << "NO";
}
inline void Code_485A_Factory() {
  long long a, m;
  cin >> a >> m;
  if (a % m == 0) {
    cout << "Yes" << endl;
    return;
  }
  int limit = log2(m);
  for (int i = 1; i <= limit; ++i) {
    a *= 2;
    if (a % m == 0) {
      cout << "Yes" << endl;
      return;
    }
  }
  cout << "No" << endl;
}
inline void Code_157A_GameOutcome() {
  int n;
  cin >> n;
  int square[n][n];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) cin >> square[i][j];
  int row[n], col[n];
  for (int i = 0; i < n; ++i) {
    row[i] = 0;
    for (int j = 0; j < n; ++j) row[i] += square[i][j];
  }
  for (int j = 0; j < n; ++j) {
    col[j] = 0;
    for (int i = 0; i < n; ++i) col[j] += square[i][j];
  }
  int winning = 0;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (row[i] < col[j]) ++winning;
  cout << winning;
}
inline void Code_336A_VasilyTheBearAndTriangle() {
  long x, y;
  cin >> x >> y;
  if (x > 0 && y > 0)
    cout << 0 << " " << x + y << " " << x + y << " " << 0;
  else if (x > 0 && y < 0)
    cout << 0 << " " << y - x << " " << x - y << " " << 0;
  else if (x < 0 && y < 0)
    cout << x + y << " " << 0 << " " << 0 << " " << x + y;
  else if (x < 0 && y > 0)
    cout << x - y << " " << 0 << " " << 0 << " " << y - x;
}
inline void Code_222A_ShooshunsAndSequence() {
  int n, k;
  cin >> n >> k;
  int a[n + 1];
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int pivot = a[k], operations = 0;
  for (int i = k; i <= n; ++i) {
    if (a[i] != pivot) {
      cout << "-1";
      return;
    }
  }
  for (int i = k - 1; i >= 1; --i) {
    if (a[i] != pivot) {
      operations = i;
      break;
    }
  }
  cout << operations;
}
inline void Code_799A_CarrotCakes() {
  int n, t, k, d;
  cin >> n >> t >> k >> d;
  int withoutOven = (n % k == 0 ? t * (n / k) : t * (n / k + 1));
  if (d + t >= withoutOven)
    cout << "NO";
  else
    cout << "YES";
}
inline void Code_625A_GuestFromThePast() {
  long long int n, a, b, c, netCost;
  cin >> n >> a >> b >> c;
  netCost = b - c;
  if (netCost >= a || n < b)
    cout << n / a;
  else
    cout << (n - b) / netCost + 1 + (n - netCost * ((n - b) / netCost + 1)) / a;
}
inline void Code_780A_AndryushaAndSocks() {
  int n;
  cin >> n;
  int x[2 * n + 1];
  int count[n + 1];
  for (int i = 0; i <= n; ++i) count[i] = 0;
  for (int i = 1; i <= 2 * n; ++i) cin >> x[i];
  int onTable = 0, maxOnTable = 0;
  for (int i = 1; i <= 2 * n; ++i) {
    if (!count[x[i]]) {
      ++count[x[i]];
      ++onTable;
      maxOnTable = max(maxOnTable, onTable);
    } else
      --onTable;
  }
  cout << maxOnTable;
}