#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

int main(){
	string S,a[10] = {"* = ****","* =* ***","* =** **","* =*** *","* =****"," *= ****"," *=* ****"," *=** **"," *=*** *"," *=****"};
	while(cin>>S){
		for(int i=0;i<8;i++){
			for(int j=0;j<S.size();j++){
				printf("%c",a[S[j]-'0'][i]);
			}puts("");
		}
	}
	return 0;
}