#include<stdio.h>
#include<conio.h>
char M[41]="0141592653589793238462643383279502884197";
char N[41],T[41],R[41];
int a,b,c,d,x,y;
int main(){
clrscr();
printf("[");
for(x=0;x<40;x++)
if(M[x]-=48) N[x-1]=!a++;
Inicio:
for(x=41;--x;R[x]=10);
do{
R[b=d=y+1]--;
for(a=0,x=40;x--;)
a=M[x]*R[b]+a/10,
T[x]=a?a%10:0;
for(c=0,x=40;x--;)
a=(d?N[--d]:0)-T[x]-c,
T[x]=a+10*(c=a<0);
if(!c) for(y++,x=40;b--;)
N[b]=T[--x];
}while(y<40);
a=b=x=y=0;
do{
N[x]=M[x];
b+=M[x]=T[x];
if(a+=R[++x]) printf("%u",R[x]);
}while(x<40);
printf("%c",b?44:93);
if(b) goto Inicio;
getch();
return 0;
}