#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main(){
	string str;
	string s[8];
	s[0] = "*****     ";
	s[1] = "     *****";
	s[2] = "==========";
	s[3] = " **** ****";
	s[4] = "* **** ***";
	s[5] = "** **** **";
	s[6] = "*** **** *";
	s[7] = "**** **** ";
	bool flag = false;
	while(cin >> str){
		if(flag) cout << endl;
		int len = str.size();
		int num[5]={0};
		int cou=0;
		for(int i=5-len;i<5;i++){
			string tmp = "";
			tmp += str[cou];
			istringstream ss(tmp);
			ss >> num[i];
			cou++;
		}
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				cout << s[i][num[j]];
			}
			cout << endl;
		}
		flag = true;
	}
}