#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y;
  char a[3] = "OO", b[6] = "OOOOO", p[3], q[6];
  cin >> n;
  if (n == 0) cout << "O-|-OOOO";
  while (n) {
    strcpy(p, a);
    strcpy(q, b);
    x = n % 10;
    y = x / 5;
    p[1 - y] = '-';
    y = x - y * 5;
    q[y] = '-';
    cout << p << "|" << q << endl;
    n = n / 10;
  }
  return 0;
}
