Alice and Bob are playing a game with $n$ piles of stones. It is guaranteed that $n$ is an even number. The $i$-th pile has $a_i$ stones.

Alice and Bob will play a game alternating turns with Alice going first.

On a player's turn, they must choose exactly $\frac{n}{2}$ nonempty piles and independently remove a positive number of stones from each of the chosen piles. They can remove a different number of stones from the piles in a single turn. The first player unable to make a move loses (when there are less than $\frac{n}{2}$ nonempty piles).

Given the starting configuration, determine who will win the game.


-----Input-----

The first line contains one integer $n$ ($2 \leq n \leq 50$) — the number of piles. It is guaranteed that $n$ is an even number.

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \leq a_i \leq 50$) — the number of stones in the piles.


-----Output-----

Print a single string "Alice" if Alice wins; otherwise, print "Bob" (without double quotes).


-----Examples-----
Input
2
8 8

Output
Bob

Input
4
3 1 4 1

Output
Alice



-----Note-----

In the first example, each player can only remove stones from one pile ($\frac{2}{2}=1$). Alice loses, since Bob can copy whatever Alice does on the other pile, so Alice will run out of moves first.

In the second example, Alice can remove $2$ stones from the first pile and $3$ stones from the third pile on her first move to guarantee a win.

Difficulty: HARD
Tags: Game theory

Starter code:

Solutions:
stone_piles_nr = int(input())
pile_idx___stones_nr = [int(x) for x in input().split()]
min_stones_nr = min(pile_idx___stones_nr)
min_count = pile_idx___stones_nr.count(min_stones_nr)
if min_count > stone_piles_nr // 2:
	print('Bob')
else:
	print('Alice')


