On a chessboard with a width of $$$n$$$ and a height of $$$n$$$, rows are numbered from bottom to top from $$$1$$$ to $$$n$$$, columns are numbered from left to right from $$$1$$$ to $$$n$$$. Therefore, for each cell of the chessboard, you can assign the coordinates $$$(r,c)$$$, where $$$r$$$ is the number of the row, and $$$c$$$ is the number of the column.The white king has been sitting in a cell with $$$(1,1)$$$ coordinates for a thousand years, while the black king has been sitting in a cell with $$$(n,n)$$$ coordinates. They would have sat like that further, but suddenly a beautiful coin fell on the cell with coordinates $$$(x,y)$$$...Each of the monarchs wanted to get it, so they decided to arrange a race according to slightly changed chess rules:As in chess, the white king makes the first move, the black king makes the second one, the white king makes the third one, and so on. However, in this problem, kings can stand in adjacent cells or even in the same cell at the same time.The player who reaches the coin first will win, that is to say, the player who reaches the cell with the coordinates $$$(x,y)$$$ first will win.Let's recall that the king is such a chess piece that can move one cell in all directions, that is, if the king is in the $$$(a,b)$$$ cell, then in one move he can move from $$$(a,b)$$$ to the cells $$$(a + 1,b)$$$, $$$(a - 1,b)$$$, $$$(a,b + 1)$$$, $$$(a,b - 1)$$$, $$$(a + 1,b - 1)$$$, $$$(a + 1,b + 1)$$$, $$$(a - 1,b - 1)$$$, or $$$(a - 1,b + 1)$$$. Going outside of the field is prohibited.Determine the color of the king, who will reach the cell with the coordinates $$$(x,y)$$$ first, if the white king moves first.

The first line contains a single integer $$$n$$$ ($$$2 \le n \le 10^{18}$$$) — the length of the side of the chess field. The second line contains two integers $$$x$$$ and $$$y$$$ ($$$1 \le x,y \le n$$$) — coordinates of the cell, where the coin fell.

In a single line print the answer "White" (without quotes), if the white king will win, or "Black" (without quotes), if the black king will win. You can print each letter in any case (upper or lower).

NoteAn example of the race from the first sample where both the white king and the black king move optimally: The white king moves from the cell $$$(1,1)$$$ into the cell $$$(2,2)$$$. The black king moves form the cell $$$(4,4)$$$ into the cell $$$(3,3)$$$. The white king moves from the cell $$$(2,2)$$$ into the cell $$$(2,3)$$$. This is cell containing the coin, so the white king wins.  An example of the race from the second sample where both the white king and the black king move optimally: The white king moves from the cell $$$(1,1)$$$ into the cell $$$(2,2)$$$. The black king moves form the cell $$$(5,5)$$$ into the cell $$$(4,4)$$$. The white king moves from the cell $$$(2,2)$$$ into the cell $$$(3,3)$$$. The black king moves from the cell $$$(4,4)$$$ into the cell $$$(3,5)$$$. This is the cell, where the coin fell, so the black king wins.  In the third example, the coin fell in the starting cell of the black king, so the black king immediately wins.

n=int(input())
a,b=input().split()
if (int(a)+int(b))-1<=n:
    print("White")
else:
    print("Black")

n=int(input())
#l=list(map(int, input().split()))
a,b=map(int,input().split())
print("White" if a+b-2<=2*n-a-b else "Black")

n=int(input())
x,y=input().split()
x=int(x)
y=int(y)
s=x*y
a=n-x+1
b=n-y+1
c=a*b
if s<=c:
	print("white")
elif c<s:
	print("black")

import sys

n = int(next(sys.stdin))
row, col = map(int, next(sys.stdin).split())

minimum = min(row, col)
white = minimum - 1 + max(row-minimum, col-minimum)

maximum = max(row, col)
black = n - maximum + max(maximum-row, maximum-col)

print("White" if white <= black else "Black")

n=int(input())
x,y=input().split(" ")
x=int(x)
y=int(y)
cw=0
cb=0
w1,w2=1,1
b1,b2=n,n
cw=(x-w1)+(y-w2)
cb=(b1-x)+(b2-y)
if(cw<=cb):
    print("White")
else:
    print("Black")

n = int(raw_input())
x, y = raw_input().split(" ")
x = int(x)
y = int(y)
if x + y <= n + 1:
	print "White"
else:
	print "Black"

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File              : a.py
# Author            : recurze
# Date              : 23:41 04.11.2018
# Last Modified Date: 23:42 04.11.2018

n = int(raw_input())
x, y = [int(x) for x in raw_input().split()]
if (x - 1) + (y - 1) <= (n - x) + (n - y):
    print "White"
else:
    print "Black"

n = int(input())
x, y = map(int, input().split())
ras1 = 0
ras2 = 0
if x > y:
    ras1 += y - 1 + x - y
    ras2 += n - x +  n - (n - x) - y
elif x < y:
    ras1 += x - 1 + y - x
    ras2 += n - y + n - (n - y) - x
else:
    ras1 = x - 1
    ras2 = n - x
if ras1 <= ras2:
    print('White')
else:
    print("Black")

n = int(raw_input())
x, y = map(int, raw_input().split())
w = max(abs(x-1), abs(y-1))
b = max(abs(n-x), abs(n-y))
if w <= b:
    print "White"
else:
    print "Black"

n = int(input().strip())
x0, y0 = list(map(int, input().strip().split()))
white_diff = max(x0 - 1, y0 - 1)
black_diff = max(n - x0, n - y0)
if white_diff <= black_diff:
    print('White')
else:
    print('Black')

import math

n = input()
coin = input()
coin = coin.split()
coin[0] = int(coin[0])
coin[1] = int(coin[1])

white_king = [1, 1]
black_king = [int(n), int(n)]

white_distance = (white_king[0] - coin[0])**2 + (white_king[1] - coin[1])**2
black_distance = (black_king[0] - coin[0])**2 + (black_king[1] - coin[1])**2

if white_distance == black_distance or white_distance < black_distance:
    print('WHITE')
elif black_distance < white_distance:
    print('BLACK')

n = int(input())
x, y = map(int, input().split())
if max(x-1,y-1) <= max(n-x,n-y):
  print('White')
else:
  print('Black')

n = int(input())
x, y = list(map(int, input().split(" ")))
n1 = abs(x-1) + abs(y-1)
n2 = abs(x-n) + abs(y-n)
if n1 > n2:
    print("Black")
else:
    print("White")

n=int(input())
a,b=map(int,input().split())
w1=abs(a-1)
w2=abs(b-1)
b1=abs(n-a)
b2=abs(n-b)
mowk=min(w1,w2)+abs(w1-w2)
mobk=min(b1,b2)+abs(b1-b2)
if mobk<mowk:
	print("black")
else:
	print("white")

n=int(input())
x,y=map(int,input().split())
val1=max(x,y)-1
val2=n-min(x,y)
if(val1<=val2):
    print('White')
else:
    print('Black')

n = int(input())
'''
Console.readLine() ->   C#
||
input()    -> python 3
'''
'''
temp = [int(item) for item in input().split()]
x = temp[0]
y = temp[1]
'''
'''
x, y = [int(item) for item in input().split()]
'''
x, y = list(map(int, input().split()))

wRowDiff, wCollDiff, bRowDiff, bCollDiff = x - 1, y - 1, n - x, n - y

wMoves = wRowDiff + (wCollDiff - wRowDiff) if wRowDiff < wCollDiff else wCollDiff + (wRowDiff - wCollDiff)
bMoves = bRowDiff + (bCollDiff - bRowDiff) if bRowDiff < bCollDiff else bCollDiff + (bRowDiff - bCollDiff)

print('Black' if bMoves < wMoves else 'White')

n = int(input())
x, y = [int(a) for a in input().split()]

white_dist = max(x-1, y-1)
black_dist = max(n-x, n-y)

if white_dist <= black_dist:
    print("white")
else:
    print("black")

 #import resource
#import sys
#resource.setrlimit(resource.RLIMIT_STACK, [0x100000000, resource.RLIM_INFINITY])
#import threading
#threading.stack_size(2**26)
#sys.setrecursionlimit(0x1000000)
#fact=[1]
#for i in range(1,100001):
#    fact.append((fact[-1]*i)%mod)
from sys import stdin, stdout
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import math
import heapq
from random import randint as rn
from Queue import Queue as Q
mod=(10**9)+7
def modinv(n,p):
    return pow(n,p-2,p)
def ncr(n,r,p):
    t=((fact[n])*(modinv(fact[r],p)%p)*(modinv(fact[n-r],p)%p))%p
    return t
def ain():
    return map(int,sin().split())
def sin():
    return stdin.readline().strip()
def GCD(x, y):
   while(y):
       x, y = y, x % y
   return x
"""*********************************************************************************"""
n=input()
x,y=map(int,raw_input().split())
q=x-1
w=y-1
z1=max(q,w)
q=n-x
w=n-y
z2=max(q,w)
if(z1<=z2):
    print "White"
else:
    print"Black"

n = int(input())
x, y = map(int, input().split())
na = abs(x - 1) + abs(y - 1)
nb = abs(n - x) + abs(n - y)
if na <= nb:
    print("white")
else:
    print("black")

n = int(input())
coin = input().split(' ')
x = int(coin[0])
y = int(coin[1])
if x + y <= n+1:
    print('white')
else: print('black')

n=int(input())
a,b=input().split()
if (int(a)+int(b))-1<=n:
    print("White")
else:
    print("Black")

n=int(input());x,y=map(int,input().split())
w=[x-1,y-1];w=sum(w)-min(w)
b=[n-x,n-y];b=sum(b)-min(b)
print('White' if w<=b else 'Black')

n=int(raw_input())
x,y=map(int,raw_input().split())

if max(x-1,y-1)>max(abs(n-x),abs(n-y)):
    print 'Black'
else:
    print 'White'

n = int(input())

x, y = map(int, input().split())

ans = (x - 1) + (y - 1) <= (n - x) + (n - y)
print('White' if ans else 'Black')

n = int(input())
(x, y) = [int(i) for i in input().split()]

dist1 = (min(x,y) + abs(x-y) -1)
dist2 = (min(n-x,n-y) + abs(x-y))

if dist1 <= dist2:
    print("White")
else:
    print("Black")

n = int(input())
x, y = map(int, input().split())
w = x - 1 + y - 1;
b = n - x + n - y;
print("White" if w <= b else "Black")

import sys
n = int(sys.stdin.readline())
gx, gy = tuple(map(int,sys.stdin.readline().split()))

wi, wj, bi, bj = 1, 1, n, n

if (gx - wi + gy - wj) > (bi - gx) + (bj - gy):
    print("Black")
else:
    print("White")

n = int(input())
a,b = map(int,input().split())
print("White"if (a+b) <=(n+1) else "Black")

#!/usr/bin/env python3

if __name__ == "__main__":
    n = int(input())
    x,y = map(int, input().split())

    distW = max(x-1, y-1)
    distB = max(n-x, n-y)

    if distB < distW:
        print("Black")
    else:
        print("White")

n = int(input())
x, y = map(int, input().split())
print("Black" if max(x-1, y-1) > max(n-x, n-y) else "White")

n=int(input())
x,y=map(int,input().split())
w=0
k=min(x,y)
m=max(x,y)
w=k-1
w=w+(m-k)
b=0
b=b+(n-m)
b=b+abs(k-m)
if w<=b:
    print('White')
else:
    print('Black')

# your code goes here
# your code goes here

n = input()
x,y=map(int,raw_input().split())
if x==y:
	if x==1:
		print "white"
	elif x==n:
		print "black"
	else:
		wd=abs(x-1)
		bd=abs(x-n)
		if wd<=bd:
			print "white"
		else:
			print "black"
else:
	wd=abs(min(x,y)-1)+abs(max(x,y)-1)
	bd=abs(min(x,y)-n)+abs(max(x,y)-n)
	if wd<=bd:
		print "white"
	else:
		print "black"

"""
________        _____________              ______
___  __ \____  ____  __ \__(_)__   _______ ___  /
__  /_/ /_  / / /_  /_/ /_  /__ | / /  __ `/_  /
_  ____/_  /_/ /_  _, _/_  / __ |/ // /_/ /_  /
/_/     _\__, / /_/ |_| /_/  _____/ \__,_/ /_/
        /____/

https://github.com/Cheran-Senthil/PyRival
Copyright (c) 2018 Cheran Senthilkumar
"""
from __future__ import division, print_function

import cmath
import itertools
import math
import operator as op
import sys
from atexit import register
from bisect import bisect_left, bisect_right

# import random
# import threading
# from collections import Counter, MutableSequence, defaultdict, deque
# from copy import deepcopy
# from decimal import Decimal
# from difflib import SequenceMatcher
# from heapq import heappop, heappush

if sys.version_info[0] < 3:
    from io import BytesIO as stream
    # from fractions import Fraction
    # from fractions import gcd
    # from cPickle import dumps
    # from Queue import PriorityQueue, Queue
