Problem:


Score : 300 points

Problem Statement

A game is played on a strip consisting of N cells consecutively numbered from 1 to N. 

Alice has her token on cell A. Borys has his token on a different cell B.

Players take turns, Alice moves first.
The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1.
Note that it's disallowed to move the token outside the strip or to the cell with the other player's token.
In one turn, the token of the moving player must be shifted exactly once.

The player who can't make a move loses, and the other player wins.

Both players want to win. Who wins if they play optimally?

Constraints

2 \leq N \leq 100

1 \leq A < B \leq N

All input values are integers.

Input

Input is given from Standard Input in the following format:

N A B

Output

Print Alice if Alice wins, Borys if Borys wins, and Draw if nobody wins.

Sample Input 1

5 2 4

Sample Output 1

Alice

Alice can move her token to cell 3. 
After that, Borys will be unable to move his token to cell 3, so he will have to move his token to cell 5. 
Then, Alice moves her token to cell 4. Borys can't make a move and loses. 

Sample Input 2

2 1 2

Sample Output 2

Borys

Alice can't make the very first move and loses.

Sample Input 3

58 23 42

Sample Output 3

Borys



Sample input:
5 2 4


Sample output:
Alice

Submission status: Accepted

Solution code:
N,A,B = map(int,input().split())
if (B-A+1) % 2 != 0 :
    flag = 1
else :
    flag = -1

if flag == 1 :
    ans = "Alice"
elif flag == -1 :
    ans = "Borys"
else :
    ans = "Draw"
print(ans)

Submission status: Accepted

Solution code:
_,a,b = map(int,input().split())
while 1:
    if a+1 != b:
        a += 1
    else:
        print('Borys')
        exit()
    if b-1 != a:
        b -= 1
    else:
        print('Alice')
        exit()

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
if (A-B-1) % 2 == 0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
n,a,b=map(int, input().split())
if (b-a)%2:print('Borys')
else:print('Alice')

Submission status: Accepted

Solution code:
import sys

N, a, b = list(map(int, sys.stdin.readline().strip().split(" ")))

interval = max(a, b) - min(a, b) - 1

if interval % 2 == 0:
    print("Borys")
if interval % 2 == 1:
    print("Alice")

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

judge = False

turn = 0
while not judge:
    if turn == 0:
        if A - B == 1:
            print("Borys")
            exit()
        else:
            A += 1
            turn = 1
    else:
        if A - B == 1:
            print("Alice")
            exit()
        else:
            B -= 1
            turn = 0

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
if (b-a)%2==1:print('Borys')
else:print('Alice')

Submission status: Accepted

Solution code:
n, a, b=map(int, raw_input().split())
dis=b-a
print "Alice" if dis%2==0 else "Borys"

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
if abs(a-b)%2==0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
if (b-a-1) % 2 == 0:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
d = b-1-a
if d %2:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int, input().split())
if (b-a)%2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

if (A - B) % 2 == 0:
    print("Alice")

else:
    print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())

if abs(a-b)%2== 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
if (b-c) % 2 == 1:
  print("Borys")
else:
  print("Alice")

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
t = 1

while a != 0 and b != n + 1:
    if t:
        if a + 1 == b:
            a -= 1
        else:
            a += 1
    else:
        if b - 1 == a:
            b += 1
        else:
            b -= 1
    t ^= 1

print('Alice' if t else 'Borys')

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

while A<B:
  if B - A == 1:
    print("Borys")
    exit(0)
    
  A = A+1
  if B - A == 1:
    print("Alice")
    exit(0)
  
  B = B-1

Submission status: Accepted

Solution code:
N,A,B = map(int,input().split())
if (abs(B-A) % 2 == 0):
  print('Alice')
else:
  print('Borys')

Submission status: Accepted

Solution code:
N,A,B = map(int, input().split())

if (A-B) % 2 == 0:
  print('Alice')
else :
  print('Borys')

Submission status: Accepted

Solution code:
def a_move_and_win(N, A, B):
    ans = 'Alice' if (B - A + 1) % 2 == 1 else 'Borys'
    return ans

N, A, B = [int(i) for i in input().split()]
print(a_move_and_win(N, A, B))

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
flg = ((b - a) % 2 == 0)
print('Alice' if flg else 'Borys')

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
ans = ['Alice','Borys']
print(ans[(a-b)%2])

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
a-=1
b-=1
while 1:
  if a+1==b:
    if a==0:
      print("Borys")
      break 
    a-=1
  else:
    a+=1
  
  if b-1==a:
    if b==n-1:
      print("Alice")
      break
    b+=1
  else:
    b-=1

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())

