#include <stdio.h>
#define pfa printf("fill A\n");
#define pea printf("empty A\n");
#define pab printf("pour A B\n");
#define pfb printf("fill B\n");
#define peb printf("empty B\n");
#define pba printf("pour B A\n");
int main()
{
int a,b,n,t,i,ii,j,jj,sum1,sum2,B;
while(scanf("%d %d %d",&a,&b,&n)!=EOF)
{
if(b>a/2)
{
pfb;
if(b==n)B=n;
B=b;
while(B!=n)
{
if(B>a){pba;B-=a;if(B==n)break;}
else if(B<a){pba;pfb;pba;B=b-(a-B);if(B==n)break;}
pea;
}
printf("success\n");
}
else{
t=1;
i=0;
ii=a;
while(t)
{
i++;
j=1;
jj=0;
while(ii-jj>0)
{
if(ii-jj==n)
{
t=0;
break;
}
jj+=b;
j++;
}
ii+=a;
}
sum1=i+j;
t=1;
i=0;
ii=b;
while(t)
{
i++;
j=1;
jj=0;
while(ii-jj>0)
{
if(ii-jj==n)
{
t=0;
break;
}
jj+=a;
j++;
}
ii+=b;
}
sum2=i+j;
if(sum1<sum2)t=1;
else t=0;
if(t)
{pfa;
pab;
B=a;
while(B!=n)
{
pfa;
if(B+a<b){pab;B+=a;}
if(B+a>b){pab;peb;pab;B=B+a-b;}
}
printf("success\n");
}
else
{
pfb;
if(b==n)B=n;
B=b;
while(B!=n)
{
if(B>a){pba;B-=a;if(B==n)break;}
else if(B<a){pba;pfb;pba;B=b-(a-B);if(B==n)break;}
pea;
}
printf("success\n");
}
}
}
getchar();
return 0;
}