import java.math.BigInteger;
import java.util.*;

public class SolutionIvan {
    public static void main(String[] args) throws Exception {
        new SolutionIvan().run();
    }

    boolean shouldBuy(long a, long b, long c, long count) {
        long spent = count * a;
        long budget = 2 * Math.min(a * (count + 1), b + c * (count + 1));
        return budget - spent >= b + c;
    }
    void run() throws Exception {
        Scanner scanner = new Scanner(System.in);
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        scanner.nextLine();

        long count = 0;
        boolean airplane = false;
        while (true) {
            String token = scanner.next();
            if (token.equals("end")) {
                return;
            }
            if (a <= c) {
                System.out.println("airline");
            } else if (airplane) {
                System.out.println("self");
            } else if (shouldBuy(a, b, c, count)) {
                System.out.println("buy");
                airplane = true;
            } else {
                System.out.println("airline");
            }
            System.out.flush();
            count++;
        }
    }
}