if (b-a-1) % 2 == 1:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
def main():
  t = input().split(" ")
  N, A, B = int(t[0]), int(t[1]), int(t[2])
  
  if (B-A) % 2 == 0:
    print("Alice")
  else:
    print("Borys")
main()

Submission status: Accepted

Solution code:
def getinputdata():

    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

#ますの数
n = int(arr_data[0][0])
#アリスの駒はマスの位置
a = int(arr_data[0][1])
#ボリスの駒は別のマスの位置
b = int(arr_data[0][2])

print("Alice" if (b-a)%2==0 else "Borys")

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
if (b-a) % 2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())

if (a+b)%2==0:
  print("Alice")
else:
  print("Borys")

Submission status: Accepted

Solution code:
a=input().split()
b=[int(i) for i in a]
if (b[2]-b[1])%2==0:
  print('Alice')
else:
  print('Borys')

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
if (a-b) %2 == 0:
  print("Alice")
else:
  print("Borys")

Submission status: Accepted

Solution code:
n, a, b = list(map(int, input().split()))
if (b-a)%2==1:
  print("Borys")
else:
  print("Alice")

Submission status: Accepted

Solution code:
N, A, B = list(map(int, input().split()))
if (B - A) % 2 == 0:
	print("Alice")
else:
	print("Borys")

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())

if (B-A)%2==1:
  print('Borys')
else:
  print('Alice')

Submission status: Accepted

Solution code:
n,a,b = map(int,raw_input().split())
 
print "Alice" if (b-a-1) %2 == 1 else "Borys"

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
f = [""]*n
f[a-1], f[b-1] = "A", "B"
i = 0
ans = ""
while i <= 1000:
  nowA = f.index("A")
  nowB = f.index("B")
    
  if f[nowA+1] == "B":
    if not nowA == 0:
      f[nowA-1] = "A"
      f[nowA] = ""
    else:
      ans = "Borys"
      break
  else:
    f[nowA+1] = "A"
    f[nowA] = ""
  
  if f[nowB-1] == "A":
    if not nowB == n-1:
      f[nowB+1] = "B"
      f[nowB] = ""
    else:
      ans = "Alice"
      break
  else:
    f[nowB-1] = "B"
    f[nowB] = ""

if ans:
  print(ans)
else:
  print('Draw')

Submission status: Accepted

Solution code:
N,A,B=list(map(int, input().split()))
distance=max(A,B)-min(A,B)-1
if distance%2==0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N,A,B = (int(i) for i in input().split())

if (B-A)%2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
if (b - a) % 2 == 0:
	print("Alice")
else:
	print("Borys")

Submission status: Accepted

Solution code:
import sys
N , A, B= map(int,input().split())
n = B - A - 1
if n % 2 == 0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# AtCoder Grand Contest


if __name__ == '__main__':
    n, a, b = list(map(int, input().split()))

    if (b - (a + 1)) % 2 == 1:
        print('Alice')
    else:
        print('Borys')

Submission status: Accepted

Solution code:
N, A, B = list(map(int, input().split()))
if (B-A)%2 == 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
_,A,B=map(int,input().split())
print(['Alice','Borys'][(B-A)%2])

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
if (B-A)%2!=0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:

def main():
    n, a, b = map(int, input().split())
    if a > b:
        a = n - a + 1
        b = n - b + 1
    if (b - a) % 2 == 0:
        print("Alice")
    else:
        print("Borys")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
_, x, y = map(int,input().split())
print(["Alice","Borys"][(x-y)%2])

Submission status: Accepted

Solution code:
def main():
    n, a, b = map(int, input().split())
    
    if (a-b) % 2 == 0:
        w = "Alice"
    else:
        w = "Borys"
        
    print(w)
    

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, A, B=map(int,input().split())
import sys
for i in range (1,1000000):
    if i%2==1:
        if A+1!=B:
            A+=1
        elif A!=1:
            A-=1
        else:
            print ('Borys')
            sys.exit()
            
    if i%2==0:
        if B-1!=A:
            B-=1
        elif B!=N:
            B+=1
        else:
            print('Alice')
            sys.exit()

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
if A - B < -1:
    key = B - A
else:
    key = A - B
if key == 0:
    print("Draw")
elif key % 2:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
print('Alice' if (a-b)%2==0 else 'Borys')

Submission status: Accepted

