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

char* abacusFigure[] =
{
	"* = ****",
	"* =* ***",
	"* =** **",
	"* =*** *",
	"* =**** ",
	" *= ****",
	" *=* ***",
	" *=** **",
	" *=*** *",
	" *=**** ",
};

int main()
{
	bool first = true;
	char input[ 6 ];
	while( cin >> input ){
		char figure[ 6 ];
		int len = strlen( input );
		for( int i = 0; i < 5 - len; ++i ){
			figure[ i ] = '0';
		}
		for( int i = 0; i < len; ++i ){
			figure[ 5 - len + i ] = input[ i ];
		}
		figure[ 6 ] = '\0';

		if( first ){
			first = false;
		}else{
			cout << endl;
		}
		for( int i = 0; i < 8; ++i ){
			for( int j = 0; j < 5; ++j ){
				cout << abacusFigure[ figure[ j ] - '0' ][ i ];
			}
			cout << endl;
		}
	}
	return 0;
}