#include <stdio.h>
#define ab(n) ((n)<0?-(n):(n))
int wl[2][10], nd, nl[]={1,2,2,1};
void pt(int d, int s=1, int u=1)
{
if(d<=0){if(s)pt(nd,s-1),puts(""); else putchar(u?***:* *); return;}
for(int n=nl[d],t=-n;t<=n;++t){wl[s][d]=ab(t);
if(s==0&&(!u||(wl[1][d]+wl[0][d]>n)))pt(d-1,s,0);else pt(d-1,s,u);}
}
int main(void){pt(nd=3); return 0;}
#define ab(n) ((n)<0?-(n):(n))
int wl[2][10], nd, nl[]={1,2,2,1};
void pt(int d, int s=1, int u=1)
{
if(d<=0){if(s)pt(nd,s-1),puts(""); else putchar(u?***:* *); return;}
for(int n=nl[d],t=-n;t<=n;++t){wl[s][d]=ab(t);
if(s==0&&(!u||(wl[1][d]+wl[0][d]>n)))pt(d-1,s,0);else pt(d-1,s,u);}
}
int main(void){pt(nd=3); return 0;}