#include<bits/stdc++.h>
using namespace std;
char a[10][5][3]{{'x','x','x',
'x','.','x',
'x','.','x',
'x','.','x',
'x','x','x',
},
{'.','.','x',
'.','.','x',
'.','.','x',
'.','.','x',
'.','.','x',},
{'x','x','x',
'.','.','x',
'x','x','x',
'x','.','.',
'x','x','x',
},
{'x','x','x',
'.','.','x',
'x','x','x',
'.','.','x',
'x','x','x',},
{'x','.','x',
'x','.','x',
'x','x','x',
'.','.','x',
'.','.','x',
},
{'x','x','x',
'x','.','.',
'x','x','x',
'.','.','x',
'x','x','x',
},
{'x','x','x',
'x','.','.',
'x','x','x',
'x','.','x',
'x','x','x',
},
{'x','x','x',
'.','.','x',
'.','.','x',
'.','.','x',
'.','.','x',
},
{'x','x','x',
'x','.','x',
'x','x','x',
'x','.','x',
'x','x','x',
},
{'x','x','x',
'x','.','x',
'x','x','x',
'.','.','x',
'x','x','x',
},
};
int main()
{
int n;
string s;
cin>>n>>s;
for(int i=0;i<5;i++){
for(int j=0;j<n;j++){
for(int k=0;k<3;k++){
cout<<a[s[j]-'0'][i][k];
}
if(j!=n-1)
cout<<'.';
}
cout<<endl;
}
return 0;
}