Solution code:
N,A,B = map(int,input().split())

if (B-A)%2==0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int, raw_input().split())
if (b-a) % 2 == 0:
  print "Alice"
else:
  print "Borys"

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
if (c-b)%2==0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
print("Borys" if (A-B)%2==1 else "Alice")

Submission status: Accepted

Solution code:
n, a, b = (int(i) for i in input().split())
field = [3] + [0]*n + [3]
field[a] = 1
field[b] = 2
dist = abs(a-b)


if dist%2==0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
def lii():
    return list(map(int, input().split(' ')))
  
N, A, B = lii()
if (B - A) % 2 == 0: print('Alice')
else: print('Borys')

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
num=abs(a-b-1)
if num%2==0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
print("Borys" if (B-A)%2 == 1 else "Alice")

Submission status: Accepted

Solution code:
N, A, B = [int(elem) for elem in input().split(' ')]

# corner case 1
if A == 1 and B == 2:
    print("Borys")
    exit(0)

diff = B - A
if diff % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int, input().split())
print ('Alice') if (b-a)%2==0 else print('Borys')

Submission status: Accepted

Solution code:
n,a,b=[int(i) for i in input().split()]

if abs(a-b)%2==0:
  print("Alice")
else:
  print("Borys")

Submission status: Accepted

Solution code:
tmp = list(map(int,input().split()))
n,a,b = tmp[0],tmp[1],tmp[2]
if abs(a-b) % 2:
  print("Borys")
else:
  print("Alice")

Submission status: Accepted

Solution code:
n,a,b = list(map(int,input().split()))
if (b-a) % 2 ==0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
import math
import numpy as np

in_arr = input().split()

N = int(in_arr[0])
A = int(in_arr[1])
B = int(in_arr[2])

if((A-B)%2 == 0): print("Alice")
if((A-B)%2 == 1): print("Borys")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n,a,b = [int(i) for i in input().split()]
#print(n)
#print(a)
#print(b)
if (b-a)%2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
import sys
n,a,b=map(int,input().split())
i=0
while(1):
  if(i%2==0):
    if(a+1==b):
      print("Borys")
      sys.exit()
    else:a+=1
  elif(i%2==1):
    if(b-1==a):
      print("Alice")
      sys.exit()
    else:b-=1
  i+=1

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
print("Alice" if (B-A)%2==0 else "Borys")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys, math, copy
# import fractions, itertools
# import numpy as np
# import scipy

HUGE = 2147483647
HUGEL = 9223372036854775807
ABC = "abcdefghijklmnopqrstuvwxyz"

def main():
    n, a, b = map(int, input().split())
    d = b - a
    if d % 2 == 1:
        return "Borys"
    else:
        return "Alice"

print(main())

Submission status: Accepted

Solution code:
N,A,B = list(map(int,input().split()))

if (B-A)%2 != 0:
	print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
n,a,b = (int(i) for i in input().split())
if (b-a)%2==0: print("Alice")
else: print("Borys")

Submission status: Accepted

Solution code:
N,a, b = map(int, input().split())
if (b-a)%2==0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
if (b - a) % 2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
if (B - A) % 2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
if (a-b-1)%2==1:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
print('Borys' if abs(b - a) % 2  == 1 else 'Alice')

Submission status: Accepted

Solution code:
N, A, B =map(int, input().split())
if (B-A)%2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

a = A; b = B
used = set()
while 1:
    if a < b:
        if a + 1 < b:
            a += 1
        else:
            if a > 1:
                a -= 1
            else:
                print('Borys')
                break
        if a < b-1:
            b -= 1
        else:
            if b < N:
                b += 1
            else:
                print('Alice')
                break
    if (a, b) in used:
        print('Draw')
        break
    used.add((a, b))

Submission status: Accepted

Solution code:
N,A,B = map(int, input().split())

if (B-A)%2==0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())
res = 'Alice' if((b-a)%2==0) else 'Borys'
print res

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
if (B-A)%2 == 0:
	print("Alice")
else:
	print("Borys")

Submission status: Accepted

Solution code:
def main():
    N, A, B = map(int, input().split())
    print('Alice' if (B-A) % 2 == 0 else 'Borys')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
if (A-B)%2==0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
data = list(map(int, input().split(' ')))
if (data[2]- data[1]) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
data = list(input().split(' '))
if (int(data[2])- int(data[1])) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
a = input().split(" ")
b = list(map(int, a))
if (b[2] - b[1]) % 2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
n, a, b = list(map(int, input().split()))
if (b-a)%2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
if __name__=='__main__':
    a = list(map(int,input().split(' ')))

    if (a[2]-a[1])%2==0:
        print('Alice')
    else:
        print('Borys')

