#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
//英语 看博友分析 抄博友程序 模拟 巧妙 bfs未实现 背
int main()
{
int ca,cb,n;
while(cin>>ca>>cb>>n)//像枚举
{
int a=0,b=0;
while(b!=n)
{
int bnow;
for(int i=0;i<ceil((double)(cb-b)/(double)ca);i++)//背
{
cout<<"fill A"<<endl;
cout<<"pour A B"<<endl;
bnow=b+ca*(i+1);
if(bnow==n)
{
break;
}
}
if(bnow==n)
{
break;
}
cout<<"empty B"<<endl;
cout<<"pour A B"<<endl;
b=ca-(cb-b)%ca;//抄博友程序
}
cout<<"success"<<endl;
}
return 0;
}