#include #include using namespace std; int main() { long long a, b, c; cin >> a >> b >> c; long long i; bool buy = false; for(int step = 0; step < 10000; ++step) { string op; cin >> op; if(op == "end") break; i += 1; if(b + c * i <= a * i) { if(buy) { cout << "self" << endl; } else { cout << "buy" << endl; buy = true; } } else { cout << "airline" << endl; } } }