#include <cstdio>
#include <iostream>
using namespace std;

char number[][16] = {
	"* = ****", "* =* ***", "* =** **", "* =*** *", "* =**** ",
	" *= ****", " *=* ***", " *=** **", " *=*** *", " *=**** ", };

int main() {
	int n;
	bool flag = false;
	while(cin >> n) {
		char board[16][16] = {0};
		/* init */
		for(int i = 0; i < 5; i++) {
			for(int j = 0; j < 8; j++) {
				board[j][4 - i] = number[n % 10][j];
			}
			n /= 10;
		}

		if(flag)
			cout << endl;
		for(int i = 0; i < 8; i++)
			printf("%s\n", board[i]);
		flag = true;
	}

	return 0;
}