for(i=10000;i>=0;i--)
for(j=1;j<=book[i];j++)
printf("%d\n",i);
for(i=10000;i>=0;i--)
{ j=1;
while(j<=book[i])
{
j++;
printf("%d\n",i);
}
}