#include <iostream>
using namespace std;
int main(){
	string ball[10] = {"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "},i;
	int f = 0;
	while(cin >> i,!cin.eof()){
		f&&cout<<endl;
		f?:f=1;
		while(i.size() < 5)i = '0' + i;
		for(int k=0;k<8;k++){
			for(int l=0;l<5;l++)cout << ball[i[l]-'0'][k];
			cout << endl;
		}
	}
}