Submission status: Accepted

Solution code:
# 先に相手の隣に陣取った方の勝ち
N, A, B = map(int, input().split())
# AliceとBorysの間に奇数個のマスがあった場合，Aliceが勝つ
if (B - A + 1) % 2 == 1:
    print('Alice')
# 偶数個（0を含む）のマスがあった場合，Borysが勝つ
else:
    print('Borys')
# Drawはない

Submission status: Accepted

Solution code:
n, a, b = map(int,input().split())
m = a + b
if (m % 2==1):
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
while(True):
    if A + 1 != B:
        A += 1
    elif A - 1 != 0:
        A -= 1
    else:
        print("Borys")
        break

    if B - 1 != A:
        B -= 1
    elif B + 1 != N + 1:
        B += 1
    else:
        print("Alice")
        break

Submission status: Accepted

Solution code:
#
N, A, B = list(map(int, input().split()))

#
if (B-A-1)%2==0:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
import sys
n, a, b = map(int, sys.stdin.readline().split())
k = b - a - 1
if k % 2 == 0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N,A,B=[int(i) for i in input().split(" ")]

Turn="Alice"
while True:
    if Turn=="Alice":
        if A==1 and B==2:
            print("Borys")
            break
        if A+1==B:
            A-=1
        else:
            A+=1
        Turn="Borys"
    else:
        if A==N-1 and B==N:
            print("Alice")
            break
        if A==B-1:
            B+=1
        else:
            B-=1
        Turn="Alice"

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
while True:
    if a+1 != b:
        a += 1
    elif a != 1:
        a -= 1
    else:
        print("Borys")
        break

    if b-1 != a:
        b -= 1
    elif b != n:
        b += 1
    else:
        print("Alice")
        break

Submission status: Accepted

Solution code:
n, a, b = map(int,input().split())
if (b - a - 1) % 2 == 0:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
n,a,b = map(int,raw_input().split())
if (a==1 and b==2) or (a==n and b==n-1) : print "Borys"
elif (b-a)&1 : print "Borys"
else : print "Alice"

Submission status: Accepted

Solution code:
n, a, b = list(map(int, input().split()))
print(['Alice','Borys'][(b-a)%2])

Submission status: Accepted

Solution code:
n,a,b = (int(x) for x in input().split())
print('Alice' if (b-a)%2 == 0 else 'Borys')

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
print("Alice" if abs(a-b) %2 == 0 else "Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())

if (b - a) % 2 == 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
#agc020a

n,a,b=map(int,raw_input().split())
if (b-a)%2==0:
 print 'Alice'
else:
 print 'Borys'

Submission status: Accepted

Solution code:
# coding=utf-8

if __name__ == '__main__':
    N, A, B = map(int, input().split())

    if ((A - B) % 2 == 0):
        print('Alice')

    else:
        print('Borys')

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())
print 'Borys' if (a - b) & 1 else 'Alice'

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())
while True:
    if a + 1 != b:
        a += 1
    else:
        print 'Borys'
        break
    if b - 1 != a:
        b -= 1
    else:
        print 'Alice'
        break

Submission status: Accepted

Solution code:
def main():
    N,A,B = map(int,input().split(" "))
    s = abs(A-B)-1
    if s%2:
        print("Alice")
    else:
        print("Borys")

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
n, a, b = [int(i) for i in input().split()]
print(["Alice", "Borys"][(a - b) % 2])

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
if A==1 and B==A+1:
    print('Borys')
else:
    if (B-A)%2 == 0:
        print('Alice')
    elif (B-A)%2 == 1:
        print('Borys')
    else:
        print('Draw')

Submission status: Accepted

Solution code:
import sys
tokens = sys.stdin.readline().strip().split()

n = int(tokens[0])
a = int(tokens[1])
b = int(tokens[2])
if ((b-a) % 2) == 0:
  print "Alice"
else:
  print "Borys"

Submission status: Accepted

Solution code:
import sys
tokens = sys.stdin.readline().strip().split()

n = int(tokens[0])
a = int(tokens[1])
b = int(tokens[2])
if ((b-a) % 2) == 0:
  print "Alice"
else:
  print "Borys"

Submission status: Accepted

