#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  cin >> m;
  int i;
  int n;
  if (m == 0)
    cout << "O-|-OOOO";
  else {
    while (m > 0) {
      n = m % 10;
      if (n < 5) {
        cout << "O"
             << "-"
             << "|";
        for (i = 1; i <= n; i++) cout << "O";
        cout << "-";
        for (i = 1; i <= 4 - n; i++) cout << "O";
      } else {
        cout << "-"
             << "O"
             << "|";
        for (i = 1; i <= n - 5; i++) cout << "O";
        cout << "-";
        for (i = 1; i <= 4 - n + 5; i++) cout << "O";
      }
      cout << "\n";
      m = m / 10;
    }
  }
  return 0;
}