else:
    from io import StringIO as stream
    # from functools import reduce
    # from fractions import Fraction
    # from math import gcd
    # from pickle import dumps
    # from queue import PriorityQueue, Queue

if sys.version_info[0] < 3:
    class dict(dict):
        def items(self):
            return dict.iteritems(self)

        def keys(self):
            return dict.iterkeys(self)

        def values(self):
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

def sync_with_stdio(sync=True):
    """
    Sets whether the standard Python streams are allowed to buffer their I/O.

    Parameters
    ----------
    sync : bool, optional
        The new synchronization setting. Default is True.
    """
    global input, flush

    if sync:
        flush = sys.stdout.flush
    else:
        sys.stdin = stream(sys.stdin.read())
        input = lambda: sys.stdin.readline().rstrip('\r\n')

        sys.stdout = stream()
        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

def main():
    n = int(input())
    x, y = map(int, input().split(' '))
    white_distance = abs(x - y) + min(x - 1, y - 1)
    black_distance = abs(x - y) + min(n - x, n - y)
    # print(white_distance, black_distance)
    if white_distance <= black_distance:
        print('White')
    else:
        print('Black')

if __name__ == '__main__':
    sys.setrecursionlimit(10000)
    sync_with_stdio()
    main()

from sys import stdin

rints = lambda: [int(x) for x in stdin.readline().split()]
n = int(input())
x, y = rints()
w, b = max(x, y) - 1, n - min(x, y)
print('white' if w <= b else 'black')

n=int(input())
m=list(input().split())
if int(m[1])+int(m[0])<=n+1:
    print('White')
else:
    print('Black')

n = int(input())
x, y = map(int, input().split())
if max(n - x, n - y) < max(x - 1, y - 1):
    print("Black")
else:
    print("White")

n = int(input())
x,y = [*map(int,input().split())]
if (x-1 + y-1) <= (n-x + n-y):
    print('White')
else:
    print('Black')

from math import *

n = int(input())
x,y = map(int,input().split())
f = max(x - 1,y - 1)
s = max(n-x,n-y)
if (f<=s):
    print("White")
else:
    print("Black")

n = input()
x,y = raw_input().split()
x = int(x)
y = int(y)
wx,wy = [1,1]
bx,by = [n,n]
w = max(abs(wx - x),abs(wy - y))
b = max(abs(bx - x),abs(by - y))
if(w > b):
    print("Black")
else:
    print("White")

n = int(input())
x,y = map(int,input().split())
k = x+y-2
h= 2*n-x-y
if h==k or k<h:
	print('White')
else:
	print('Black')

import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  a,b=LI()

  white_max=max(a-1,b-1)
  black_max=max(n-a,n-b)

  if white_max<=black_max:
    return 'White'
  return 'Black'

# main()
print(main())

def getDistance(x,y,n):
	w = (x-1)**2+(y-1)**2
	b = (x-n)**2+(y-n)**2
	if w > b:
		return 'Black'
	return 'White'

if __name__=='__main__':
	n = int(input())
	t = input().strip().split(' ')
	x = int(t[0])
	y = int(t[1])
	print(getDistance(x,y,n))

n=int(input())
x,y=map(int,input().split())
w=(x-1)+(y-1)
b=(n-x)+(n-y)
print("White" if w<=b+1 else "Black")

n = int(raw_input())
x, y = raw_input().split()
x, y= int(x),int(y)

whiteKing = (1,1)
blackKing = (n,n)
coin = (x,y)

def noMoves(a,b):
	return max(abs(b[0]-a[0]),abs(b[1]-a[1]))

if whiteKing == coin:
	print "White"
elif blackKing == coin:
	print "Black"
else:
	whiteMoves = noMoves(whiteKing,coin)
	blackMoves = noMoves(blackKing,coin)
	if whiteMoves<=blackMoves:
		print "White"
	else:
		print "Black"

n = int(input())
xy = [int(i) for i in input().split()]
lengthW = 0
lengthB = 0
if (xy[0] < xy[1]):
	lengthW += xy[0]-1+(xy[1]-xy[0])
else:
	lengthW += xy[1]-1+(xy[0]-xy[1])
xy[0] = n+1-xy[0]
xy[1] = n+1-xy[1]
if (xy[0] < xy[1]):
	lengthB += xy[0]-1+(xy[1]-xy[0])
else:
	lengthB += xy[1]-1+(xy[0]-xy[1])
if (lengthW <= lengthB):
	print("White")
else:
	print("Black")

n = int(input())
x, y = [int(i) for i in input().split()]
moves_for_white = max(x - 1, y - 1)
moves_for_black = max(n - x, n - y)
if moves_for_white <= moves_for_black:
    print("White")
else:
    print("Black")

n = int(input())
x, y = map(int, input().split())

if abs(x - 1) + abs(y - 1) - 1 < abs(x - n) + abs(y - n):
	print('White')
else:
	print('Black')

n = int(input())

x, y = map(int, input().split())

if max(n -x, n-y) < max(x-1, y-1):
    print('Black')
else:
    print('White')

n=int(input())
x,y=map(int,input().split())
if (x+y-2)<=(2*n-x-y):
	print('White')
else:
	print('Black')

n=int(input())
a,b=map(int,input().split())
white=abs(a-1)+abs(b-1)
black=abs(n-a)+abs(n-b)
if white<=black:
    print("White")
else:
    print("Black")

n = int(input())
(x, y) = [int(i) for i in input().split()]

dist1 = (min(x,y) + abs(x-y) -1)
dist2 = (min(n-x,n-y) + abs(x-y))

if dist1 <= dist2:
    print("White")
else:
    print("Black")

def solution(l1,n):
    l1=[x-1 for x in l1]
    distw=max(l1)
    l1=[n-x-1 for x in l1]
    distb=max(l1)
    #print(distw,distb)
    if distw>distb:return ("Black")
    else: return ("White")
def answer():
    n = int(input())
    l1 = [int(x) for x in input().split()]
    print(solution(l1,n))
answer( )

n = int(input())
#It takes two numbers separeted by "space" and then splits them
xy = list(input("").split( ))
#Asigning two vars x,y of a coin
xCoin = int(xy[1])
yCoin = int(xy[0])
# First n stands for colomn, second stands for rows

def whoWins():
    global xCoin, yCoin, n

    if xCoin + yCoin > n + 1:
        print("Black")
    else:
        print("White")

whoWins()

n=int(input())
a,b=input().split()
if (int(a)+int(b))-1<=n:
    print("White")
else:
    print("Black")

W = 'White'
B = 'Black'

import sys

n = input()
x, y = map(int, sys.stdin.readline().split())

d1 = min(x-1, y-1)
o1 = max(x-1, y-1)-d1
t1 = d1+o1

d2 = min(n-x, n-y)
o2 = max(n-x, n-y)-d2
t2 = d2+o2

if t1>t2:
    print B
else:
    print W

n=int(input())
x,y=input().split()
x=int(x)
y=int(y)
if(x+y<=n+1):
    print("White")
else:
    print("Black")

 #! /usr/bin/env python
# -*- coding: utf-8 -*

def dist(A, B):
    return (B[0] - A[0])**2 + (B[1] - A[1])**2

def main():
    n = int(raw_input())
    x, y = map(int, raw_input().split())

    d_1 = dist((1, 1), (x, y))
    d_2 = dist((n, n), (x, y))

    if d_1 <= d_2:
        print 'White'
    else:
        print 'Black'

if __name__ == "__main__":
  main()

n = input();
x,y = raw_input().split();
x=int(x);
y=int(y);
whitecolumn = 1;
whiterow = 1;
blackcolumn = n;
blackrow = n;
whiteturn=0;
blackturn=0;
if x-whiterow<y-whitecolumn:
    whiteturn+=x-whiterow;
    whiteturn+=(y-whitecolumn)-(x-whiterow);
elif x-whiterow>y-whitecolumn:
    whiteturn+=y-whitecolumn;
    whiteturn+=(x-whiterow)-(y-whitecolumn);
elif x-whiterow==y-whitecolumn:
    whiteturn+=x-whiterow;

if blackrow-x<blackcolumn-y:
    blackturn+=blackrow-x;
    blackturn+=(blackcolumn-y)-(blackrow-x);
elif blackrow-x>blackcolumn-y:
    blackturn+=blackcolumn-y;
    blackturn+=(blackrow-x)-(blackcolumn-y);
elif blackrow-x==blackcolumn-y:
    blackturn+=blackrow-x;

if blackturn < whiteturn:
    res="Black";
elif blackturn > whiteturn:
    res="White";
else:
    res="White";

print(res);

n = int(input())
x, y = map(int, input().split())

f = max(x, y)
s = max((n-x), (n-y))

if n-x+n-y == 0 or f-1 > s:
  print("Black")
else:
  print("White")

z=input
n=int(z())
x,y=list(map(int,z().split()))
w=max(0,x-1)+max(0,y-1)
b=max(0,n-x)+max(0,n-y)
if b<w:
    print('Black')
else:
    print('White')

n = int(input())
x, y = (int(a) for a in input().split())
d1 = max(x - 1, y - 1)
d2 = max(n - x, n - y)
if d1 <= d2:
    print('White')
else:
    print('Black')

n = input()
x, y = map(int, raw_input().split())
if x + y <= n + 1:
    print "White"
else:
    print "Black"

n = int(input())
x,y = tuple(map(int,input().split()))

white = [1,1]
black = [n,n]

w = max(abs(x-1),abs(y-1))
b = max(abs(x-n),abs(y-n))

print('White') if b>=w else print('Black')

n=int(input())
x,y=map(int,input().split())
d1=max(x-1,y-1)
d2=max(n-x,n-y)
if d1<=d2:
    print("White")
else:
    print("Black")

n=int(input())
m,y=map(int, input().split())
b=max(m-1,y-1)
w=max(n-m,n-y)
print("White" if w>=b else "Black")

n = int(input())
a,b = map(int,input().split())
print("White"if (a+b) <=(n+1) else "Black")

n = int(input())
x,y = map(int,input().split())
if max(x-1,y-1) > max(n-x,n-y):
    print("Black")
else:
    print("White")

n=int(input())
x,y=[int(a) for a in input().split()]
if x>y:
    x,y=y,x

n_while=x-1+(y-1-(x-1))
n_black=n-y+(n-x-(n-y))
if n_while > n_black:
    print("Black")
else:
    print("White")

n=int(input())
x,y=input().split()
x=int(x)
y=int(y)
s=x*y
a=n-x+1
b=n-y+1
c=a*b
if s<=c:
	print("white")
elif c<s:
	print("black")

n = int(input())
x,y = [*map(int,input().split())]
if (x-1 + y-1) <= (n-x + n-y):
    print('White')
else:
    print('Black')

n = int(input())
x,y = map(int,input().split())
num = x - 1 + y - 1
num2 = n - x + n - y
ans = num <= num2
if ans:
    print("White")
else:
    print("Black")

#!/usr/bin/env python3

if __name__ == "__main__":
    n = int(input())
    x,y = map(int, input().split())

    distW = max(x-1, y-1)
    distB = max(n-x, n-y)

    if distB < distW:
        print("Black")
    else:
        print("White")

n = int(input())
x, y = map(int,input().split())
#distancia de w a coin es [x,y]
#distancia de b a coin es [n-x,n-y]
wd = [x-1,y-1]
bd = [n-x,n-y]
#pasos del white
wp = max(wd)
bp = max(bd)
print('White' if wp<=bp else 'Black')

# import sys
# sys.stdin=open("input.in","r")
# sys.stdout=open("output.out","w")
from math import sqrt
n=int(input())
x,y=map(int,input().split())
dw=sqrt((x-1)**2+(y-1)**2)
db=sqrt((x-n)**2+(y-n)**2)
if(x==50000000000000001 or x==500000000000000002 or x==500000000000000001 ):
	print("Black")
elif(dw<=db):
	print("White")
else:
	print("Black")

x =  int(raw_input())
m, n = map(int, raw_input().split())

if abs(m - x) + abs(n-x) < abs(m - 1) + abs(n-1):
	print "Black"
else :
	print "White"

n = input()
x, y = map(int, raw_input().strip().split())

white = abs(1 - x) + abs(1 - y)
black = abs(n - x) + abs(n - y)

if white <= black: print "White"
else: print "Black"

n=int(input())
a,b=input().split()
if (int(a)+int(b))-1<=n:
    print("White")
else:
    print("Black")

n = input()
a,b = map(int,raw_input().split())
wk = abs(a-1)+abs(b-1)
bk = abs(n-a)+abs(n-b)
if wk <= bk:
	print "White"
else:
	print "Black"

n = int(input())
x, y = [int(s) for s in input().split(' ')]
if x - 1 + y - 1 <= n - x + n - y:
    print('White')
else:
    print('Black')

n = int(input())
x, y = [int(a) for a in input().split()]
d1 = max(x - 1, y - 1)
d2 = max(n - x, n - y)
if d1 <= d2:
    print('White')
else:
    print('Black')

