main(a,b,c){ c=100; while(c--){ scanf("%d",&a); b=10; while(--b){ if(a%b||a/b>9){ printf("0"); }else{ printf("1"); } } } return 0; }