#include<iostream>
using namespace std;
int main()
{
int ca,cb,va,vb,n;
while(cin>>ca>>cb>>n)
{
va=vb=0;
if(cb==n)
{
cout<<"fill B"<<endl;
}
else
{
while(vb!=n)
{
if(va>0)
{
cout<<"pour A B"<<endl;
vb=va; va=0;
//cout<<"va="<<va<<" "<<"vb="<<vb<<endl;
}
else
{
if(ca+vb<cb)
{
cout<<"fill A"<<endl;
cout<<"pour A B"<<endl;
vb+=ca; va=0;
//cout<<"va="<<va<<" "<<"vb="<<vb<<endl;
}
else
{
cout<<"fill A"<<endl;
cout<<"pour A B"<<endl;
cout<<"empty B"<<endl;
va=ca-(cb-vb); vb=0;
//cout<<"va="<<va<<" "<<"vb="<<vb<<endl;
}
}
}
}
cout<<"success"<<endl;
}
return 0;
}