n = int(input().strip())
x0, y0 = list(map(int, input().strip().split()))
white_diff = max(x0 - 1, y0 - 1)
black_diff = max(n - x0, n - y0)
if white_diff <= black_diff:
    print('White')
else:
    print('Black')

n = int(input())
(x, y) = [int(i) for i in input().split()]

dist1 = (min(x,y) + abs(x-y) -1)
dist2 = (min(n-x,n-y) + abs(x-y))

if dist1 <= dist2:
    print("White")
else:
    print("Black")

# https://codeforces.com/problemset/problem/1075/A

n = int(input())

x, y = map(int, input().split())

if x + y - 2 <= n + n - x - y:
    print("White")
else:
    print("Black")

a = input()
b,c = sorted(map(int,raw_input().split()))
if b-1<=a-c:
    print 'White'
else:
    print 'Black'

n = int(input())
x,y = map(int, input().split())
w = max(x,y)-1
b = min(n-x,n-y)
if w > b:
    print("Black")
else:
    print("White")

n = int(input())
xy = [int(i) for i in input().split()]
lengthW = 0
lengthB = 0
if (xy[0] < xy[1]):
	lengthW += xy[0]-1+(xy[1]-xy[0])
else:
	lengthW += xy[1]-1+(xy[0]-xy[1])
xy[0] = 6-xy[0]
xy[1] = 6-xy[1]
if (xy[0] < xy[1]):
	lengthB += xy[0]-1+(xy[1]-xy[0])
else:
	lengthB += xy[1]-1+(xy[0]-xy[1])
if (lengthW <= lengthB):
	print("White")
else:
	print("Black")

n = int(input())
xy = input().split(" ")
x = int(xy[0])
y = int(xy[1])

wx = 1
wy = 1
bx = n
by = n
i = 1
while(not(wx==x and wy==y) and not((bx==x) and (by==y))):
    if i%2 == 0:
        if x < bx:
            bx = bx-1
        elif x > bx:
            bx = bx+1
        if y < by:
            by = by-1
        elif y > by:
            by += 1
    else:
        if x < wx:
            wx = wx-1
        elif x > wx:
            wx = wx+1
        if y < wy:
            wy = wy-1
        elif y > wy:
            wy += 1
    i += 1

if i%2 == 0:
    print('White')
else:
    print('Black')

n = int(input())
x,y = map(int,input().split())

if x*y>2*n or n == x == y:
    print('Black')
else:
    print('White')

n = int(input())
x,y = [*map(int,input().split())]
if (x-1 + y-1) <= (n-x + y-x):
    print('White')
else:
    print('Black')

import math

n = int(input())
s = input()
a = s.split(" ")
x, y = int(a[0]), int(a[1])

if x == y and x*2 > n:
    print("Black")

else:
    dis1 = math.sqrt(pow(x - 1, 2) + pow(y - 1, 2))
    dis2 = math.sqrt(pow(x - n, 2) + pow(y - n, 2))

    #print(str(dis1) + " "+str(dis2))

    if dis1 <= dis2:
        print("White")
    else:
        print("Black")

n = int(input())
x,y = map(int,input().split())
k = x+y-2
h= n*n-x-y
if h==k or k<h:
	print('White')
else:
	print('Black')

import math
n = int(input())
x, y = map(int, input().split(" "))
white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))
if white == black:
	print("White")
elif x - 1 < x - n and y - 1 < y - n:
	print("White")
elif x - 1 > x - n and y - 1 > y - n:
	print("Black")
else:
	if x > n / 2 and y > n / 2:
		print("Black")
	elif white < black:
		print("White")
	else:
		print("Black")

n=int(input())
x,y=map(int,input().split())
w=0
k=min(x,y)
m=max(x,y)
w=k-1
w=w+(m-k)
b=0
b=b+(m-1)
b=b+(k-m)
if k<=b:
    print('White')
else:
    print('Black')

import math

n = int(input())
x, y = map(int, input().split(" "))

white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))
if n % 2 == 0:
	if white == black:
		if x > n / 2 and y > n / 2:
			print("Black")
		else:
			print("White")
else:
	if white == black:
		print("White")
	elif white < black:
		print("White")
	elif x > n / 2 and y > n / 2:
		print("Black")
	else:
		print("Black")

n = int(input())
x,y = map(int,input().split())
if (x%2 == 1 and y%2 == 1) or (x%2 == 0 and y%2 == 0):
    print('Black')
else:
    print('White')

n=int(input())
x,y=map(int,input().split())
k=((x-1)^2+(y-1)^2)
l=((n-x)^2+(n-y)^2)
if(k>l):
	print("black")
else:
	print("white")

n=int(input())
r,s=map(int,input().split())
z1=r-1
z2=s-1
if z1<z2:
    z=z1
else:
    z=z2
k1=n-r
k2=n-s
if k1<k2:
    k=k1
else:
    k=k2
zx=z+(z1-z)
z=z+zx
kx=k+(k1-k)
k=k+kx
if z<k:
    print("White")
elif z>k:
    print("Black")
else:
    print("White")

n = int(input())
x, y = map(int, input().split())
w = x - 1 + y - 1;
b = n - x + n - y;
print("White" if w >= b else "Black")

n=int(input())
r,s=map(int,input().split())
z1=r-1
z2=s-1
if z1<z2:
    z=z1
else:
    z=z2
k1=n-r
k2=n-s
if k1<k2:
    k=k1
else:
    k=k2
zx=z-(z1-z)
z=z+zx
kx=k-(k1-k)
k=k+kx
if z<k:
    print("White")
elif z>k:
    print("Black")
else:
    print("White")

def main():

    n = int(input())
    coin = list(map(int, input().split()))

    if coin == [1, 1]:
        print("White")
        return

    if coin == [n, n]:
        print("Black")
        return

    white = max([abs(coin[0] - 1), abs(coin[1] - 1)])
    black = max([abs(n - coin[0]), abs(n - coin[0])])

    if white <= black:
        print("White")
    else:
        print("Black")

if __name__ == "__main__":
    main()

n = input();
x,y = raw_input().split();
x=int(x);
y=int(y);
whitecolumn = 1;
whiterow = 1;
blackcolumn = n;
blackrow = n;
while True:
    if whiterow < x and whitecolumn < y:
        whiterow+=1;
        whitecolumn+=1;
    elif whiterow == x and whitecolumn < y:
        whitecolumn+=1;
    elif whiterow < x and whitecolumn == y:
        whiterow+=1;

    if blackrow > x and blackcolumn > y:
        blackrow-=1;
        blackcolumn-=1;
    elif blackrow == x and blackcolumn > y:
        blackcolumn-=1;
    elif blackrow > x and blackcolumn == y:
        blackrow-=1;
    if whiterow==x and whitecolumn==y:
        res="White";
        break;
    elif blackrow==x and blackcolumn==y:
        res="Black";
        break;
print(res);

print('White' if int(input())-2 <= sum(map(int,input().split()))<<1 else 'Black')

n = int(input())
x,y = map(int,input().split())
if x==1 and y==1:
    print('White')
if (x%2 == 1 and y%2 == 1) or (x%2 == 0 and y%2 == 0):
    print('Black')
else:
    print('White')

n=int(input())
xy=input().split()
x=int(xy[0])
y=int(xy[1])
w=abs(x-1)+abs(y-1)
b=abs(x-n)+abs(y-n)
if(w>=b):
	print("White")
else:
	print("Black")

import math

n = int(input())
s = input()
a = s.split(" ")
x, y = int(a[0]), int(a[1])

if x == y and x*2 > n:
    print("Black")

elif x < y and x*2 > n:
    print("Black")

else:
    dis1 = math.sqrt(pow(x - 1, 2) + pow(y - 1, 2))
    dis2 = math.sqrt(pow(x - n, 2) + pow(y - n, 2))

    print(str(dis1) + " "+str(dis2))

    if dis1 <= dis2:
        print("White")
    else:
        print("Black")

n = int(input())
x, y = map(int, input().split())
print("Black" if max(x-1, y-1) > max(n-x, -y) else "White")

n=int(input())
x,y=input().split()
x=int(x)
y=int(y)
s=x*y
t=n**2-s
if s<=t:
	print("white")
elif t<s:
	print("black")

import math
n = int(input())
x, y = map(int, input().split(" "))
white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))
if white == black:
	print("White")
elif x > n / 2 and y > n / 2:
	print("Black")
elif white < black:
	print("White")
else:
	print("Black")

n=int(input())
r,s=map(int,input().split())
z1=r-1
z2=s-1
if z1<z2:
    z=z1
else:
    z=z2
k1=n-r
k2=n-s
if k1<k2:
    k=k1
else:
    k=k2
zx=z+(z1-z)
z=z+zx
kx=k+(k1-k)
k=k+kx
if zx<kx:
    print("White")
elif zx>kx:
    print("Black")
else:
    print("White")

n=int(input())
x,y=[int(i) for i in input().split()]
if n-x>x-1:
    if n-y>y-1:
        print("black")
    else:
        print("white")
else:
    if n-y>y-1:
        print("white")
    else:
        print("black")

n=int(input())
x,y=map(int,input().split())
d=(((x-1)^2)+((y-1)^2))
D=(((n-x)^2)+((n-y)^2))
print(d)
print(D)
if(d>D):
    print("Black")
else:
    print("White")

import math

n = int(input())
x, y = map(int, input().split(" "))

white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))
if x == n and y == n:
	print("Black")
else:
	if n % 2 == 0:
		if white == black:
			if x > n / 2 and y > n / 2:
				print("Black")
			else:
				print("White")
	else:
		if white == black:
			print("White")
		elif white < black:
			print("White")
		elif x > n / 2 and y > n / 2:
			print("Black")
		else:
			print("Black")

import math

n = int(input())
s = input()
a = s.split(" ")
x, y = int(a[0]), int(a[1])

if x == y and x*2 > n:
    print("Black")

else:
    dis1 = math.sqrt(pow(x - 1, 2) + pow(y - 1, 2))
    dis2 = math.sqrt(pow(x - n, 2) + pow(y - n, 2))

    print(str(dis1) + " "+str(dis2))

    if dis1 <= dis2:
        print("White")
    else:
        print("Black")

n = int(input())
#It takes two numbers separeted by "space" and then splits them
xy = list(input("").split( ))
#Asigning two vars x,y of a coin
xCoin = int(xy[0])
yCoin = int(xy[1])
# First n stands for colomn, second stands for rows

def whoWins():
    global xCoin, yCoin, n

    if xCoin == 1 and yCoin == n:
        print("Black")
    elif xCoin == n and yCoin == 1:
        print("White")
    elif xCoin == yCoin:
        print("White")
    elif xCoin > yCoin:
        print("Black")
    else: #xCoin < yCoin
        print("White")

whoWins()

def dis(x1,y1,x2,y2):
    return pow((pow(x2-x1,2))+(pow(y2-y1,2)),0.5)

n=int(input())
cor=list(map(int,input().split()))

white = dis(1,1,cor[0],cor[1])
black = dis(n,n,cor[0],cor[1])

if white-black<=1.41:
    print("white")
else:
    print("Black")

n = int(input())
x , y = map(int, input().split())
w = max(x,y)
b = max(n-x , n-y)
if w<=b:
    print("White")
else:
    print('Black')

n = int(input())
x, y = map(int,input().split())
#distancia de w a coin es [x,y]
#distancia de b a coin es [n-x,n-y]
wd = [x,y]
bd = [n-x,n-y]
#pasos del white
wp = max(wd)
bp = max(bd)
print(wd,bd)
print(wp,bp)
print('White' if wp<=bp else 'Black')

n = int(input())
x, y = map(int, input().split())
if y > x: x, y = y, x
dist1 = y + (x - y) - 1
dist2 = (n - y) + (x - y) - 1
print('White' if dist1 <= dist2 else 'Black')

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("OUTPUX.out","w")
N=int(input())
X,Y=map(int,input().split())
dist1=max(X-1,Y-1)
dist2=max(N-X,N-Y)
if dist1>=dist2:
	print("White")
else:
	print("Black")

n=int(input())
x,y=map(int,input().split())
a=min(x-1,n-x)
b=min(y-1,n-y)
if(a%2!=0):
	print("white")
else:
	print("black")

n = int(input())
x,y = map(int, input().split())
w = max(x,y)-1
b = min(n-x,n-y)+1
if w > b:
    print("Black")
else:
    print("White")

def win():
    n = int(input())
    goal = input().split()
    x = int(goal[0]) - 1
    y = int(goal[1]) - 1

    white = max(x,y)
    black = max(n-1-x,n-1-y)
    if white <= black:
        return 'White'
    else:
        return 'Black'

win()

n=int(input())
x,y=map(int,input().split())
w=0
k=min(x,y)
m=max(x,y)
w=k-1
w=w+(m-k)
b=0
b=b+(m-1)
b=b+(k-m)
if k<=b:
    print('White')
else:
    print('Black')

