/*****include*****/
#include <iostream>
#include <string>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
/*****変数置き場*****/
	string table[] = {
		"* = ****",
		"* =* ***",
		"* =** **",
		"* =*** *",
		"* =**** ",
		" *= ****",
		" *=* ***",
		" *=** **",
		" *=*** *",
		" *=**** "
	};
	string answer[5];
	int number;
	int k=0;
	int dummy = 0;
	/*****処理部*****/
	while(1){
		cin >> number;
		if(cin.eof())	break;
		k=4;
		for(int i=1;i<=10000;i*=10){
			answer[k] = table[(number/i)%10];
			//cout << (number/i)%10 << endl;
			k--;
		}
		if(dummy!=0)	cout << endl;
		else			dummy = 1;
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				cout << answer[j][i];
			}
			cout << endl;
		}
	}
	/*****処理終了後*****/
	return 0;
}