#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 1;
  string n;
  cin >> n;
  int length;
  length = n.length();
  char a[length][8];
  for (int i = 0; i < length; i++) {
    if (n[length - k] - '0' < 5) {
      a[i][0] = 'O';
      a[i][1] = '-';
      a[i][2] = '|';
    } else if (n[length - k] - 48 >= 5) {
      a[i][0] = '-';
      a[i][1] = 'O';
      a[i][2] = '|';
    }
    int l = (n[length - k] - 48) % 5;
    for (int j = 0; j < l; j++) {
      a[i][j + 3] = 'O';
    }
    a[i][l + 3] = '-';
    int m = 4 - l;
    for (int p = 0; p < m; p++) {
      a[i][p + 3 + l + 1] = 'O';
    }
    k++;
  }
  for (int i = 0; i < length; i++) {
    for (int j = 0; j < 8; j++) {
      cout << a[i][j];
    }
    cout << endl;
  }
}