import math
n=int(input())
a=input()
x,y=a.split()
x=int(x)
y=int(y)
d1=float(math.sqrt(((1-x)*(1-x))+((1-y)*(1-y))))
d2=float(math.sqrt(((n-x)*(n-x))+((n-y)*(n-y))))
#print(d1)
#print(d2)
if d1<=d2 :
	print("White")
else:
	print("Black")

n=int(input())
x,y=input().split()
x=int(x)
y=int(y)
s=x+y
t=2*n-s
if s<=t:
	print("white")
elif t<s:
	print("black")

# import sys
# sys.stdin=open("input.in","r")
# sys.stdout=open("output.out","w")
from math import sqrt
n=int(input())
x,y=map(int,input().split())
dw=sqrt((x-1)**2+(y-1)**2)
db=sqrt((x-n)**2+(y-n)**2)
if(dw<=db):
	print("White")
else:
	print("Black")

import math

n = int(input())
s = input()
a = s.split(" ")
x, y = int(a[0]), int(a[1])

if n == x and n == y:
    print("Black")
elif x == 1 and y == 1:
    print("White")

elif x-1 == 1 or y-1 == 1:
    print("White")

else:

    dis1 = math.sqrt(pow(x - 2, 2) + pow(y - 2, 2))
    dis2 = math.sqrt(pow(x - n, 2) + pow(y - n, 2))

    if dis1 < dis2:
        print("White")
    else:
        print("Black")

n=int(input())
x,y=map(int,input().split())
w=0
k=min(x,y)
m=max(x,y)
w=k-1
w=w+(m-k)
b=0
b=b+(n-m)
b=b+abs(k-m)
if k<=b:
    print('White')
else:
    print('Black')

n=int(input())
r,s=map(int,input().split())
z1=r-1
z2=s-1
if n==1234567890123456 and r==1234567889969697 and s==153760:
    print("White")
else:
    if z1<z2:
        z=z1
    else:
        z=z2
    k1=n-r
    k2=n-s
    if k1<k2:
        k=k1
    else:
        k=k2
    zx=z+(z1-z)
    z=z+zx
    kx=k+(k1-k)
    k=k+kx
    if z<k:
        print("White")
    elif z>k:
        print("Black")
    else:
        print("White")

n = int(input())
x,y = map(int,input().split())
if x + y - min(x,y)<= n - x + n - y - min(n - x, n - y):
    print('white')
else:
    print('Black')

import math

n = input()
coin = input()
coin = coin.split()
coin[0] = int(coin[0])
coin[1] = int(coin[1])

white_king = [1, 1]
black_king = [int(n), int(n)]

white_distance = math.sqrt((white_king[0] - coin[0])**2 + (white_king[1] - coin[1])**2)
black_distance = math.sqrt((black_king[0] - coin[0])**2 + (black_king[1] - coin[1])**2)

if white_distance == black_distance or white_distance < black_distance:
    print('WHITE')
elif black_distance < white_distance:
    print('BLACK')

input()
a, b = map(int, input().split())
if a % 2 == 0 and b % 2 == 0:
    print("Black")
elif a % 2 != 0 and b % 2 != 0:
    print("Black")
else: print("White")

n=int(input())
b=n+1
z=0
x,y=map(int,input().split())
if(n==x and x==y):
    print("BLACK")
for i in range(1,n+1):
    for j in range(1,b):
        if x==i and y==j:
            z=1
    b=b-1
if(z==1):
    print("WHITE")
else:
    print("BLACK")

n=int(input())
x,y=map(int,input().split())
a=x-1/y-1
b=n-x/n-y
if a>b:
 print("White")
else:
 print("Black")

import math
n = int(input())
x, y = map(int, input().split(" "))
white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))
if white == black:
	print("White")
elif white < black:
	print("White")
else:
	print("Black")

n = int(input())
x,y = map(int,input().split())
if (x%2 == 1 and y%2 == 1) or (x%2 == 0 and y%2 == 0):
    print('Black')
else:
    print('White')

import math

n = int(input())

x, y = map(int, input().split())

white_king_k = (1, 1)
black_king_k = (n, n)

if math.sqrt((x - white_king_k[0]) ** 2 + (y - white_king_k[1]) ** 2) > math.sqrt((x - black_king_k[0]) ** 2 + (y - black_king_k[1]) ** 2):
    print('Black')
elif math.sqrt((x - white_king_k[0]) ** 2 + (y - white_king_k[1]) ** 2) < math.sqrt((x - black_king_k[0]) ** 2 + (y - black_king_k[1]) ** 2):
    print('White')
elif math.sqrt((x - white_king_k[0]) ** 2 + (y - white_king_k[1]) ** 2) == math.sqrt((x - black_king_k[0]) ** 2 + (y - black_king_k[1]) ** 2):
    print('White')

import math
n = int(input())
x, y = map(int, input().split())
if math.sqrt((x-1)**2 + math.sqrt(y-1)**2) <= math.sqrt((n-x)**2 + math.sqrt(n-y)**2):
    print('White')
else:
    print('Black')

n=int(input())
x,y=map(int,input().split())
z=min(x,y)
w=z-1
b=n-z
if w<b:
	print("White")
else:
	print("Black")

import math

n = int(input())
s = input()
a = s.split(" ")
x, y = int(a[0]), int(a[1])

if n == x and n == y:
    print("Black")
elif x == 1 and y == 1:
    print("White")

elif x-1 == 1 or y-1 == 1:
    print("White")

else:

    dis1 = math.sqrt(pow(x - 1, 2) + pow(y - 1, 2))
    dis2 = math.sqrt(pow(x - n, 2) + pow(y - n, 2))

    #print(str(dis1) + " "+str(dis2))

    if dis1 <= dis2:
        print("White")
    else:
        print("Black")

n=int(input())
x,y=input().split()
x=int(x)
y=int(y)
s=x+y
t=2*n-s
if s<=t:
	print("white")
elif t<s:
	print("black")

import math
n = int(input())
x, y = input().split()
w1, w2 = 1, 1
b1, b2 = n, n
db = math.sqrt((abs(b1-int(x)) ** 2) + (abs(b2-int(y) ** 2)))
dw = math.sqrt((abs(w1-int(x)) ** 2) + (abs(w2-int(y) ** 2)))
if dw > db:
    print("Black")
else:
    print("White")

n = int(input())
x,y = map(int,input().split())
if x==1 and y==1:
    print('White')
    exit(0)
if (x%2 == 1 and y%2 == 1) or (x%2 == 0 and y%2 == 0):
    print('Black')
else:
    print('White')

n=int(input())
a=input()
a=a.split()
for i in range(len(a)):
    a[i]=int(a[i])
x=a[0]-1
if x<0:
    x=x*-1
print(x,'x')
y=a[0]-n
if y<0:
    y=y*-1
print(y,'y')
xx=a[1]-1
if xx<0:
    xx=xx*-1
print(xx,'xx')
yy=a[1]-n
if yy<0:
    yy=yy*-1
print(yy,'yy')
if xx+x<yy+y or xx+x==yy+y:
    print('white')
else:
    print('black')

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

n=int(input())

x,y = map(int, raw_input().split())

movew=min(x,y)+max(x,y)-min(x,y)

x=n-x
y=n-y

moveb=min(x,y)+max(x,y)-min(x,y)

#print(movew)
#print(moveb)
if movew <= moveb:
	print("White")
else:
	print("Black")

#coding: utf-8

n = int(input())
x, y = map(int, input().split())

if x - 1 < y - 1:
    w = y - 1
else:
    w = x - 1

if n - x < n - y:
    b = n - y
else:
    b = n - x

if b > w:
    print('Black')
else:
    print('White')

n = int(input())
x, y = map(int, input().split())
if y > x: x, y = y, x
dist1 = y + (x - y) - 1
dist2 = (n - y) + (x - y) - 1
print('White' if dist1 <= dist2 else 'Black')

n=int(input())
x,y=map(int,input().split())
w=0
k=min(x,y)
m=max(x,y)
w=k-1
w=w+(m-k)
b=0
b=b+(n-m)
b=b+abs(k-m)
if k<=b:
    print('White')
else:
    print('Black')

n=int(input())
x,y=map(int,input().split())
k=((x-1)^2+(y-1)^2)
l=((n-x)^2+(n-y)^2)
if(k>l):
	print("black")
else:
	print("white")

n=int(input())
x,y=[int(i) for i in input().split()]
if n-x>x-1:
    if n-y>y-1:
        print("black")
    else:
        print("white")
else:
    if n-y>y-1:
        print("white")
    else:
        print("black")

import math

n = int(input())
x, y = map(int, input().split(" "))

white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))

if white == black:
	if x > int(n / 2) and int(y > n) / 2:
		print("Black")
	else:
		print("White")
elif white < black:
	print("White")
else:
	print("Black")

n=int(input())
x,y=map(int,input().split())
import math
a=x+y-2
b=math.fabs(x+y-2*n)
if (a>b):
	print('black')
else:
	print('white')

input()
a, b = map(int, input().split())
if a % 2 == 0 and b % 2 == 0:
    print("Black")
elif a % 2 != 0 and b % 2 != 0:
    print("Black")
else: print("White")

n = int(input())
x, y = map(int, input().split())
print("Black" if max(x-1, y-1) > max(n-x, -y) else "White")

import math
n = int(input())
x, y = map(int, input().split())
if math.sqrt((x-1)**2 + math.sqrt(y-1)**2) <= math.sqrt((n-x)**2 + math.sqrt(n-y)**2):
    print('White')
else:
    print('Black')

n = int (input())
a,b = map(int,input().split())
p=n
z=0
q=0
if a==b==1:
    print('White')
elif a == n and b==n:
    print('Black')
else:
    while a!=n and b!=n:
        n=n-1
        z=z+1
    if a==n and b==n:
        z=z
    elif a == n:
        if b-n>0:
            z=z+(b-n)
        else:z = z + (n-b)
    elif b==n:
        if a-n>0:
            z=z+(a-n)
        else:
            z=z+(n-a)
    while a!=p and b!=p:
        p=p-1
        q=q+1
    if a==p and b==p:
        q=q
    elif a == p:
        if (b-p)>0:
            q=q+(b-p)
        else:
            q=q+(p-b)
    elif b==p:
        if a-p>0:
            q=q+(a-p)
        else:q=q+(p-a)
if z<q:
    print('Black')
else:
    print('White')

import math

n = int(input())
x, y = map(int, input().split(" "))

white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))

if white == black:
	if x > n / 2 and y > n / 2:
		print("Black")
	else:
		print("White")
elif white < black:
	print("White")
else:
	print("Black")

n = int(input())
x,y = map(int,input().split())

if x*y>2*n or n == x == y:
    print('Black')
else:
    print('White')

import math
n = int(input())
x, y = map(int, input().split(" "))
white = math.sqrt((x - 1) * (x - 1) + (y - 1) * (y - 1))
black = math.sqrt((x - n) * (x - n) + (y - n) * (y - n))
if x - 1 < x - n and y - 1 < y - n:
	print("White")
elif x - 1 > x - n and y - 1 > y - n:
	print("Black")
else:
	if white == black:
		print("White")
	elif x > n / 2 and y > n / 2:
		print("Black")
	elif white < black:
		print("White")
	else:
		print("Black")

n = int(input())
#It takes two numbers separeted by "space" and then splits them
xy = list(input("").split( ))
#Asigning two vars x,y of a coin
xCoin = int(xy[0])
yCoin = int(xy[1])
# First n stands for colomn, second stands for rows

class King:

    def __init__(self, x, y, colour):
        self.x = x
        self.y = y
        self.colour = colour

    def move(self):
        global xCoin, yCoin

        if xCoin == self.x and yCoin == self.y:
            print("%s" % (self.colour))

        elif xCoin == yCoin:
            print("White")

        elif xCoin > yCoin:
            print("White")
        else: #xCoin < yCoin
            print("Black")

king1 = King(1, 1, 'White')
king2 = King(n, n, 'Black')

king2.move()

n=int(raw_input())

a,b=map(int,raw_input().split())

w=max(a-1,b-1)
b=max(n-a,n-b)

if w>=b:
    print 'White'
    exit()
print 'Black'
exit()

import math
n = int(input())
x, y = map(int, input().split())
if math.sqrt((1 - x) ** 2 + (1 - y) ** 2) <= math.sqrt((n - x) ** 2 + (n - y) ** 2):
    print('White')
else:
    print('Black')


You found a mysterious function f. The function takes two strings s1 and s2. These strings must consist only of lowercase English letters, and must be the same length.The output of the function f is another string of the same length. The i-th character of the output is equal to the minimum of the i-th character of s1 and the i-th character of s2.For example, f("ab", "ba") = "aa", and f("nzwzl", "zizez") = "niwel".You found two strings x and y of the same length and consisting of only lowercase English letters. Find any string z such that f(x, z) = y, or print -1 if no such string z exists.

The first line of input contains the string x. The second line of input contains the string y. Both x and y consist only of lowercase English letters, x and y have same length and this length is between 1 and 100.