Solution code:
input_lines = input()
N_A_B = input_lines.split()
N = int(N_A_B[0])
A = int(N_A_B[1])
B = int(N_A_B[2])
while 1 <= A < B <= N:
    if A + 1 < B:
        A = A + 1
    elif 1 < A and A + 1 == B:
        A = A - 1
    elif 1 == A and A + 1 == B:
        print("Borys")
        break
    if A < B - 1:
        B = B - 1
    elif A == B - 1 and B < N:
        B = B + 1
    elif A == B - 1 and B == N:
        print("Alice")
        break
else:
    print("draw")

Submission status: Accepted

Solution code:
import math

N, A, B = map(int, input().split())

if int(math.fabs(A - B)) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n, a, b = map(int, raw_input().split())
if (b-a)%2 == 0:
	print "Alice"
else:
	print "Borys"

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
print(["Borys","Alice"][(B-A)%2==0])

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

x = B - A - 1
if x % 2 == 0:
    ans = 'Borys'

elif x % 2 == 1:
    ans = 'Alice'

print(ans)

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
N = l[0]
A = l[1] # Alice
B = l[2] # Borys

if (B - A) % 2 == 1:
   Winner = "Borys"

else :
   Winner = "Alice"

print(Winner)

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
if n == 2:
    print("Borys")
else:
    if (b-a) % 2 == 0:
        print("Alice")
    else:
        print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
if n%2 == 0:
	if (b-a)%2 == 1:
		print('Borys')
	else:
		print('Alice')
else:
	if (b-a)%2 == 1:
		print('Borys')
	else:
		print('Alice')

Submission status: Accepted

Solution code:
def fast_run(N, A, B):
    if (B-A) % 2 == 0:
        return 'Alice'
    return 'Borys'


if __name__ == '__main__':
    N, A, B = map(int, input().split(' '))
    print(fast_run(N, A, B))

Submission status: Accepted

Solution code:
N, A, B = (int(i) for i in input().split())
if abs(A - B) % 2 == 0:
  print('Alice')
else :
  print('Borys')

Submission status: Accepted

Solution code:
def main():
    N, A, B = map(int, input().split())

    if (B - A) & 1:
        print('Borys')
    else:
        print('Alice')

main()

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())

maxim = max(a, b)
minim = min(a, b)

if (maxim - minim) % 2 == 1:
  print 'Borys'
else:
  print 'Alice'

Submission status: Accepted

Solution code:
moji = input()
moji = moji.split(" ")
N = moji[0]
A = moji[1]
B = moji[2]

res = ""

if ((int)(B) - (int)(A))%2 == 0:
    res = "Alice"
else:
    res = "Borys"

print(res)

Submission status: Accepted

Solution code:
N, A, B = map(int,input().split())
if (B-1-A) % 2 == 0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N_A_B = list(map(int, input().split()))

if (N_A_B[2] - N_A_B[1]) %2 == 0:
    print("Alice")
elif (N_A_B[2] - N_A_B[1]) %2 == 1:
    print("Borys")

Submission status: Accepted

Solution code:
# coding: utf-8

# input
n, a, b = map(int, input().split())

# output
diff = b - a - 1
if diff == 0 or diff % 2 == 0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
import copy
import time

N, A, B = map(int, input().split(' '))

trouts_org = [(i + 1) for i in range(N)]


cond = 0 # Aliceの先攻
cont = True # ゲームを続ける
start = time.time() # スタート時間

while cont:
    trouts_now = copy.deepcopy(trouts_org)
    trouts_now.remove(A)
    trouts_now.remove(B)
    
    if cond == 0:
        if (B - A - 1) == 0:
            if (A - 1) in trouts_now:
                A -= 1
            else:
                print('Borys')
                cont = False            
        
        elif (B - A - 1) % 2 == 1:
            if (A + 1) in trouts_now:
                A += 1
            elif (A - 1) in trouts_now:
                A -= 1
            else:
                print('Borys')
                cont = False
                
        elif (B - A - 1) % 2 == 0:
            if (A - 1) in trouts_now:
                A -= 1
            elif (A + 1) in trouts_now:
                A += 1
            else:
                print('Borys')
                cont = False
        
        cond = 1
    
    else:
        if (B - A - 1) == 0:
            if (B + 1) in trouts_now:
                B += 1
            else:
                print('Alice')
                cont = False 
                
        elif (B - A - 1) % 2 == 1:
            if (B - 1) in trouts_now:
                B -= 1
            elif (B + 1) in trouts_now:
                B += 1
            else:
                print('Alice')
                cont = False
                
        elif (B - A - 1) % 2 == 0:
            if (B + 1) in trouts_now:
                B += 1
            elif (B - 1) in trouts_now:
                B -= 1
            else:
                print('Alice')
                cont = False
                
        cond = 0
        
    
    now = time.time()
    if now - start > 5:
        print('Draw')
        cont = False

