#!/usr/bin/env python3

STEPS = 10000

a, b, c = map(int, input().split())


def best(i):
    return min(a * i, b + c * i)


# buy at step k
def test(k):
    for i in range(1, STEPS + 1):
        cost = a * i if i <= k else a * k + b + c * (i - k)
        if cost > 2 * best(i): return False
    return True


for k in range(STEPS):
    if test(k):
        break

i = 0
while True:
    if input() == "end":
        break
    if i < k:
        print("airline")
    elif i == k:
        print("buy")
    else:
        print("self")
    i += 1