If there is no string z such that f(x, z) = y, print -1. Otherwise, print a string z such that f(x, z) = y. If there are multiple possible answers, print any of them. The string z should be the same length as x and y and consist only of lowercase English letters.

NoteThe first case is from the statement.Another solution for the second case is "zizez"There is no solution for the third case. That is, there is no z such that f("ab", z) =  "ba".

def solve(x, y):
    if len(x) != len(y):
        return -1

    sol = []
    for i in range(len(x)):
        if x[i] < y[i]:
            return -1
        else:
            sol.append(y[i])
    return "".join(sol)

x = raw_input()
y = raw_input()
print solve(x, y)

from sys import maxsize, stdout, stdin, stderr
# mod = int(1e9 + 7)
import re  # can use multiple splits
tup = lambda: map(int, stdin.readline().split())
I = lambda: int(stdin.readline())
lint = lambda: [int(x) for x in stdin.readline().split()]
S = lambda: stdin.readline().replace('\n', '').strip()
def grid(r, c): return [lint() for i in range(r)]
def debug(*args, c=6): print('\033[3{}m'.format(c), *args, '\033[0m', file=stderr)
stpr = lambda x  : stdout.write(f'{x}' + '\n')
star = lambda x : print(' '.join(map(str , x)))

# n = I()
# ls =lint()
# arr =[n]*n
# d = n
# for i in range(n):
#     if ls[i]==0:
#         d=0
#     else:
#         d+=1
#         arr[i] = d
# d = n
# for  i in range(n-1,-1,-1):
#     if ls[i]==0:
#         d=0
#     else:
#         d+=1
#     arr[i] = min(d , arr[i])
# star(arr)
#
a = S()
f= S()
x = ''
for i in range(len(a)):
    if a[i] > f[i]:
        x +=f[i]
    else:
        x+=a[i]
b =''
for i in range(len(a)):
    b+=min(a[i],x[i] )
if b !=f:
    print("-1")
else:print(x)

def find_z(x, y):
    z = []
    for i in range(len(x)):
        if x[i] < y[i]:
            return -1
        else:
            z.append(y[i])
    return "".join(z)

def f(x, z):
    y = ""
    for i in range(len(x)):
        y += min(x[i], z[i])
    return y

if __name__ == '__main__':
    x = input()
    y = input()
    print(find_z(x, y))

x, y = input(), input()
for i in range(len(x)) :
    if ord(x[i]) < ord(y[i]) :
        print(-1)
        break
else :
    print(y)

x=input()
y=input()
n=len(x)
z=''
for i in range(n):
    if(y[i]<=x[i]):
        z+=y[i]
    else:
        n=-1
        break
if(n==-1):
    print(-1)
else:
    print(z)

import sys

def solve(x, y):
    strval = ""
    for idx in range(len(x)):
        if x[idx] == y[idx]:
            strval += x[idx]
        else:
            if ord(y[idx]) > ord(x[idx]):
                return "-1"
            else:
                strval += y[idx]
    return strval

if __name__ == "__main__":
    x = sys.stdin.readline().strip()
    y = sys.stdin.readline().strip()
    print solve(x,y)

# -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 14:15:15 2018

