#include <bits/stdc++.h>
using namespace std;
void print(int n) {
  char ch[8] = {'O', 'O', '|', 'O', 'O', 'O', 'O', 'O'};
  if (n >= 5) {
    ch[0] = '-';
    n = (n - 5);
  } else
    ch[1] = '-';
  ch[(3 + n)] = '-';
  for (int i = 0; i < 8; i++) cout << ch[i];
}
int main() {
  int n;
  cin >> n;
  if (n == 0)
    print(0);
  else {
    while (n >= 1) {
      int k = (n % 10);
      print(k);
      n = n / 10;
      cout << "\n";
    }
  }
  return 0;
}
