#include <bits/stdc++.h>
using namespace std;
int f(char c) { return c - 48; }
void soroban(int n, char *ans) {
  if (n < 5) {
    ans[0] = 'O';
    ans[1] = '-';
    ans[2] = '|';
    for (int i = 3; i <= 7; i++) {
      if (i == n + 3) {
        ans[i] = '-';
      } else {
        ans[i] = 'O';
      }
    }
  } else {
    ans[0] = '-';
    ans[1] = 'O';
    ans[2] = '|';
    for (int i = 3; i <= 7; i++) {
      if (i == n - 2) {
        ans[i] = '-';
      } else {
        ans[i] = 'O';
      }
    }
  }
  ans[8] = '\0';
}
int main() {
  char ch[10], ans[10];
  cin >> ch;
  for (int i = strlen(ch) - 1; i >= 0; i--) {
    soroban(f(ch[i]), ans);
    cout << ans << endl;
  }
  return 0;
}