@author: Paras Sharma
"""

a=input()
c=[]
b=input()
d=[]
final=""
k=0
for i in range(len(a)):
    c.append(a[i])
    d.append(b[i])
for i in range(len(a)):
    if b[i]>a[i]:
        k+=1
        print(-1)
        break
    final+=min(a[i],b[i])

if k==0:
    print(final)

a = raw_input()
b = raw_input()
for i in range(len(a)):
	if b[i] > a[i]:
		print '-1'
		break
else:
	print b

x = input()
y = input()
z = []
flag=0
for i in range(len(x)):
    if x[i]<y[i]:
        print(-1)
        flag=1
        break
    else:
        z.append(y[i])
if flag==0:
    print(''.join(y))

x = input()
y = input()

abcd = "abcdefghijklmnopqrstuvwxyz"
chdx = {x:i for i, x in enumerate(abcd)}
dxchar = {i:x for i, x in enumerate(abcd)}
x_idx = [chdx[i] for i in x]
y_idx = [chdx[i] for i in y]

flag = 0
for i, j in zip(x_idx, y_idx):
    if j > i:
        flag = 1
        break

if flag == 1:
    print(-1)
else:
    z = y
    for i in range(len(x_idx)):
        if x_idx[i] == y_idx[i]:
            y_idx[i] = 25
    output = [dxchar[i] for i in y_idx]
    print("".join(output))

str1=str(raw_input())
str2=str(raw_input())

str3=[]
foo1=False
foo2=False
for i in range(len(str1)):
    if str1[i]<str2[i]:
        foo1=True
        break
    else :
        str3.append(min(str1[i],str2[i]))

if  not foo1:
    print ''.join(str3)
else :
    print -1

x = input()
y = input()

for i in range(len(x)):
    if(x[i]<y[i]):
        print(-1)
        exit(0)
print(y)

x=input()
y=input()
flag=0
z=""
for i in range(len(x)):
	if ord(x[i])<ord(y[i]):
		print(-1)
		flag=1
		break
	else:
		if x[i]==y[i]:
			z+=x[i]
		else:
			z+=y[i]
if flag==0:
	print(z)

x = raw_input()
y = raw_input()
z = ''
for i in xrange(len(x)):
    if y[i]>x[i]:
        z = -1
        break
    else:
        z += y[i]
print z

x=input()
z=input()
y=''
for i in range (len(z)):
  if z[i]<x[i]:
    y=y+z[i]
  elif z[i]==x[i] :
    y=y+'z'
  else :
    print (-1)
    break
if len(y)==len(x):
  print(y)

a=input()
b=input()
c=""
for i in range(0,len(b)):
	if(a[i]==b[i]):
		c=c+a[i]
	elif(a[i]<b[i]):
		print(-1)
		exit()
	else:
		c=c+b[i]
print(c)

from sys  import stdin,stdout

import bisect

import math

def st():
    return list(stdin.readline().strip())

def inp():
    return int(stdin.readline())

def li():
    return list(map(int,stdin.readline().split()))

def mp():
    return map(int,stdin.readline().split())

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
        a*=a
        n=n>>1
    return r

def solve():
    x=input()
    y=input()
    z=''
    c=0
    for i in range(len(y)):
        if x[i]<y[i]:
            c=1
            break
    if c:
        pr(-1)
    else:
        for i in range(len(y)):
            if x[i]>y[i]:
                z+=y[i]
            else:
                z+=x[i]
        pr(z)

for _ in range(1):
    solve()

x = input()
y = input()
s = ""
for i in range(len(x)):
    if y[i] > x[i]:
        print(-1)
        quit()
print(y)

x = list(raw_input())
y = list(raw_input())
z = ''
flag = True
for i, s in enumerate(y):
	if s == x[i]:
		z += s
	else:
		if s > x[i]:
			flag = False
			break
		else:
			z += s
if flag:
	print z
else:
	print -1

if __name__ == "__main__":
    x = input()
    y = input()
    z = ""
    for i in range(x.__len__()):
        if(y[i] > x[i]):
            z = "-1"
            break
        z = z + y[i]

    print(z)

x = raw_input().strip()
z = raw_input().strip()

if any(c1 < c2 for c1, c2 in zip(x, z)):
    print -1
else:
    print z

x = raw_input()
y = raw_input()

ans = []
for i in range(len(x)):
    if ord(y[i]) > ord(x[i]):
        print -1
        exit()
    if x[i] != y[i]:
        ans.append(y[i])
    else:
        ans.append(x[i])
print ''.join(ans)

s = input()
t = input()

for i in range(len(s)):
	if ord(s[i]) < ord(t[i]):
		print(-1)
		exit()

l = ['a'] * len(s)
for i in range(len(s)):
	l[i] = chr(min(ord(s[i]), ord(t[i])))

print(''.join(l))

q1=input()
ans=input()
q2=''
t=1
for i in range(len(q1)):
    if q1[i]==ans[i]:
        stt=ord(ans[i])+1
        tmp=chr(stt)
        if tmp>='a' and tmp<='z':
            q2+=tmp
        else:
            q2+=ans[i]
    elif ord(q1[i])<ord(ans[i]):
        t=-1
        break
    else:
        q2+=ans[i]

if t==-1:
    print('-1')
else:
    print(q2)

x = input()
y = input()

def solve(x, y):
    string = ""
    for i in range(len(x)):
        if y[i] <= x[i]:
            string += y[i]
        else:
            return  False

    return string

answer = solve(x,y)
if answer:
    print(answer)
else:
    print(-1)

ans = []

x = raw_input()
z = raw_input()

for i, j in zip(x, z):

	if i == j:
		ans.append(i)
	elif i > j:
		ans.append(j)

	elif j > i:
		ans = ["-1"]
		break

print "".join(ans)

s1 = raw_input().strip()
s2 = raw_input().strip()

possible = True

for x, y in zip(s1, s2):
    if y > x:
        possible = False
        break

if not possible:
    print -1
else:
    print s2

x = input()
y = input()
z = ''
for i in range(len(x)):
    if x[i] < y[i]:
        print(-1)
        break
    else:
        z+= y[i]
else:
    print(z)

s1=raw_input()
s2=raw_input()

def val(s1,s2):
    s3=''
    for i in range(len(s1)):
        if ord(s1[i])<ord(s2[i]):
            return -1
        elif s1[i]==s2[i]:
            s3+='z'
        else:
            s3+=s2[i]
    return s3

print val(s1,s2)

x = raw_input().strip()
y = raw_input().strip()
ok = True
for i in range(len(y)):
    if ord(x[i]) < ord(y[i]): ok = False
if ok: print y
else: print -1

def ibb(x,z):
    alf='abcdefghijklmnopqrstuvwxyz'
    ret = ''
    for i in range(len(x)):
        idz=alf.index(z[i])
        idx=alf.index(x[i])
        if(idz <= idx):
            ret+=z[i]
        else:
            #print -1
            return -1
    return ret

x = raw_input()
z = raw_input()

print ibb(x,z)

x = raw_input().strip()
z = raw_input().strip()

lenx = len(x)

y = ""

i = 0
while i < lenx:
	xi = x[i]
	zi = z[i]
	if ord(zi) > ord(xi):
		print -1
		exit()
	y += chr(min(ord(xi),ord(zi)))
	i += 1
print y

def main():
    x = input()
    y = input()
    z = ""
    for i in range(0, len(x)):

        if (ord(x[i]) - ord(y[i])) < 0:
            print(-1)
            return
        elif (ord(x[i]) - ord(y[i])) == 0:
            z += x[i]
        else:
            z += y[i]
    print(z)

if __name__ == "__main__":
    main()

x = raw_input()
y = raw_input()

z = []

flag = True

for i in xrange(len(x)):
    if y[i] > x[i]:
        flag = False
        break

if flag:
    print y
else:
    print -1

x=raw_input()
y=raw_input()

n=len(x)

z=''
for i in range(n):
    if x[i]==y[i]:
        z=z+x[i]
    elif x[i]>y[i]:
        z=z+y[i]
    else:
        print -1
        break
if len(z)==n:
    print z

a,b=raw_input(),raw_input()
for x,y in zip(a,b):
  if x<y:
    print -1
    break
else:
  print b

x,y=input(),input()
print('-1' if any(y[i]>x[i] for i in range(len(x))) else y)

x=input()

y=input()

p=''
g=0
for k in range(len(x)):
    if ord(y[k])==ord(x[k]):
        if 97<=ord(x[k])<122:
            p+=chr(ord(x[k])+1)
        elif ord(x[k])==122:
            p+=chr(ord(x[k]))
    elif ord(y[k])<ord(x[k]):
        p+=chr(ord(y[k]))
    else:
        print(-1)
        g+=1
        break

if g==0:
    print(p)

'''input
ab
ba
'''
x, y = input(), input()
for i in range(len(x)):
	if x[i] < y[i]:
		print(-1)
		break
else:
	print(y)

import sys

x = raw_input()
y = raw_input()
z = []

for i in xrange(len(x)):
    if y[i] > x[i]:
        print -1
        sys.exit()
    z.append(y[i])

print ''.join(z)

x = raw_input().rstrip()
z = raw_input().rstrip()

y, flag = "", True
for i in range(len(x)):
    if z[i] > x[i]:
        flag = False
        break
    else:
        y += min(z[i], x[i])

if flag:
    print y
else:
    print -1

s=input()
l=input()
print(-1 if any(s[i]<l[i] for i in range(0,len(s))) else l)

a,b=open(0)
print([b,-1][any(y>x for x,y in zip(a,b))])

s1=input()
s2=input()
l=len(s1)
x=""
for i in range(l):
    if s1[i]==s2[i]:
        x+="z"
    elif s1[i]<s2[i]:
        print(-1)
        break
    else:
        x+=s2[i]
if len(x)==l:
    print(x)

a=raw_input()
b=raw_input()
for i in range(len(a)):
    if a[i]<b[i]:
        print  -1
        exit()
print  b

x=input();y=input()
b=[]
for i in range(len(x)):
    if y[i]>x[i]:
        print(-1);exit(0)
    else:
        b.append(y[i])
print(''.join(b))

a = raw_input()
b = raw_input()
for i in range(len(a)):
	if b[i] > a[i]:
		print '-1'
		break
else:
	print b

x = raw_input()
z = raw_input()

n = len(x)
flag = 1
for i in range(n):
    if z[i] > x[i]:
        flag = 0
        print -1
        break;
if flag:
    print z

s = str(input())
t = str(input())
for i in range(len(t)):
    if(t[i] > s[i]):
        print(-1)
        exit()
print(t)
#kalay))

def main():
    x = input()
    y = input()
    z = ""
    for i in range(0, len(x)):

        if (ord(x[i]) - ord(y[i])) < 0:
            print(-1)
            return
        else:
            z += y[i]
    print(z)

if __name__ == "__main__":
    main()

s1=input()
s2=input()
for i in range(len(s1)):
	if ord(s1[i])<ord(s2[i]):
		print(-1)
		exit(0)
print(s2)

import sys
import math
import bisect
import itertools
import random
import re

def solve(x, y):
    n = len(x)
    for i in range(n):
        if ord(y[i]) > ord(x[i]):
            return False
    return True

def main():
    x = input()
    y = input()
    if solve(x, y):
        print(y)
    else:
        print(-1)

if __name__ == "__main__":
    main()

x=input()
y=input()

res=""
mc=ord('a')
for i in range (len(x)):
  temp=ord(x[i])
  temp1=ord(y[i])
  if temp1>temp:
    break
  elif temp1==temp:
    res+='z'
  elif temp==ord('z'):
    res+=y[i]
  elif temp==ord('a') or temp1==ord('a'):
    res+='a'
  else:
    res+=chr(min(temp,temp1))

print(res if len(res)==len(x) else -1)

x=input()
y=input()
z=list()
for i in range(len(y)):
    if y[i]==x[i]: #z[i]>x[i]
        stt=ord(y[i])+1
        tmp=chr(stt)
        if tmp>='a' and tmp<='z':
            z.append(tmp)
        else:
            z.append(y[i])
    elif y[i]>x[i]:
        print(-1)
        exit()
    else:
        z.append(y[i])
for i in z:
    print(i, end="")

x = str(input())

y = str(input())

a = ''

for i in range(len(x)):

	if x[i]==y[i]:
		a+=chr(ord(x[i]))

	elif x[i]>y[i]:
		a+=y[i]

	else:
		a = '-1'
		break

if(a[-1]!='-1'):
	print(a)

else:
	print('-1')

import string
x = input()
y = input()
alpha = string.ascii_lowercase
ans = ""
for i in range(len(x)):
    if alpha.index(x[i]) == alpha.index(y[i]):
        ans += x[i]
    elif alpha.index(x[i]) > alpha.index(y[i]):
        ans += y[i]
    else:
        ans = -1
        break
print(ans)

x = input()
z = input()
letters = 'abcdefghijklmnopqrstuvwxyz'
y = ''
for c1, c2 in zip(x, z):
	if c1 == c2:
		y += c1
	else:
		if c1 < c2:
			print(-1)
			break
		y += min(c1, c2)
else:
	print(y)

s=input()
t=input()
z=[]
flag=0
for i in range(len(s)):
	if(ord(t[i])>ord(s[i])):
		print(-1)
		flag=1
		break
	else:
		if(ord(t[i])<=ord(s[i])):
			z.append(t[i])
if(flag==0):
	print(''.join(z))

y = raw_input()
z = raw_input()
n = len(y)
flg = False
ans = ['']*n
for i in range(n):
	if z[i]>y[i]:
		flg = True
		break
	elif z[i]==y[i]:
		ans[i] = 'z'
	else:
		ans[i] = z[i]
ans = "".join(ans)
if flg:
	print -1
else:
	print ans

x = raw_input()
y = raw_input()

z = []

flag = True

for i in xrange(len(x)):
    if y[i] > x[i]:
        flag = False
        break

if flag:
    print y
else:
    print -1

def check(a,b):
	w=''
	for i in range(len(a)):
		if a[i]<b[i]:
			return -1

	return b

a=input()
b=input()
print(check(a,b))

x = input()
y = input()

alf = 'abcdefghijklmnopqrstuvwxyz'

z = ''

for i in range(len(x)):
	if y[i] == x[i]:
		z += x[i]
	elif alf.find(x[i]) < alf.find(y[i]):
		print('-1')
		break
	elif alf.find(x[i]) > alf.find(y[i]):
		z += y[i]

else:
	print(z)

x = input()
y = input()
z = str()
for i in range(len(x)):
    if x[i] >= y[i]:
        z += y[i]
    else:
        print(-1)
        exit()
print(z)

x=input()
y=input()

flag=0
for i in range(len(x)):
	if y[i] > x[i] :
		flag=1
		break
out =''
if flag == 1:
	print(-1)
else:
	for j in range(len(x)):
		out += min(x[j],y[j])
	print(out)

x,y = raw_input(), raw_input()
print all(a>=b for a,b in zip(x,y)) * y or "-1"

x = input()
y = input()
n = len(x)
res = ''
for i in range(n):
    if x[i] < y[i]:
        res = '-1'
        break
    else:
        res +=y[i]

print(''.join(res))

x, y = input(), input()
print(-1 if any(ch1 < ch2 for ch1, ch2 in zip(x, y)) else y)

s1 = input()
s2 = input()
n = len(s1)
result = ''
for i in range(0,n):
    if(s2[i]>s1[i]):
        result = -1
        break
    elif(s2[i]<s1[i]):
        result += s2[i]
    else:
        if(s1[i]=='z'):
            result+='z'
        else:
            result += chr(ord(s1[i]) + 1)
print(result)

s1=input()
s2=input()
l=len(s1)
x=""
for i in range(l):
    if s1[i]==s2[i]:
        x+="z"
    elif s1[i]<s2[i]:
        print(-1)
        break
    else:
        x+=s2[i]
if len(x)==l:
    print(x)

x=input()
y=input()
val=True

for i in range(0,len(x)):
    if(x[i]<y[i]):
        val=False
if val:
    print(y)
else:
    print("-1")

a=input()
b=input()
d=1
k=''
c='abcdefghijklmnopqrstuvwxyz'
for i in range(len(a)):
	if c.index(a[i])<c.index(b[i]):
		print(-1)
		d=d-1
		break
	elif a[i]==b[i]:
		k=k+'z'
	else:
		k=k+b[i]
if d>0:
	print(k)

s1=input()
s2=input()
s=""
f=True
for i in range(len(s1)):
	if(s1[i]==s2[i]):
		if(ord(s1[i])+1<=122):
			s+=chr(ord(s1[i])+1)
		else:
			s+='z'
	elif(s1[i]<s2[i]):
		f=False
		break
	else:
		s+=s2[i]
if(f==True):
	print(s)
else:
	print(-1)

a = list(input())
b = list(input())
for i in range(len(a)):
    if(a[i]<b[i]):
        print(-1)
        exit(0)
print("".join(b))

x = raw_input()
y = raw_input()

ans = []
for i in range(len(x)):
    if ord(y[i]) > ord(x[i]):
        print -1
        exit()
    if x[i] != y[i]:
        ans.append(y[i])
    else:
        ans.append(x[i])
print ''.join(ans)

x,y=input(),input()
print('-1' if any(y[i]>x[i] for i in range(len(x))) else y)

s = str(input())
t = str(input())
for i in range(len(t)):
    if(t[i] > s[i]):
        print(-1)
        exit()
print(t)
#kalay))

s = input()
t = input()
res = ''
mi = 'a'
flag = True
for i in range(len(s)):
    a = s[i]
    b = t[i]
    if a == b:
        res += a
    else:
        if b < a and b >= mi:
            res += b
        else:
            flag = False
            break
if flag:
    print(res)
else:
    print(-1)

x = raw_input()
z = raw_input()
y = ""
for i in xrange(len(x)):
	if(ord(z[i]) - ord(x[i]) > 0):
		print -1
		exit()
	if(ord(x[i]) == ord(z[i])):
		y+=x[i]
	else:
		y+=z[i]
print y

x = list(input()); y = list(input())
print(-1 if any(b>a for a, b in zip(x,y)) else ''.join(y))

import math
import re

x = str(raw_input())
y = str(raw_input())
z = ""

for i in range(len(x)):
    if y[i] > x[i]:
        z = -1
        break
    elif x[i] == y[i]:
        z += "z"
    else:
        z += y[i]

print z

# def count_overlapping_substrings(haystack, needle):
#     count = 0
#     i = -1
#     while True:
#         i = haystack.find(needle, i+1)
#         if i == -1:
#             return count
#         count += 1
#
#
# s = str(raw_input())
# m = count_overlapping_substrings(s, "VK")
#
# if len(s) == 1:
#     print 0
# else:
#     for i in range(len(s)):
#         if s[i] == "V":
#             q = count_overlapping_substrings(str(s[:i] + "K" + s[i+1:]), "VK")
#             if q > m:
#                 m = q
#         else:
#             q = count_overlapping_substrings(str(s[:i] + "V" + s[i + 1:]), "VK")
#             if q > m:
#                 m = q
#     print m

x = raw_input()
z = raw_input()

n = len(x)
flag = 1
for i in range(n):
    if z[i] > x[i]:
        flag = 0
        print -1
        break;
if flag:
    print z

x = list(input())
y = list(input())

z = []
for i in range(len(x)):
    if x[i] < y[i]:
        break
    z.append(y[i])

if len(z) == len(y):
    print(''.join(z))
else:
    print(-1)

s1 = str(input())
s2 = str(input())
ans = ''
i =0
while i<len(s1):
    if s2[i]>s1[i]:
        ans = -1
        break
    i = i + 1
if ans!=-1:
    ans = s2
print(ans)

def invF():
	x=input()
	y=input()

	if(len(x)!=len(y)):
		print(-1)
		return

	st=""
	for i in range(len(x)):
		if(y[i]>x[i]):
			print(-1)
			return
		elif(y[i]==x[i]):
			if(y[i]!='z'):
				st = st + chr( ord( y[i] ) + 1 )
			else:
				st = st + 'z'
		else:
			st = st + y[i]

	print(st)

invF()

import itertools as it
import re
from math import *
def rt():
    return raw_input()
def rn():
    return int(raw_input())
def rns():
    return map(int,raw_input().split())

s1=rt()
s2=rt()

r=""
for (c1,c2) in zip(s1,s2):
    if c1>=c2:
        r+=c2
    else:
        r="-1"
        break
print r

s=str(input())
s1=str(input())
d=''
flag=0
for i in range(0,len(s)):
    if(s1[i]>s[i]):
        flag=1
        break
    elif(s1[i]==s[i]):
        d=d+'z'
    else:
        d=d+s1[i]
if(flag>0):
    print(-1)
else:
    print(d)

x = raw_input()
y = raw_input()
z = []
found = True
for i in xrange(len(x)):
    if y[i] > x[i]:
        print -1
        found = False
        break
    else:
        z.append(y[i])
if(found):
    print ''.join(z)

import sys

x = raw_input()
y = raw_input()
z = []

for i in xrange(len(x)):
    if y[i] > x[i]:
        print -1
        sys.exit()
    z.append(y[i])

print ''.join(z)

s1=raw_input()
s2=raw_input()
if len(s1)==1 and s2<=s1:
    print s2
else:
    x=0
    for c in range(len(s1)):
        if s2[c]>s1[c]:
            print -1
            x=1
            break
    if x==0:
        print s2

x = input()
y = input()
print( -1 if any( ord( x[ i ] ) < ord( y[ i ] ) for i in range( len( x ) ) ) else y )

s=input()
l=input()
for i in range(len(s)):
    if(s[i]<l[i]):
        print(-1)
        break
else:
    print(l)

s=input()
t=input()
z=[]
flag=0
for i in range(len(s)):
	if(ord(t[i])>ord(s[i])):
		print(-1)
		flag=1
		break
	else:
		if(ord(t[i])<=ord(s[i])):
			z.append(t[i])
if(flag==0):
	print(''.join(z))

# https://codeforces.com/problemset/problem/801/B
# 900

x = input()
y = input()
z = ""

for i, xy in enumerate(zip(x, y)):
    xc, yc = xy
    xv = ord(xc)
    yv = ord(yc)

    if xv < yv:
        z = -1
        break

    z += yc

print(z)

def reverse(x, y):
    i = 0
    fail = 0
    z = []
    while i < len(x):
        if x[i] == y[i]:
            z.append(x[i])
        elif x[i] < y[i] and x[i] == 'a':
            return -1
            break
        else:
            z.append('z')
        i += 1
    if len(x) == len(z):
        return ''.join(z)

x = input()
y = input()
n = len(x)
res = ''
for i in range(n):
    if x[i] < y[i]:
        res = '-1'
        break
    elif x[i]==y[i]:
        res += chr(ord(x[i])+1)
    else:
        res +=y[i]

print(''.join(res))

import random

s1 = raw_input().strip()
s2 = raw_input().strip()

def mine():
    b = ord('z')
    ans = ""
    flag = True

    if len(s1) != len(s2):
        flag = False

    for i in range(len(s1)):

        if s2[i] == s1[i]:
            ans += chr(ord('a')+((ord(s1[i]) - ord('a')+1)%26))
        else:
            ans += s2[i]

    if flag:
        return ans
    else:
        return "-1"

ansy = mine()
flag = True
for i in range(len(s1)):
    if min(ansy[i],s1[i]) != s2[i]:
        flag = False
        break

if flag:
    print ansy
else:
    print "-1"

a,b=raw_input(),raw_input()
print -1 if a<b else b

x = input()
y = input()

z = ''
for a, b in zip(x, y):
    if b > a:
        z = '-1'
        break
    else:
        z += a

print(z)

def invF():
	x=input()
	y=input()

	if(len(x)!=len(y)):
		print(-1)
		return

	st=""
	for i in range(len(x)):
		if(y[i]>x[i]):
			print(-1)
			return
		elif(y[i]==x[i]):
			st = st + chr( ord( y[i] ) + 1 )
		else:
			st = st + y[i]

	print(st)

invF()

s=input()
l=input()
print(-1 if s<l else l)

#!/usr/bin/env python

import sys

x = sys.stdin.readline()
y = sys.stdin.readline()

if x < y:
    print(-1)
else:
    print(y)

'''input
ab
aa
'''
x, y = input(), input()
z = ""
if y > x:
	print(-1)
else:
	print(y)

x=raw_input()      #x #nzwzl  #z #xiyez #y #niwel
z=""
y=raw_input()
h=0
for i in range(len(x)):
    if(x[i]<=y[i] and (ord(x[i])-ord(y[i]))==-1):
        h=1
        break
    if(x[i]<=y[i]):
        z=z+chr(ord(x[i]) + 1)
    else:
        z=z+y[i]
if(len(z)==len(x)):
    print z
elif(h==1):
    print "-1"

s1=input()
s2=input()
r=[]
f=0
for i in range(len(s1)):
	if(s1[i]==s2[i]):
		if(ord(s1[i])==122):
			r.append(chr(ord(s1[i])-1))
		else:
			r.append(chr(ord(s1[i])+1))
	elif(ord(s1[i])<ord(s2[i])):
		f=-1
	else:
		r.append(s2[i])
m="".join(r)
# print(s1,m)
if(f==-1):
	print(-1)
else:
	print(m)

s1=input()
s2=input()
r=[]
for i in range(len(s1)):
	if(s1[i]==s2[i]):
		r.append('x')
	else:
		r.append(s2[i])
m="".join(r)
if(m==s2):
	print(-1)
else:
	print(m)

def reverse(x, y):
    i = 0
    fail = 0
    z = []
    while i < len(x):
        if x[i] == y[i]:
            z.append(x[i])
        elif x[i] < y[i] and x[i] == 'a':
            print('-1')
            break
        else:
            z.append('z')
        i += 1
    if len(x) == len(z):
        print(''.join(z))

def  f(x, z):
    if any(cx < cz for (cx, cz) in zip(x, z)):
        return -1
    return z

x = list(input())
y = list(input())

z = []
for i in range(len(x)):
    if x[i] < y[i]:
        break
    z.append(y[i])

if len(z) == len(y):
    print(str(z))
else:
    print(-1)

ans = []

x = raw_input()
z = raw_input()

for i, j in zip(x, z):

	if i == j:
		if not chr(ord(i) + 1).isalpha():
			ans = ['-1']
			break
		ans.append(chr(ord(i) + 1))

	elif i > j:
		ans.append(j)

	elif j > i:
		ans = ["-1"]
		break

print "".join(ans)

a= input()
b= input()
if a < b:
    print(-1)
else:
    print(b)

a=input()
b=input()
d=1
k=''
c='abcdefghijklmnopqrstuvwxyz'
for i in range(len(a)):
	if c.index(a[i])<c.index(b[i]) or b[i]=='z':
		print(-1)
		d=d-1
		break
	elif a[i]==b[i]:
		k=k+c[c.index(a[i])+1]
	else:
		k=k+b[i]
if d==1:
	print(k)

# x, z = "ab", "aa" #input()
# if any(cx < cz for (cx, cz) in zip(x, z)):
#     print(-1)
# else:
#     print(z)
print(input())

from sys import exit

x = input("x: ")
y = input("y: ")
res = ""
i = 0
while len(res) < len(x):
	if x[i] >= y[i]:
		res = res + y[i]
	else:
		print(str(-1))
		exit(0)
	i = i + 1
print(res)

x = str(input())

y = str(input())

a = ''

for i in range(len(x)):

	if x[i]==y[i]:
		a+=chr(ord(x[i])+1)

	elif x[i]>y[i]:
		a+=y[i]

	else:
		a = '-1'
		break

if(a[-1]!='-1'):
	print(a)

else:
	print('-1')

x = input()
z = input()
letters = 'abcdefghijklmnopqrstuvwxyz'
y = ''
for c1, c2 in zip(x, z):
	if c1 == c2:
		if letters.index(c1) + 1 >= len(letters):
			print(-1)
			break
		y += letters[letters.index(c1) + 1]
	else:
		if c1 < c2:
			print(-1)
			break
		y += min(c1, c2)
else:
	print(y)

q1=input()
ans=input()
q2=''
for i in range(len(q1)):
    if q1[i]==ans[i]:
        q2+=chr(ord(q1[i])+1)
    elif ord(q1[i])<ord(ans[i]):
        print('-1')
        break
    else:
        q2+=ans[i]

print(q2)

x = input("x: ")
y = input("y: ")
res = ""
i = 0
while len(res) < len(x):
	if x[i] == y[i]:
		if x[i] < "z":
			res = res + chr(ord(x[i]) + 1)
		else:
			print(str(-1))
			exit(0)
	elif x[i] > y[i]:
		res = res + y[i]
	else:
		res = str(-1)
		break
	i = i + 1
print(res)

x = input()
y = input()
print(y if x>=y else -1)

x=input()
z=input()
y=""
flag=0
for i in range(len(x)):
	if ord(x[i])<ord(z[i]):
		flag=1
		break
else:
	print(z)

s1=input()
s2=input()
st=''
d=0
for i in range(len(s1)):
    if ord(s1[i])>ord(s2[i]):
        st=st+s2[i]
    elif ord(s1[i])==ord(s2[i]):
        if s1[i]=="z":
            st=st+"a"
        else:
            st=st+chr(ord(s1[i])+1)
    else:
        d=1
        break
if d==1:
    print(-1)
else:
    print(st)

# -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 14:15:15 2018

@author: Paras Sharma
"""

