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

char n[10][12]={
	"* = ****","* =* ***","* =** **","* =*** *","* =**** ",
	" *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "
};

int main(void){
	int i,j,set,x;
	char s[8];

	for(set=0;cin>>x;set++){
		if(set) cout<<endl;
		sprintf(s,"%05d",x);

		for(i=0;i<8;i++){
			for(j=0;j<5;j++){
				cout<<n[s[j]-'0'][i];
			}
			cout<<endl;
		}
	}

	return 0;
}