#include using namespace std; int main() { string x; int a,b; while(cin>>x>>a>>b) { if(!a && !b) break; for(int i=0;i