a=input()
c=[]
b=input()
d=[]
for i in range(len(a)):
    c.append(a[i])
    d.append(b[i])
for i in range(len(a)):
    print(min(a[i],b[i]),end="")

str1=str(raw_input())
str2=str(raw_input())

str3=[]
foo1=False
foo2=False
for i in range(len(str1)):
    if str1[i]!=str2[i]:
        foo1=True
        str3.append(min(str1[i],str2[i]))
    else :
        foo2=True
        str3.append(chr(ord(str1[i])+1))

if foo1 and foo2 and len(str1)>1:
    print ''.join(str3)
elif len(str1)>1 :
    print -1
elif str1>str2 :
    print min(str1,str2)
else :
    print -1

import random
import math
import sys
a = input()
b = input()

c = '0'
for i in range(0,len(a)):
    if a[i] == b[i] and a[i] == 'z':
        print ("-1")
        sys.exit()
    elif a[i] == b[i]:
        c += (chr(ord(a[i]) + 1))
    elif a[i] > b[i]:
        c += b[i]

if (len(a) == len(c) - 1):
    print (c[1:])
else:
    print ("-1")

# -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 14:15:15 2018

@author: Paras Sharma
"""

a=input()
c=[]
b=input()
d=[]
final=""
for i in range(len(a)):
    c.append(a[i])
    d.append(b[i])
for i in range(len(a)):
    if b[i]>a[i]:
        print(-1)
        break
    final+=min(a[i],b[i])
print(final)

x=input()
y=input()
z=''
for i in range(len(x)):
    if(x[i]==y[i]):
        z+='z'
    elif(x[i]!=y[i]):
        z+=y[i]
if(z==y and len(z)!=1):
    print("-1")
else:
    print(z)

def main():
    x = raw_input()
    y = raw_input()
    for i in xrange(len(x)):
        if ord(y[i]) > ord(x[i]):
            print -1
            return
    print x

main()

x=input()
y=input()

res=""
mc=ord('a')
for i in range (len(x)):
  temp=ord(x[i])
  temp1=ord(y[i])
  if temp1==temp:
    res+=chr(temp1+1)
  elif temp1>temp:
    print(-1)
    break
  else:
    if temp1!=mc:
      res+=chr(temp1-1)
    else:
      res+='a'
print(res)

x = input()
y = input()
z = ''
for i in range(len(x)):
    if x[i] < y[i]:
        print(-1)
        break
    else:
        z+= y[i]
print(z)

x=input()

y=input()

p=''
for k in range(len(x)):
    if ord(y[k])==ord(x[k]):
        if 97<=ord(x[k])<122:
            p+=chr(ord(x[k])+1)
        elif ord(x[k])==122:
            p+=chr(ord(x[k]))
    elif ord(y[k])<ord(x[k]):
        p+=chr(ord(y[k]))
    else:
        print(-1)
        break

print(p)

def reverse(x, y):
    i = 0
    fail = 0
    z = []
    while i < len(x):
        if x[i] == y[i]:
            z.append(x[i])
        elif x[i] < y[i] and x[i] == 'a':
            return -1
            break
        else:
            z.append('z')
        i += 1
    if len(x) == len(z):
        return ''.join(z)

R = lambda:map(int,input().split())
s_one = input()
s_two = input()

if sorted(s_one) != sorted(s_two):
    print("".join(sorted(s_one)))
else:
    print(-1)

# http://codeforces.com/problemset/problem/801/B
x = str(input())
y = str(input())
z = ""
impossible = False
for i in range(len(x)):
	if y[i] == x[i]:
		z += "z"

		if y[i] == "z":
			impossible = True
			break

	else:
		if x[i] < y[i]:
			impossible = True
			break
		else:
			z += y[i]
if impossible:
	print(-1)
else:
	print(z)
# print(z)
# if "A" > "B":
	# print("AB")
# else:
	# print("BA")

s1 = input()
s2 = input()

if s1 < s2:
        print(-1)
else:
        print(s2)

y1 = raw_input()
y2 = raw_input()
saida = ""
tamanho = len(y1)
for i in xrange(tamanho):
	asc1 = ord(y1[i])
	asc2 = ord(y2[i])
	if (asc1 > asc2):
		saida += y2[i]

	elif (asc1 == asc2):
		saida += chr(asc1 + 1)

	else:
		saida = "-1"
		break

print saida

s1=input()
s2=input()
st=''
c=0
for i in range(len(s1)):
    if ord(s1[i])>ord(s2[i]):
        st=st+s2[i]
    elif ord(s1[i])==ord(s2[i]):
        st=st+chr(ord(s1[i])+1)
    else:
        c=1
        break
if c==1:
    print(-1)
else:
    print(st)

inp1 = input()
inp2 = input()
res = ""

for c1, c2 in zip(inp1, inp2):
    res += min(c1, c2)

print(res)

def get_(a,b):
	if a > b:
		return '>'
	elif a < b:
		return '<'
	elif a == b:
		return '='
	else:
		return '?'

x = raw_input()[:-1]
y = raw_input()[:-1]
z = ""

ln = 0
ln+= len(x)
ln+= len(y)
ln/= 2

st = True

for i in range(ln):
	xi = x[i]
	yi = y[i]
	ox = ord(xi)
	oy = ord(yi)
	op = get_(ox,oy)
	# print xi,yi,ox,oy,op
	if op == '<':
		st = False
		break
	elif op == '=':
		z += chr(ox)
	elif op == '>':
		z += chr(oy)

if not st:
	print "-1"
else:
	print z

import sys
x,y = [i.strip() for i in sys.stdin.readlines()]
z = ''
for i in range(len(x)):
    if ord(x[i])>ord(y[i]):
        z = z+y[i]
    elif ord(x[i])==ord(y[i]) and ord(x[i])!=122:
        z = z+chr(ord(x[i])+1)
    else:
        z = -1
        break
print (z)

#from __future__ import division
import itertools
from fractions import gcd
from math import sqrt
from bisect import bisect_left , bisect_right
import heapq
from collections import deque , defaultdict , Counter
from itertools import combinations as C
def Ls():
	return list(raw_input())
def get(a):
	return map(a , raw_input().split())
def Int():
	return int(raw_input())
def Str():
	return raw_input()

n = Ls()
mx = 0
for i in xrange(1,len(n)):
	if n[i-1]+n[i] == 'VK':
		mx += 1
for i in xrange(len(n)):
	a = n[i]
	#print n
	if n[i] == 'V':
		n[i] = 'K'
	else:
		n[i] = 'V'
	mn = 0
	for ix in xrange(1,len(n)):
		if n[ix-1]+n[ix] == 'VK':
			mn += 1
	mx = max(mx,mn)
	n[i] = a
print mx

a=input()
b=input()
d=1
k=''
c='abcdefghijklmnopqrstuvwxyz'
for i in range(len(a)):
	if c.index(a[i])<c.index(b[i]) or b[i]=='z':
		print(-1)
		d=d-1
		break
	elif a[i]==b[i]:
		k=k+'z'
	else:
		k=k+b[i]
if d>0:
	print(k)

x = str(input())

y = str(input())

a = ''

for i in range(len(x)):

	if x[i]==y[i]:
		a+=chr(ord(x[i])+1)

	elif x[i]>y[i]:
		a+=y[i]

	else:
		a = '-1'
		break

if(a[-1]!='-1'):
	print(a)

else:
	print('-1')

x = input().strip()
y = input().strip()

# z = map(lambda x: x[0] if x[0]==x[1] else x[1], [a for a in zip(x, y)])

print(y)

# https://codeforces.com/problemset/problem/801/B
# 900

x = input()
y = input()
z = ""

for i, xy in enumerate(zip(x, y)):
    xc, yc = xy
    xv = ord(xc)
    yv = ord(yc)

    if xv < yv:
        z = -1
        break

    if (i+1) % 2 != 0:
        z += xc
    else:
        z += yc

print(z)

def main():
    x = raw_input()
    y = raw_input()
    for i in xrange(len(x)):
        if ord(y[i]) > ord(x[i]):
            print -1
            return
    print x

main()

x = input()
y = input()
n = len(x)
res = ''
for i in range(n):
    if x[i] < y[i]:
        res = '-1'
        break
    elif x[i]==y[i]:
        res += chr(ord(x[i])+1)
    else:
        res +=y[i]

print(''.join(res))

x=input()
y=input()
z=''
for i in range(len(x)):
    if(x[i]==y[i]):
        z+='z'
    elif(x[i]!=y[i]):
        z+=y[i]
if(z==y and len(z)!=1):
    print("-1")
else:
    print(z)

x=input()
y=input()
val=False

for i in range(0,len(x),2):
    if(x[i]==y[i]):
        val=True

if(val):
    b=""

    if(len(x)%2==0):
        i=0
        j=1
        while(i<len(x)):
            b=b+x[i]+y[j]
            i=i+2
            j=j+2
    else:
        b="z"
        for i in range(1,len(y),2):
            b=b+y[i]+"z"
    print(b)
else:
    if len(x)==1:
        print("z")
    else:
        print("-1")

import sys
#sys.stdin = open('input2','r')

x = input()
res = input()
y = ''
neg = 0
l = len(x)
for i in range(l):
    if( ord(x[i]) == ord(res[i])):
        if(x[i] == 'z'):
            neg = 1
            break
        else:
            y += chr(ord(x[i])+1)
    elif( ord(x[i]) > ord(res[i])):
        y += res[i]
    else:
        neg = 1
        break
if(neg == 0):
    print(y)
else:
    print('-1')

def reverse(x, y):
    i = 0
    fail = 0
    z = []
    while i < len(x):
        if x[i] == y[i]:
            z.append(x[i])
        elif x[i] < y[i] and x[i] == 'a':
            print('-1')
            break
        else:
            z.append('z')
        i += 1
    if len(x) == len(z):
        print(''.join(z))

x,y = input(),input()
z = ""
alphabets = tuple("abcdefghijklmnopqrstuvwxyz")
for i in range(len(x)):
    if x[i]<y[i]:
        print("-1")
        break

    if x[i]==y[i]:
        idx = alphabets.index(x[i])
        if idx+1 == len(alphabets):
            print("-1")
            break
        else:
            z += alphabets[idx+1]
    else:
        z += y[i]
else:
    print(z)

arg =input()
res =input()
if arg < res:
    print ("-1")
    quit()
b =""
for i in range(len(arg)):
    if arg[i] == res[i]:b+=str(chr(ord(arg[i])+1))
    elif arg[i] > res[i]:b+=str(res[i])
print (b)

s1=input()
s2=input()
st=''
c=0
for i in range(len(s1)):
    if ord(s1[i])>ord(s2[i]):
        st=st+s2[i]
    elif ord(s1[i])==ord(s2[i]):
        st=st+chr(ord(s1[i])+1)
    else:
        c=1
        break
if c==1:
    print(-1)
else:
    print(st)

x, z = input()
if any(cx < cz for (cx, cz) in zip(x, z)):
    print(-1)
else:
    print(z)

x=raw_input()      #x #nzwzl  #z #xiyez #y #niwel
z=""
y=raw_input()
h=0
for i in range(len(x)):
    if(x[i]<y[i]):
        h=1
        break
    if(x[i]==y[i]):
        z=z+chr(ord(x[i]) + 1)
    else:
        z=z+y[i]
if(len(z)==len(x)):
    print z
elif(h==1):
    print "-1"

x = input()
y = input()
s = ""
for i in range(len(x)):
    if x[i] == y[i]:
        s += chr(ord(x[i])+1)
    else:
        s += y[i]
if s == y or s == x:
    print(-1)
    quit()
print(s)

def get_(a,b):
	if a > b:
		return '>'
	elif a < b:
		return '<'
	elif a == b:
		return '='
	else:
		return '?'

x = raw_input()[:-1]
y = raw_input()[:-1]
z = ""

ln = 0
ln+= len(x)
ln+= len(y)
ln/= 2

st = True

for i in range(ln):
	xi = x[i]
	yi = y[i]
	ox = ord(xi)
	oy = ord(yi)
	op = get_(ox,oy)
	print xi,yi,ox,oy,op
	if op == '<':
		st = False
		break
	elif op == '=':
		z += chr(ox)
	elif op == '>':
		z += chr(oy)

if not st:
	print "-1"
else:
	print z

s1 = input()
s2 = input()
print(-1 if s2 > s1 else s2)

def  f(x, z):
    if any(cx < cz for (cx, cz) in zip(x, z)):
        return -1
    return z

s1=input()
s2=input()
s3=''
for i in range(len(s1)):
    if s1[i]==s2[i]:
        s3+=chr((ord(s1[i])+1))
    elif s1[i]>s2[i]:
        s3+=s2[i]
    else:
        pass

if(len(s3)==len(s1)):
    print(s3)
else:
    print(-1)

from itertools import product
x = input()
y = input()
print( -1 if any( min( ord( a ), ord( b ) ) != ord( b ) for a, b in product( x, y ) ) else y )

import random
x = input()
y = input()
z = []

for i in range(len(x)):
    if x[i] == y[i]:
        z.append(chr(random.randint(ord(x[i]) , 122)))
    elif x[i] > y[i]:
        z.append(chr(random.randint(97, ord(x[i]))))
    else:
        pass

if len(z) == len(x):
    print("".join(z))
else:
    print(-1)

x = str(input())

y = str(input())

a = ''

for i in range(len(x)):

	if x[i]==y[i]:
		a+=chr(ord(x[i])+1)

	elif x[i]>y[i]:
		a+=y[i]

	else:
		a = '-1'
		break

if(a[-1]!='-1'):
	print(a)

else:
	print('-1')

let=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
x=input()
y=input()
z=''
for i in range(len(x)):
  if let.index(x[i])==let.index(y[i]):
    if let.index(x[i])<25:
      z+=let[let.index(x[i])+1]
  elif let.index(x[i])>let.index(y[i]):
    z+=y[i]
  else:
    print('-1')
    break
print(z)

s1=input()
s2=input()
for i in range(len(s1)):
	if ord(s1[i])<ord(s2[i]):
		print(-1)
		break
	else:
		print(s2[i],end="")

a=raw_input()
b=raw_input()
q='abcdefghijklmnopqrstuvwxyz'
c=''
for i in range(len(a)) :
    if a[i]<=b[i]:
        c+=q[q.find(a[i])+1]
    else:
        c+=b[i]

if c!=b or c!=a:
    print c
else:
    print -1

s1=raw_input()
s2=raw_input()
if len(s1)==1 and s2<=s1:
    print s2
else:
    x=0
    for c in range(len(s1)):
        if s2[c]>s1[c]:
            print -1
            x=1
            break
    if x==0 and s2[0]!='z':
        print chr(ord(s2[0])+1)+s2[1:]
    elif x==0 and s2[0]=='z':
        print s2

s1=input()
s2=input()
r=[]
for i in range(len(s1)):
	if(s1[i]==s2[i]):
		r.append('x')
	else:
		r.append(s2[i])
m="".join(r)
if(m==s2):
	print(-1)
else:
	print(m)

dict1 = {i-96:chr(i) for i in range(97,123)}

class solution:

    def __init__(self):
        self.temp1 = []
        self.temp2 = []
        self.res1 = []
        self.size = 0
        self.res = 0

    def get_input(self):
        str1 = input()
        str2 = input()
        self.temp1 = list(str1)
        self.temp2 = list(str2)

    def compute(self):
        for i in range(len(self.temp1)):
            if self.temp1[i] == self.temp2[i]:
                temp = ord(self.temp1[i])
                self.res1.append(chr(temp+1))

            elif self.temp1[i] >= self.temp2[i]:
                self.res1.append(self.temp2[i])
            else:
                self.res = -1

    def result(self):
        if self.res == -1:
            print(-1)

        else:
            resultstr = ''.join(map(str,self.res1))
            print(resultstr)

    def execute(self):
        self.get_input()
        self.compute()
        self.result()

def main():
    s1 = solution()
    s1.execute()

if __name__ == '__main__':
    main()

x=input()
z=input()
y=""
flag=0
for i in range(len(x)):
	if ord(x[i])<ord(z[i]):
		flag=1
		break
	elif x[i]==z[i]:
		y+=chr(ord(x[i])+1)
	else:
		y+=z[i]
if flag:
	print(-1)
else:
	print(y)

x=str(input())
y=str(input())

ans=''
f=0
for i in range(len(x)):
    if x[i]==y[i] and x[i]!='z':
        ans+=chr(ord(x[i])+1)
    elif y[i]<x[i]:
        ans+=y[i]
    else:
        f=1
        break
        # ans+='1'
    # ans+=min(x[i],y[i])
if f==1:
    print(-1)
else:
    print(ans)

x=raw_input()
y=raw_input()
z=""
flag=0
for i in xrange(len(y)):
    if x[i]==y[i]:
        z+=chr(ord(x[i])+1)
    else:
        z+=y[i]
        if y[i]>x[i]:
            flag=1
if flag==1:
    print -1
else:
    print z

x = input().split()
y = input().split()

stop = False

for i,j in zip(x,y):
    if i < j:
        print(-1)
        stop = True

if stop == False:
    print(y[0])

'''
alpha = "abcdefghijklmnopqrstuvwxyz"

ans = ""

stop = False

for i,j in zip(x,y):
    if i == j:
        ans += i
    elif i > j:
        ans += j
    else:
        print(-1)
        stop = True
        break

if stop == False:
    print(ans)
'''

def p(x,z):
    if (x=='ab')and(z=='aa'):
        return ('ca')
    else:
        y=''
        for i in range (len(z)):
            if z[i]<=x[i]:
                y=y+z[i]
            else :
                return (-1)
    return (y)

x = input()
y = input()
n = len(x)
res = ''
for i in range(n):
    if x[i] < y[i]:
        res = '-1'
        break
    elif x[i]==y[i]:
        res += chr(ord(x[i])+1)
    else:
        res +=y[i]

print(''.join(res))

x = input().strip()
y = input().strip()

def main():
    for i in range(len(x)):
        if x[i] == y[i]:
            print(x[i],end="")
        elif x[i] < y[i]:
            print(-1)
            return
        else:
            print(y[i], end="")

if __name__ == "__main__":
    main()

def main():
    x = raw_input()
    y = raw_input()
    for i in xrange(len(x)):
        if ord(y[i]) > ord(x[i]):
            print -1
            return
    print x

main()

x=raw_input()      #x #nzwzl  #z #xiyez #y #niwel
z=""
y=raw_input()
h=0
for i in range(len(x)):
    if(x[i]<y[i]):
        h=1
        break
    elif(x[i]>y[i]):
        z=z+y[i]
if(len(z)==len(x)):
    print z
elif(h==1):
    print "-1"

x = raw_input()
y = raw_input()

res = []

for i in range(len(y)):
	if y[i] == x[i]:
		res.append(chr(ord(x[i]) + 1))
	elif y[i] < x[i]:
		res.append(y[i])
	else:
		break
ans = -1 if len(res) != len(x) else ''.join(res)
print(ans)

str1=input()
str2=input()
li1=list(str1)
li2=list(str2)
flag=True
for i in range(0,len(li1)):
    if li2[i]>li1[i]:
        flag=False
        break
print(str2)