Submission status: Accepted

Solution code:
s = input()
sc = s.split()

N = int(sc[0])
A = int(sc[1])
B = int(sc[2])
SUB = B - A

if 1 == SUB % 2:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
N, A, B = [int(val) for val in raw_input().split(" ")]
y = B - A - 1
if y%2==0:
    print "Borys"
else:
    print "Alice"

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

if (B-A) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
# in  5, Alice  2, left  1, Borys  4, right  1, between  1 => Arice win
# in 53, Alice 23, left 22, Borys 42, right 16, between 18 => Borys win
# in  2, Alice  1, left  0, Borys  2, right  0, between  0 => Borys win

N, A, B = map(int, raw_input().split())

#print N, A, B

# 'Alice'
# 'Borys'
# 'Draw'

if ((A - B -1) % 2) == 0:
    print 'Borys'
else:
    print 'Alice'

Submission status: Accepted

Solution code:
n,a,b = map(int, input().split())

if abs(a-b) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
def movea(a,b):
    if a==1 and a+1 == b:
        print('Borys')
        exit()    
    if a+1 != b: a += 1
    elif a >= 2: a-=1
    return a,b

def moveb(a,b):
    if b==n and b-1 == a:
        print('Alice')
        exit() 
    if b-1 != a: b -= 1
    elif b <= n-1: b+=1
    return a,b
    
while True:
    a,b=movea(a,b)
    a,b=moveb(a,b)

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
z = b - a
if z % 2 == 0:
  ans = "Alice"
else:
  ans = "Borys"

print(ans)

Submission status: Accepted

Solution code:
n,a,b = map(int,raw_input().split(" "))

q = b-a-1

if n == 2:
  print "Borys"
  exit(0)

if q % 2 == 0:
  print "Borys"
  exit(0)
else:
  print "Alice"
  exit(0)

Submission status: Accepted

Solution code:
N, A, B =map(int,input().split(' '))

m=B-A-1

if m%2==1:
    print('Alice')
elif m%2==0:
    print('Borys')
else:
    print('Draw')

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
b = abs(a[1] - a[2])
if b % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
inn = [int(x) for x in input().split()]
diff = inn[2] - inn[1]

if diff % 2 == 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
x = input().split(" ")

if((int(x[1]) - int(x[2])) % 2 == 0):
    print("Alice")
    
else:
    print("Borys")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def inpl(): return tuple(map(int, input().split()))

N, A, B = inpl()
a, b = 0, 0

a += A-1
b += N-B

x = (N-A - b - 1)


if x%2:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())

if (B-A) % 2 ==0:
	print("Alice")
else:
	print("Borys")

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())

num=b-a

if num%2==0: print("Alice")
else: print("Borys")

Submission status: Accepted

Solution code:
INF = 999999999999999999L
EPS = 1e-12

def read():
    return raw_input().strip()

def read_ints():
    return map(int,read().split())

n,a,b = read_ints()
if (b-a)%2 == 1:
    print "Borys"
else:
    print "Alice"

Submission status: Accepted

Solution code:
N, A, B = [int(i) for i in input().split()]

if (B - A) % 2 != 0:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())

while True:
    if a + 1 <= n and a + 1 != b:
        a += 1
    else:
        print("Borys")
        break
    if b >= 2 and b - 1 != a:
        b -= 1
    else:
        print("Alice")
        break

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
if (b-a-1)%2==0:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if((c-b)%2==0):
	print("Alice")
else:
	print("Borys")

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
turn = 0
while True: 
  if turn == 0:
    if a + 1 < b:
      a += 1
    elif 0 < a :
      a -= 1
    else:
      break
    turn = 1
  elif turn == 1:
    if a + 1 < b:
      b -= 1
    elif a + 1 == b and b != n:
      b += 1
    else:
      break
    turn = 0

if turn == 0:
  print('Borys')
else:
  print('Alice')

Submission status: Accepted

Solution code:
N, A, B = list(map(int,input().split()))

print ("Alice" if ((A-B) % 2 == 0) else "Borys")

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())

gap = abs(a - b)
if gap % 2 == 0:
	print('Alice')
else:
	print('Borys')