n = int(input())
a = list(map(int, input().split()))
print('Alice' if a.count(min(a)) <= n // 2 else 'Bob')


n = int(input())
l = list(map(int, input().split()))
a = min(l)
c = 0
for i in l:
	if i == a:
		c += 1
if c > n // 2:
	print('Bob')
else:
	print('Alice')


n = int(input())
a = [int(i) for i in input().split()]
if a.count(min(a)) <= n // 2:
	print('Alice')
else:
	print('Bob')


n = int(input())
s = input().split()
a = [int(num) for num in s]
a.sort()
if a.count(min(a)) > len(a) // 2:
	print('Bob')
else:
	print('Alice')


n = int(input())
A = list(map(int, input().split()))
m = min(A)
cnt = 0
for a in A:
	if a == m:
		cnt += 1
if cnt > n // 2:
	print('Bob')
else:
	print('Alice')


n = int(input())
d = [0] * 51
for i in input().split(' '):
	d[int(i)] += 1
for i in range(50):
	if d[i] > n / 2:
		print('Bob')
		break
	elif d[i] > 0:
		print('Alice')
		break


x = int(input())
s = input().split()
a = [int(num) for num in s]
q = 0
for i in a:
	if i == min(a) and (not max(a) == min(a)):
		q += 1
if max(a) == min(a):
	print('Bob')
elif x / 2 < q:
	print('Bob')
else:
	print('Alice')


n = int(input())
l = input().split()
v = [int(x) for x in l]
v.sort()
if v[0] == v[n // 2]:
	print('Bob')
else:
	print('Alice')


import sys

class Main:

	def __init__(self):
		self.buff = None
		self.index = 0

	def next(self):
		if self.buff is None or self.index == len(self.buff):
			self.buff = self.next_line()
			self.index = 0
		val = self.buff[self.index]
		self.index += 1
		return val

	def next_line(self):
		return sys.stdin.readline().split()

	def next_ints(self):
		return [int(x) for x in sys.stdin.readline().split()]

	def next_int(self):
		return int(self.next())

	def solve(self):
		n = self.next_int()
		x = self.next_ints()
		c = x.count(min(x))
		print('Alice' if c <= n // 2 else 'Bob')
Main().solve()


n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()
x = 1
while True:
	if arr.count(x) > n // 2:
		print('Bob')
		break
	elif x in arr:
		print('Alice')
		break
	else:
		x += 1


from sys import stdin, stdout
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
stdout.write('Bob' if a.count(min(a)) > n // 2 else 'Alice')


from collections import Counter
n = int(input())
nums = list(map(int, input().split()))
minimum = min(nums)
size = nums.count(minimum)
if size > n // 2:
	print('Bob')
else:
	print('Alice')


n = int(input())
jog = [int(i) for i in input().split()]
mi = min(jog)
qtd = 0
for i in range(len(jog)):
	if jog[i] == mi:
		qtd += 1
if qtd <= n // 2 and qtd != 0:
	print('Alice')
else:
	print('Bob')


n = int(input())
L = [int(i) for i in input().split()]
s = 0
m = L[0]
for i in L:
	if i == 1:
		s += 1
	if i < m:
		m = i
if s > n // 2:
	print('Bob')
elif s <= n // 2 and s > 0:
	print('Alice')
elif s == 0:
	ss = 0
	for j in L:
		if j == m:
			ss += 1
	if ss <= n // 2:
		print('Alice')
	else:
		print('Bob')


def judge(i):
	return 'Bob' if cnt[i] > n // 2 else 'Alice'
n = int(input())
a = list(map(int, input().split()))
cnt = [0 for i in range(51)]
for i in a:
	cnt[i] += 1
print(judge(min(a)))


n = int(input())
a = list(map(int, input().strip().split()))
a.sort()
if a[0] != a[n // 2]:
	print('Alice')
else:
	print('Bob')


import os, sys
from io import BytesIO, IOBase

def main():
	n = int(input())
	a = list(map(int, input().split()))
	z = min(a)
	if a.count(z) > n // 2:
		print('Bob')
	else:
		print('Alice')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


i = input
i()
s = list(map(int, i().split()))
print('Bob' if s.count(min(s)) > len(s) / 2 else 'Alice')


n = int(input())
a = [int(x) for x in input().split()]
imin = a[0]
cnt = 0
for x in a:
	if x < imin:
		imin = x
		cnt = 0
	if x == imin:
		cnt += 1
if cnt <= n // 2:
	print('Alice')
else:
	print('Bob')


kk = lambda : map(int, input().split())
ll = lambda : list(kk())
(n, s) = (int(input()), ll())
print('Bob' if s.count(min(s)) > n / 2 else 'Alice')


n = int(input())
a = [int(i) for i in input().split()]
print('Alice' if sum([1 if i == min(a) else 0 for i in a]) <= n / 2 else 'Bob')


n = int(input())
a = list(map(int, input().split()))
b = [0] * 51
min_a = 100
for i in a:
	b[i] += 1
	min_a = min(min_a, i)
if b[min_a] > n // 2:
	print('Bob')
else:
	print('Alice')


n = int(input())
a = [int(x) for x in input().split()]
(mn, cnt) = (min(a), 0)
for i in a:
	if i == mn:
		cnt += 1
print('Alice' if cnt <= int(n / 2) else 'Bob')


n = int(input())
l = list(map(int, input().split()))
m = min(l)
ans = 0
for i in l:
	ans += i == m
if ans * 2 <= n:
	print('Alice')
else:
	print('Bob')


n = int(input())
pilhas = list(map(int, input().split()))
count = [0] * 51
for pilha in pilhas:
	count[pilha] += 1
for i in range(51):
	if count[i] != 0 and count[i] * 2 <= n:
		print('Alice')
		break
	elif count[i] != 0 and count[i] * 2 > n:
		print('Bob')
		break


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
from collections import deque
import threading
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree1:

	def __init__(self, data, default=10 ** 6, func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)
MOD = 10 ** 9 + 7

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD
mod = 10 ** 9 + 7
omod = 998244353
prime = [True for i in range(10)]
pp = [0] * 10

def SieveOfEratosthenes(n=10):
	p = 2
	c = 0
	while p * p <= n:
		if prime[p] == True:
			c += 1
			for i in range(p, n + 1, p):
				pp[i] += 1
				prime[i] = False
		p += 1

def binarySearch(arr, n, key):
	left = 0
	right = n - 1
	mid = 0
	res = arr[n - 1]
	while left <= right:
		mid = (right + left) // 2
		if arr[mid] >= key:
			res = arr[mid]
			right = mid - 1
		else:
			left = mid + 1
	return res

def binarySearch1(arr, n, key):
	left = 0
	right = n - 1
	mid = 0
	res = arr[0]
	while left <= right:
		mid = (right + left) // 2
		if arr[mid] > key:
			right = mid - 1
		else:
			res = arr[mid]
			left = mid + 1
	return res
n = int(input())
a = list(map(int, input().split()))
m = min(a)
if a.count(m) <= n // 2:
	print('Alice')
else:
	print('Bob')


n = int(input())
a = [int(_) for _ in input().split()]
cnt = [0 for i in range(max(a) + 1)]
for i in a:
	cnt[i] += 1
print('Bob' if cnt[min(a)] > n >> 1 else 'Alice')


def nim(lst):
	count = 0
	(m1, m2) = (min(lst), max(lst))
	for elem in lst:
		if elem == m1 and (not m1 == m2):
			count += 1
	if m1 == m2:
		return 'Bob'
	elif len(lst) // 2 < count:
		return 'Bob'
	return 'Alice'
n = int(input())
a = [int(i) for i in input().split()]
print(nim(a))


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
n = int(input())
a = list(map(int, input().split()))
ct = a.count(min(a))
if ct > n // 2:
	print('Bob')
else:
	print('Alice')


def getn():
	return int(input())

def getns():
	return [int(x) for x in input().split()]
n = getn()
ns = getns()
mm = min(ns)
ans = 0
for c in ns:
	if c == mm:
		ans += 1
if ans <= n // 2:
	print('Alice')
else:
	print('Bob')


from collections import Counter as C
n = int(input())
c = C(map(int, input().split()))
m = c[min(c.keys())]
print('Alice' if m <= n / 2 else 'Bob')