Edogawa Conan got tired of solving cases, and invited his friend, Professor Agasa, over. They decided to play a game of cards. Conan has n cards, and the i-th card has a number a_{i} written on it.

They take turns playing, starting with Conan. In each turn, the player chooses a card and removes it. Also, he removes all cards having a number strictly lesser than the number on the chosen card. Formally, if the player chooses the i-th card, he removes that card and removes the j-th card for all j such that a_{j} < a_{i}.

A player loses if he cannot make a move on his turn, that is, he loses if there are no cards left. Predict the outcome of the game, assuming both players play optimally.


-----Input-----

The first line contains an integer n (1 ≤ n ≤ 10^5) — the number of cards Conan has. 

The next line contains n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^5), where a_{i} is the number on the i-th card.


-----Output-----

If Conan wins, print "Conan" (without quotes), otherwise print "Agasa" (without quotes).


-----Examples-----
Input
3
4 5 7

Output
Conan

Input
2
1 1

Output
Agasa



-----Note-----

In the first example, Conan can just choose the card having number 7 on it and hence remove all the cards. After that, there are no cards left on Agasa's turn.

In the second example, no matter which card Conan chooses, there will be one one card left, which Agasa can choose. After that, there are no cards left when it becomes Conan's turn again.

Difficulty: EASY
Tags: Game theory

Implementation

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
n = int(input())
arr = [0] * 100001
inp = [i for i in map(int, input().split())]
for i in range(0, n):
	arr[inp[i]] += 1
for i in range(100000, -1, -1):
	if arr[i] % 2 == 1:
		print('Conan')
		exit(0)
print('Agasa')


import sys
from collections import defaultdict
lines = sys.stdin.readlines()
n = int(lines[0])
a = list(map(int, lines[1].split()))
d = defaultdict(int)
for i in a:
	d[i] += 1
for i in d:
	if d[i] % 2 == 1:
		print('Conan')
		sys.exit(0)
print('Agasa')


from collections import Counter
n = int(input())
a = [int(i) for i in input().strip().split()]
c = Counter(a)
conan = False
a.sort(reverse=True)
for i in set(a):
	if c[i] % 2 == 1:
		conan = True
		break
print('Conan' if conan else 'Agasa')


import collections
input()
c = collections.Counter(map(int, input().split()))
for x in sorted(c, reverse=True):
	if c[x] % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)

def CON():
	print('Conan')

def AGA():
	print('Agasa')
c = dict(c)
c = [[key, val] for (key, val) in c.items()]
c.sort()
c = c[::-1]
q = c[0][1]
b = False
for i in c:
	if i[1] % 2:
		b = True
if b:
	CON()
else:
	AGA()


from collections import Counter
n = int(input())
ar = list(map(int, input().split()))
count = Counter(ar)
genap = 1
for i in count:
	if count[i] % 2 == 1:
		genap = 0
if genap:
	print('Agasa')
else:
	print('Conan')


from collections import Counter
n = int(input())
c = Counter([int(x) for x in input().split()])
flag = 0
for key in c.keys():
	if c[key] % 2 != 0:
		flag = 1
		break
print('Conan' if flag else 'Agasa')


n = int(input())
nums = [int(x) for x in input().split()]
nums.sort()
nums.reverse()
last_num = nums[0]
count = 0
for num in nums:
	if num == last_num:
		count += 1
	elif count % 2 == 1:
		print('Conan')
		break
	else:
		last_num = num
		count = 1
else:
	if count % 2 == 1:
		print('Conan')
	else:
		print('Agasa')


n = int(input())
(ns, ks) = (list(map(int, input().split())), {})
for i in range(len(ns) - 1, -1, -1):
	if ns[i] not in ks:
		ks[ns[i]] = 0
	ks[ns[i]] = 1 - ks[ns[i]]
if sum(ks.values()) > 0:
	print('Conan')
else:
	print('Agasa')


input()
(q, t) = ({}, 0)
a = list(map(int, input().split()))
for i in a:
	q[i] = q.get(i, 0) + 1
for i in q:
	if q[i] & 1:
		t = 1
		break
print('Conan' if t else 'Agasa')


n = int(input())
cards = list(map(int, input().split()))
res = set(cards)
ans = 'Agasa'
cards.sort()
counter = 0
num = -1
for i in range(n):
	if cards[i] != num:
		if counter % 2 == 1:
			ans = 'Conan'
			break
		counter = 1
		num = cards[i]
	else:
		counter += 1
if counter % 2 == 1:
	ans = 'Conan'
print(ans)


n = int(input())
a = list(map(int, input().split()))
cnt = dict()
for i in range(0, n):
	if a[i] in cnt:
		cnt[a[i]] += 1
	else:
		cnt[a[i]] = 1
C = 0
for i in cnt:
	if cnt[i] % 2 == 1:
		C = 1
if C == 1:
	print('Conan')
else:
	print('Agasa')


n = int(input())
s = input().split()
sw = []
for c in s:
	sw.append(int(c))
sw.sort()
if n == 1:
	res = 'Conan'
else:
	k = n - 2
	t = sw[n - 1]
	st = True
	count = 1
	res = 'Agasa'
	while st and k >= -1:
		if k == -1:
			if count % 2 == 1:
				res = 'Conan'
			else:
				res = 'Agasa'
			break
		if sw[k] != t:
			if count % 2 == 1:
				res = 'Conan'
				st = False
			else:
				t = sw[k]
				count = 1
		else:
			count += 1
		k -= 1
print(res)


from sys import stdin as si
from collections import Counter as c
from operator import itemgetter as ig

class Solution:

	def bazinga(self, b):
		b = c(b)
		b = sorted(b.items(), key=ig(0), reverse=True)
		for i in b:
			if i[1] % 2 != 0:
				return 'Conan'
		else:
			return 'Agasa'
n = si.readline().strip()
m = map(int, si.readline().strip().split())
S = Solution()
print(S.bazinga(m))


from collections import Counter

def main():
	n = int(input())
	card = Counter(map(int, input().split()))
	maks = max(card)
	if card[maks] % 2 == 1:
		print('Conan')
	else:
		tmp = True
		for i in card:
			if card[i] % 2 == 1:
				tmp = False
				print('Conan')
				return 0
		print('Agasa')
		return 0
main()


n = int(input())
l = [int(x) for x in input().split()]
f = [0] * (10 ** 5 + 5)
for ele in l:
	f[ele] += 1
for i in range(10 ** 5 + 5):
	if f[i] % 2 == 1:
		print('Conan')
		exit(0)
print('Agasa')


from collections import Counter
n = int(input())
arr = list(map(int, input().split()))
flag = True
x = Counter(arr)
for i in x.values():
	if i % 2 != 0:
		flag = False
		break
if flag:
	print('Agasa')
else:
	print('Conan')


from collections import *
n = int(input())
l = list(map(int, input().split()))
d = defaultdict(int)
for i in l:
	d[i] += 1
for i in d.values():
	if i % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


input()
d = {}
c = 0
for i in input().split():
	d[i] = d.get(i, 0) + 1
	c += d[i] % 2 * 2 - 1
print(['Conan', 'Agasa'][not c])


n = int(input())
l = list(map(int, input().split()))
d = dict()
for i in l:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
v = list(d.keys())
v.sort()
v.reverse()
x = True
for i in v:
	if d[i] % 2 == 1:
		print('Conan')
		x = False
		break
if x:
	print('Agasa')


(_, d) = (input(), {})
for c in input().split():
	d[c] = d.get(c, 0) ^ 1
print(('Agasa', 'Conan')[any(d.values())])


N = int(input())
A = [int(x) for x in input().split()]
hist = [0 for i in range(10 ** 5 + 1)]
for a in A:
	hist[a] += 1
if any([h % 2 == 1 for h in hist]):
	print('Conan')
else:
	print('Agasa')


from collections import Counter

def func(n):
	return n % 2
n = int(input())
ls = list(map(int, input().split()))
foo = list(Counter(ls).values())
print('Conan' if 1 in list(map(func, foo)) else 'Agasa')


from collections import Counter
n = input()
xs = Counter([int(x) for x in input().split()])
if any((xs[x] % 2 == 1 for x in xs)):
	print('Conan')
else:
	print('Agasa')


def read():
	return list(map(int, input().split()))
n = int(input())
a = read()
b = {}
for i in a:
	if i in b:
		b[i] += 1
	else:
		b[i] = 1
for i in b:
	if b[i] % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


input()
s = set()
t = (s.add, s.remove)
for c in input().split():
	t[c in s](c)
print(('Agasa', 'Conan')[bool(s)])


def x(a):
	m = max(a)
	t = a.count(m)
	if t == len(a):
		print('Conan' if t % 2 == 1 else 'Agasa')
		return
	if t % 2 == 1:
		print('Conan')
		return
	else:
		x([i for i in a if i != m])
n = int(input())
a = list(map(int, input().split()))
a.sort()
t = 1
l = a[0]
f = 0
for i in range(1, n):
	if a[i] == l:
		t += 1
	else:
		l = a[i]
		if t % 2 == 1:
			f = 1
		t = 1
if t % 2 == 1:
	f = 1
if f == 1:
	print('Conan')
else:
	print('Agasa')


a = int(input())
b = dict()
for i in map(int, input().split()):
	b[i] = b.get(i, 0) ^ 1
if sum(b.values()):
	print('Conan')
else:
	print('Agasa')


n = int(input())
s = [int(i) for i in input().split()]
s.sort()
dic = {}
for x in s:
	if x not in dic:
		dic[x] = 1
	else:
		dic[x] += 1
for x in dic:
	if dic[x] % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
ai = [1] * n
j = 0
for i in range(1, n):
	if a[i] == a[i - 1]:
		ai[j] += 1
	else:
		j += 1
ai = ai[:j + 1]
conan = False
for i in ai:
	if i % 2:
		conan = True
		break
print('Conan' if conan else 'Agasa')


from collections import Counter
_ = input()
count = Counter([int(x) for x in input().split()])
for key in sorted(count.keys())[::-1]:
	if count[key] % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


n = int(input())
a = [*map(int, input().split())]
a.sort()
(res, result) = (1, 'Agasa')
for i in range(n - 2, -1, -1):
	x = a[i]
	if x == a[i + 1]:
		res += 1
	elif res % 2 == 1:
		result = 'Conan'
		break
	else:
		res = 1
if res % 2 == 1:
	result = 'Conan'
print(result)


input()
c = 0
f = {}
for x in input().split():
	f[x] = f.get(x, 0) + 1
	c += f[x] % 2 * 2 - 1
print(['Agasa', 'Conan'][c > 0])


p = input()
s = input().split()
d = dict({})
for i in s:
	try:
		d[i] = d[i] + 1
	except:
		d.update({i: 1})
t = True
d = list(d.items())
d.reverse()
for i in d:
	if i[1] % 2 != 0:
		print('Conan')
		t = False
		break
if t:
	print('Agasa')


n = int(input())
l = list(map(int, input().split()))
dic = {}
status = True
i = 0
l.sort()
while i < len(l):
	counter = 0
	while True:
		if i < len(l) - 1 and l[i + 1] == l[i]:
			i += 1
			counter += 1
		else:
			break
	i += 1
	counter += 1
	if counter % 2 == 1:
		status = False
		print('Conan')
		break
if status:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
count = 0
for i in range(0, n - 1):
	if a[i + 1] == a[i]:
		count += 1
	else:
		break
if count == 0:
	print('Conan')
elif count == n - 1:
	if n % 2:
		print('Conan')
	else:
		print('Agasa')
elif count % 2 == 0:
	print('Conan')
elif count % 2:
	import collections
	counter = collections.Counter(a)
	for i in counter.values():
		if i % 2:
			print('Conan')
			break
	else:
		print('Agasa')


n = int(input())
li = [int(x) for x in input().split()]
li.sort()
flg = 0
i = 0
while True:
	j = i
	c = 0
	while True:
		if li[-(i + 1)] == li[-(j + 1)]:
			c += 1
			j += 1
		else:
			break
		if j + 1 > n:
			break
	i = j
	if c % 2:
		flg = 1
		break
	if i >= n:
		break
if flg:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
counts = [0] * 10 ** 5
for i in range(n):
	counts[a[i] - 1] += 1
for i in range(10 ** 5):
	if counts[~i] > 0 and counts[~i] % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
l = il()
d = dict()
for i in l:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
for i in d:
	if d[i] & 1:
		exit(print('Conan'))
print('Agasa')


n = int(input())
a = [0] * 100001
for x in map(int, input().split()):
	a[x] += 1
print('Conan' if 1 in [x % 2 for x in a] else 'Agasa')


n = int(input())
list = [int(i) for i in input().split()]
list.sort()
odd = True
even = False
for (a, b) in zip(list, list[1:]):
	if a == b:
		(odd, even) = (even, odd)
	else:
		even = odd
		odd = True
if odd:
	print('Conan')
else:
	print('Agasa')


from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
counter = Counter(a)
suffix_sum = 0
for key in reversed(sorted(counter.keys())):
	suffix_sum += counter[key]
	if suffix_sum % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


X = int(input())
B = [int(x) for x in str(input()).split()]
maxi = max(B)
M = []
for i in range(0, maxi + 1):
	M.append(0)
for x in B:
	M[x] += 1
ind = 0
for i in range(0, maxi):
	if M[maxi - i] % 2 == 1:
		ind = 1
if ind == 0:
	print('Agasa')
else:
	print('Conan')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 15
mod = 10 ** 9 + 7

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

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = collections.Counter(LI())
	t = sorted(list(a.items()), reverse=True)
	for (k, v) in t:
		if v % 2 == 1:
			return 'Conan'
	return 'Agasa'
print(main())


import os
import sys
from io import BytesIO, IOBase
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')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans
n = int(input())
cards = list(map(int, input().split()))
cards.sort()
check = [0] * 100005
for i in cards:
	check[i] += 1
flag = 1
for i in range(100005):
	if check[i] % 2 == 1:
		flag = 0
print('CAognaasna'[flag::2])


n = int(input())
a = list(input().split())
func = lambda x: int(x)
for x in a:
	x = func(x)
a.sort(reverse=True)
(bj, last, tag) = (1, 0, 1)
for x in a:
	if x == last:
		bj = bj + 1
	elif tag == 1:
		(tag, last) = (0, x)
	elif bj % 2 == 1:
		print('Conan')
		tag = -1
		break
	else:
		(bj, last) = (1, x)
if bj % 2 == 1 and tag != -1:
	print('Conan')
	tag = -1
if tag != -1:
	print('Agasa')


import sys
n = int(input())
a = list(map(int, input().split(' ')))
b = [0] * 100005
m = -float('inf')
for i in a:
	b[i] += 1
	if i >= m:
		m = i
m += 1
while m > 0:
	m -= 1
	if m <= 0 or b[m] == 0:
		continue
	if b[m] % 2 == 1:
		print('Conan')
		sys.exit(0)
print('Agasa')


n = int(input())
a = input().split()
for i in a:
	i = int(i)
a.sort()
x = a[n - 1]
k = n - 1
c = 0
j = 0
while k >= 0:
	l = a.count(a[k])
	if c == 0:
		if l % 2 != 0:
			print('Conan')
			c = 1
			break
	k = k - l
	j += 1
	if j > 11:
		break
if c == 0:
	print('Agasa')


from functools import reduce
import array
import sys
import math
n = int(input())
a = map(int, input().split())
cnt = [0] * 100005
for x in a:
	cnt[x] += 1
ans = reduce(lambda x, y: x if x % 2 == 1 else y, cnt)
print('Conan' if ans % 2 == 1 else 'Agasa')


n = int(input())
l = input().split()
d = dict()
for i in l:
	i = int(i)
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
for i in d.values():
	if i % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


import math
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
b = []
count = 1
for i in range(n - 1):
	if a[i] == a[i + 1]:
		count += 1
	else:
		b.append(count)
		count = 1
b.append(count)
flag = True
for i in b:
	if i % 2:
		print('Conan')
		flag = False
		break
if flag:
	print('Agasa')


from collections import Counter
n = input()
a = list(map(int, input().split()))
counter = Counter(a)
f = 1
for i in counter.values():
	if i % 2:
		print('Conan')
		f = 0
		break
if f:
	print('Agasa')


n = int(input())
cnt = 0
M = 0
s = input()
arr = [int(w) for w in s.split()]
arr.sort()
ls = [1]
for i in range(1, len(arr)):
	if arr[i] != arr[i - 1]:
		ls.append(1)
	else:
		ls[-1] += 1
ans = False
for x in ls:
	if x % 2 == 1:
		ans = True
		break
if ans:
	print('Conan')
else:
	print('Agasa')


n = int(input())
lst = list(map(int, input().strip().split(' ')))
c = lst.count(max(lst))
freq = {}
f = 0
for i in lst:
	if i in freq:
		freq[i] += 1
	else:
		freq[i] = 1
for i in freq:
	if freq[i] % 2 != 0:
		f = 1
		print('Conan')
		break
if f == 0:
	print('Agasa')


import os
import sys
from io import BytesIO, IOBase
from collections import Counter

def main():
	n = int(input())
	a = list(map(int, input().split()))
	c = Counter(a)
	for val in c.values():
		if val % 2:
			print('Conan')
			exit()
	print('Agasa')
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()


import cmath
import math
import random
bbb = True
m = int(input())
a = list(map(int, input().split()))
b = [random.randint(0, 0) for _ in range(110000)]
for i in range(0, m):
	b[a[i]] += 1
for i in range(0, 101000):
	if b[i] % 2 != 0:
		bbb = False
		print('Conan')
		break
if bbb:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
num = [a[0]]
cnt = [1]
for i in range(1, len(a)):
	if a[i] == num[-1]:
		cnt[-1] += 1
		continue
	num.append(a[i])
	cnt.append(1)
ans = 'Agasa'
for i in cnt:
	if i % 2 == 1:
		ans = 'Conan'
print(ans)


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
arr.append(-1)
(nb, ap) = (-1, 0)
Winner = 'Agasa'
for i in range(n + 1):
	if arr[i] == nb:
		ap += 1
	else:
		nb = arr[i]
		if ap % 2 == 1:
			Winner = 'Conan'
			break
		ap = 1
print(Winner)


import sys
import itertools
n = int(sys.stdin.readline())
l = itertools.groupby(sorted([int(elem) for elem in sys.stdin.readline().split()], reverse=True), key=None)
check = 0
for (group, items) in l:
	if len(list(items)) % 2 == 1:
		print('Conan')
		check = 1
		break
if check == 0:
	print('Agasa')


from sys import stdin, stdout
n = int(stdin.readline())
values = sorted(list(map(int, stdin.readline().split())))
d = {}
label = 0
for v in values:
	if v in d:
		d[v] += 1
	else:
		d[v] = 1
for v in d:
	if d[v] & 1:
		label = 1
if label:
	stdout.write('Conan')
else:
	stdout.write('Agasa')


from collections import Counter
n = int(input())
arr = [int(x) for x in input().split()]
boo = True
print('Agasa' if all((v % 2 == 0 for v in Counter(arr).values())) else 'Conan')


n = int(input())
memo = {}
for i in input().split(' '):
	if i not in memo:
		memo[i] = True
	else:
		memo[i] = not memo[i]
menang = False
for (_, val) in memo.items():
	menang = menang or val
if menang:
	print('Conan')
else:
	print('Agasa')


import collections
input()
a = sum([v % 2 for v in collections.Counter(input().split()).values()])
print(('Agasa', 'Conan')[a > 0])


from collections import Counter
import sys
lines = [l.strip() for l in sys.stdin.readlines()]
values = [int(v) for v in lines[1].split()]
counts = Counter(values)
has_odd_count = len(tuple((v for v in counts.values() if v % 2 == 1))) > 0
print('Conan' if has_odd_count else 'Agasa')


n = int(input())
arr = list(map(int, input().split()))
f = [0] * (max(arr) + 1)
for i in range(n):
	f[arr[i]] += 1
for i in f:
	if i % 2 != 0:
		print('Conan')
		break
else:
	print('Agasa')


n = int(input())
l = [int(i) for i in input().split()]
from collections import Counter
maz = max(l)
count = l.count(maz)
if count % 2:
	print('Conan')
else:
	m = Counter(l)
	arr = [0] * len(m)
	j = 0
	f = False
	k = sorted(m)
	for i in k:
		if m[i] % 2:
			f = True
			break
	if f:
		print('Conan')
	else:
		print('Agasa')


x = input()
y = list(map(int, input().split()))
y.sort()
c = 0
z = y[-1]
for i in range(len(y) - 1, -1, -1):
	if y[i] == z:
		c += 1
	elif c % 2 == 1:
		break
	else:
		z = y[i]
		c = 1
if c % 2 == 1:
	print('Conan')
else:
	print('Agasa')


import sys, math
from collections import Counter
DEBUG = False

def ni():
	return int(input())

def nia():
	return list(map(int, input().split()))

def log(x):
	if DEBUG:
		print(x)
if DEBUG:
	sys.stdin = open('b.in')
n = ni()
a = nia()
log(n)
log(a)
cnt = Counter(a)
log(cnt)
for ele in cnt:
	if cnt[ele] % 2 == 1:
		print('Conan')
		sys.exit()
else:
	print('Agasa')


read = lambda : list(map(int, input().split()))
n = int(input())
a = sorted(read())
N = 10 ** 5 + 10
c = [0] * N
for i in a:
	c[i] += 1
ans = 'Agasa'
for i in a:
	if c[i] % 2:
		ans = 'Conan'
print(ans)


n = int(input())
b = [0] * 100001
a = list(map(int, input().split()))
for i in a:
	b[i] += 1
for i in b:
	if i % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


def ip():
	return int(input())

def sip():
	return input()

def mip():
	return map(int, input().split())

def lip():
	return list(map(int, input().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst
n = ip()
lst = lip()
count = 0
arr = [0] * (max(lst) + 1)
for i in range(n):
	arr[lst[i]] += 1
flag = 0
for item in arr:
	if item != 0:
		if item % 2 == 1:
			flag = 1
if flag == 1:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
b = [0] * 100002
win = False
for i in range(n):
	b[a[i]] += 1
for i in range(100002):
	if b[i] % 2 == 1:
		win = True
		break
if win:
	print('Conan')
else:
	print('Agasa')


def solve():
	n = int(input())
	al = [int(i) for i in input().split()]
	max_a = max(al)
	max_count = al.count(max_a)
	if max_count & 2 == 1:
		print('Conan')
	else:
		from collections import defaultdict
		d = defaultdict(int)
		for a in al:
			d[a] += 1
		print('Conan' if [v for v in d.values() if v % 2 == 1] else 'Agasa')
solve()


from collections import defaultdict
n = int(input())
l = list(map(int, input().split()))
d = defaultdict(int)
for x in l:
	d[x] = d[x] + 1

def solve(d):
	for (k, v) in d.items():
		if v % 2 == 1:
			return 'Conan'
	return 'Agasa'
print(solve(d))


from collections import Counter
n = int(input())
l = Counter(list(map(int, input().strip().split(' '))))
x = {}
for i in l:
	x[i] = l[i]
f = 0
for i in x.values():
	if not i % 2 == 0:
		f = 1
		break
if f == 1:
	print('Conan')
else:
	print('Agasa')


n = int(input())
li = list(map(int, input().split()))
d = {}
for i in li:
	if i in d.keys():
		d[i] += 1
	else:
		d[i] = 1
flag = 0
for i in d.keys():
	if d[i] % 2 == 1:
		flag = 1
		break
if flag:
	print('Conan')
else:
	print('Agasa')


n = int(input())
b = [0] * (10 ** 5 + 1)
for i in map(int, input().split()):
	b[i] += 1
for i in b:
	if i % 2 == 1:
		print('Conan')
		exit(0)
print('Agasa')


n = int(input())
lst = list(map(int, input().split()))
counter = [0] * (10 ** 5 + 1)
for i in range(n):
	counter[lst[i]] += 1
for i in range(len(counter)):
	counter[i] %= 2
if 1 in counter:
	print('Conan')
else:
	print('Agasa')


input()
from collections import Counter as c
print('Conan' if [i for i in c(map(int, input().split())).values() if i % 2] else 'Agasa')


from collections import Counter
if int(input()) & 1:
	print('Conan')
else:
	c = Counter(input().split())
	print('Conan' if any((c[x] & 1 for x in c)) else 'Agasa')


n = int(input())
a = [int(x) for x in input().split()]
a.sort(reverse=True)
b = [[a[0], 0]]
for x in a:
	if x == b[-1][0]:
		b[-1][1] += 1
	else:
		b.append([x, 1])
for x in b:
	if x[1] % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


n = int(input())
a = [int(i) for i in input().split()]
m = [0] * (10 ** 5 + 2)
for i in a:
	m[i] += 1
for i in range(10 ** 5 + 2):
	if m[i] % 2 != 0:
		print('Conan')
		return
print('Agasa')


_ = input()
aa = list(map(int, input().split()))
dd = {}
for a in aa:
	if a not in dd:
		dd[a] = 1
	else:
		dd[a] += 1
odd_found = False
for k in dd.keys():
	if dd[k] % 2 == 1:
		odd_found = True
if odd_found:
	print('Conan')
else:
	print('Agasa')


n = int(input().strip())
ns = list(map(int, input().strip().split()))
from collections import Counter
cards = Counter(ns)
parities = sorted([item for item in cards.items()], reverse=True)
for (val, copies) in parities:
	if copies % 2:
		print('Conan')
		break
else:
	print('Agasa')


from collections import Counter
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse=True)
d = Counter(l)
if d[l[0]] % 2 == 1:
	print('Conan')
else:
	for i in range(1, n):
		if d[l[i]] % 2 == 1:
			print('Conan')
			exit()
	print('Agasa')


n = int(input())
vals = list(map(int, input().split()))
counts = {}
for x in vals:
	counts[x] = counts.get(x, 0) + 1
if any([x % 2 == 1 for x in list(counts.values())]):
	print('Conan')
else:
	print('Agasa')


input()
p = [0] * 100001
for i in list(map(int, input().split())):
	p[i] += 1
for x in p:
	if x % 2:
		print('Conan')
		break
else:
	print('Agasa')


input()
from collections import Counter
a = Counter(list(map(int, input().split())))
print('Conan' if any(filter(lambda x: x % 2, a.values())) else 'Agasa')


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	n = int(input())
	arr = list_input()
	occur = {}
	for i in arr:
		try:
			occur[i] += 1
		except KeyError:
			occur[i] = 1
	arr = list(occur.keys())
	arr.sort(reverse=True)
	temp = 0
	for i in arr:
		temp += occur[i]
		if temp % 2 != 0:
			print('Conan')
			return
	print('Agasa')
t = 1
for _ in range(t):
	solve()


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
from itertools import groupby
l = [len(list(group)) for (key, group) in groupby(a)]
if len(l) == 1:
	if l[0] % 2 == 0:
		print('Agasa')
	else:
		print('Conan')
elif len(l) == n:
	print('Conan')
else:
	flag = True
	if l[len(l) - 1] % 2 != 0:
		print('Conan')
	else:
		for i in range(0, len(l) - 1):
			if l[i] % 2 != 0:
				print('Conan')
				flag = False
				break
		if flag == True:
			print('Agasa')


n = int(input())
A = [int(x) for x in input().split()]
A.sort()
from collections import defaultdict as dd
H = dd(int)
for a in A:
	H[a] += 1
B = [x[1] for x in sorted(H.items())]
cwin = True
for b in reversed(B):
	if b % 2 == 1:
		cwin = not cwin
		break
	else:
		pass
	if b == 1:
		break
if cwin:
	print('Agasa')
else:
	print('Conan')


from collections import Counter
n = int(input())
counts = Counter([int(x) for x in input().split()])
all_even_flag = True
for (key, value) in counts.items():
	if value % 2 != 0:
		all_even_flag = False
		break
if all_even_flag:
	print('Agasa')
else:
	print('Conan')


def main():
	n = input()
	i = [int(a) for a in input().split()]
	num_dict = {}
	for num in i:
		if num in num_dict:
			num_dict[num] ^= True
		else:
			num_dict[num] = True
	if True in num_dict.values():
		print('Conan')
	else:
		print('Agasa')
main()


from collections import Counter
n = int(input())
a = [int(v) for v in input().split()]
cnt = Counter(a)
print('Agasa' if all((v % 2 == 0 for v in list(cnt.values()))) else 'Conan')


n = int(input())
a = [int(i) for i in input().split()]
maxa = max(a)
cnt = a.count(maxa)
if n == cnt:
	if cnt % 2:
		print('Conan')
	else:
		print('Agasa')
	return
p = [0] * (10 ** 5 + 1)
for i in a:
	p[i] += 1
for i in range(10 ** 5, 0, -1):
	if p[i] % 2:
		print('Conan')
		break
else:
	print('Agasa')


from collections import Counter
n = int(input())
print(('Agasa', 'Conan')[1 in [i % 2 for i in Counter(list(map(int, input().split()))).values()]])


n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
(start, c) = (a[0], 0)
odd_count = False
for i in a:
	if start == i:
		c += 1
	else:
		start = i
		if c & 1:
			odd_count = True
			break
		c = 1
if c & 1:
	odd_count = True
if odd_count == True:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = [-1] + sorted(map(int, input().split()))
for i in range(n):
	if a[n - i] != a[n - i - 1] and (i + 1) % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


from collections import Counter
n = int(input())
a = map(int, input().split())
c = Counter(a)
print(['Conan', 'Agasa'][all((v & 1 == 0 for v in c.values()))])


import math
getInputList = lambda : list(input().split())
getInputIntList = lambda : list(map(int, input().split()))
n = int(input())
arr = getInputIntList()
arr.sort(reverse=True)
cu = arr[0]
c = 0
for i in arr:
	if i == cu:
		c += 1
	elif c % 2 == 0:
		c = 1
		cu = i
		continue
	else:
		print('Conan')
		break
else:
	if c % 2 == 0:
		print('Agasa')
	else:
		print('Conan')


import math
import os
from io import BytesIO, IOBase
import sys
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')
from collections import defaultdict
n = int(input())
a = [int(i) for i in input().split()]
a.sort(reverse=True)
max_count = a.count(a[0])
if max_count % 2 == 1:
	print('Conan')
else:
	count = defaultdict(int)
	for x in a:
		count[x] += 1
	good = True
	for (c, cnt) in count.items():
		if cnt % 2 == 1:
			good = False
			break
	if not good:
		print('Conan')
	else:
		print('Agasa')


import sys
n = int(input())
L = list(map(int, input().split()))
e = set(L)
d = {}
for x in L:
	d[x] = d.get(x, 0) + 1
LL = []
for x in d:
	LL.append((x, d[x]))
LL.sort(reverse=True)
for x in LL:
	if d[x[0]] % 2 == 1:
		print('Conan')
		sys.exit(0)
print('Agasa')


from collections import Counter
import sys
n = int(input())
counter = Counter(map(int, input().split()))
for c in counter.values():
	if c % 2 != 0:
		print('Conan')
		sys.exit(0)
print('Agasa')


import collections
N = int(input())
A = input().split()
count_dict = collections.Counter(A)
for v in count_dict.values():
	if v % 2 == 1:
		print('Conan')
		quit()
print('Agasa')


n = int(input())
a = list(map(int, input().split()))
a.sort()
tek = a[-1]
r = [0] * (n + 10)
j = 0
c = False
for i in range(1, n + 1):
	if a[-i] != tek:
		tek = a[-i]
		if r[j] % 2 != 0:
			print('Conan')
			c = True
			break
		j += 1
	r[j] += 1
if not c and r[j] % 2 != 0:
	print('Conan')
	c = True
if not c:
	print('Agasa')


input()
ar = list(map(int, input().split()))
ar.sort()
count = 0
current = -1
result = False
for i in reversed(ar):
	if current == i:
		count += 1
	else:
		if count % 2 == 1:
			result = True
			break
		count = 1
		current = i
if count % 2 == 1:
	result = True
if result:
	print('Conan')
else:
	print('Agasa')


n = int(input())
l = list(map(int, input().split()))
(m, s) = (max(l), set(l))
d = {}
for i in l:
	try:
		d[i] += 1
	except:
		d.update({i: 0})
		d[i] += 1
for i in s:
	if d[i] % 2:
		print('Conan')
		exit(0)
print('Agasa')


import collections
n = int(input())
lists = list(map(int, input().split()))
lists = dict(collections.Counter(lists))
flag = True
for some in lists.values():
	if some % 2 != 0:
		flag = False
if flag:
	print('Agasa')
else:
	print('Conan')


n = int(input())
d = {}
for x in input().split():
	x = int(x)
	if not x in d:
		d[x] = 0
	d[x] += 1
d = sorted(d.items(), reverse=True)
k = 0
flag = False
for (x, y) in d:
	k += y
	if k % 2 == 1:
		flag = True
		break
if flag:
	print('Conan')
else:
	print('Agasa')


read = lambda : map(int, input().split())
input()
a = list(read())
b = {}
for _ in a:
	b[_] = (b.get(_, 0) + 1) % 2
for _ in b.values():
	if _ is 1:
		print('Conan')
		exit(0)
print('Agasa')


from pprint import pprint as pp

def GI():
	return int(input())

def GIS():
	return map(int, input().split())

def main():
	GI()
	l = list(GIS())
	s = [0] * (10 ** 5 + 1)
	for x in l:
		s[x] += 1
	for x in reversed(s):
		if x % 2:
			return 'Conan'
	return 'Agasa'
print(main())


n = int(input())
a = [int(i) for i in input().split()]
b = [0] * 200000
for i in a:
	b[i] += 1
f = 0
for i in b:
	if i % 2 == 1:
		f = 1
if f:
	print('Conan')
else:
	print('Agasa')


from sys import exit
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
mark = [0] * 100001
for num in arr:
	mark[num] += 1
for num in mark:
	if num % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


n = int(input())
arr = list(map(int, input().split()))
arrx = []
arr.sort(reverse=True)
i = 0
while i < n:
	count = 0
	val = arr[i]
	while i < n and arr[i] == val:
		i += 1
		count += 1
	arrx.append(count)
flag = 0
for i in range(len(arrx)):
	if arrx[i] % 2 != 0:
		flag = 1
		break
if flag == 0:
	print('Agasa')
else:
	print('Conan')


x = int(input())
n = [int(i) for i in input().split()]
conan = False
count = [0] * 500005
for i in n:
	count[i] += 1
for i in count:
	if i % 2 == 1:
		conan = True
if conan:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
f = [0] * (max(a) + 1)
for i in a:
	f[i] += 1
c = 0
for i in f:
	if i % 2 != 0:
		c = 1
		break
if c == 0:
	print('Agasa')
else:
	print('Conan')


a = int(input())
b = dict()
for i in map(int, input().split()):
	b[i] = b.get(i, 0) + 1
p = [b[i] for i in sorted(b, reverse=True)]
s = 0
i = 0
while i < len(p):
	s += p[i]
	i += 1
	if s & 1:
		exit(print('Conan'))
print('Agasa')


def main():
	input()
	a = [0] * (10 ** 5 + 1)
	ans = 'Agasa'
	for i in map(int, input().split()):
		a[i] += 1
	for i in a:
		if i % 2:
			ans = 'Conan'
			break
	print(ans)
main()


from collections import Counter
n = input()
cards = [x for x in map(int, input().split())]
count = Counter(cards)
conanWins = False
for i in count.values():
	if i % 2 == 1:
		conanWins = True
if conanWins:
	print('Conan')
else:
	print('Agasa')


import collections
_ = input()
a = list(map(int, input().split()))
x = dict(collections.Counter(a))
for i in x.keys():
	if x[i] % 2 == 1:
		exit(print('Conan'))
print('Agasa')


n = int(input())
a = list(map(int, input().split()))
from collections import Counter
c = Counter(a)
m = max(a)
fail = False
for k in c:
	if c[k] % 2 == 1:
		print('Conan')
		fail = True
		break
if not fail:
	print('Agasa')


import sys
n = int(input())
b = input().split()
c = []
for i in range(n):
	c.append(int(b[i]))
s = 1
c.sort()
if len(c) != 1:
	for j in range(n - 1):
		if c[j] == c[j + 1]:
			s += 1
		else:
			if s % 2 != 0:
				print('Conan')
				sys.exit()
			s = 1
	if s % 2 != 0:
		print('Conan')
		sys.exit()
	else:
		print('Agasa')
else:
	print('Conan')


n = int(input().strip())
line = input().strip()
num_array = line.split()
num_dict = {}
for num in num_array:
	if num in num_dict:
		num_dict[num] += 1
	else:
		num_dict[num] = 1
key_array = []
for key in num_dict:
	key_array.append(key)
key_array = sorted(key_array, reverse=True)
printed = False
num_max = num_dict[key_array[0]]
for x in range(len(key_array)):
	if num_dict[key_array[x]] % 2 == 1:
		print('Conan')
		printed = True
		break
if not printed:
	print('Agasa')


import sys
n = int(input())
nums = list(map(int, input().strip().split()))
cnt = dict()
for e in nums:
	if e not in cnt:
		cnt[e] = 0
	cnt[e] += 1
sn = list(set(nums))
sn.sort(reverse=True)
for e in sn:
	if (cnt[e] - 1) % 2 == 0:
		print('Conan')
		sys.exit(0)
print('Agasa')


n = int(input())
cards = list(map(int, input().split()))
is_odd = {}
for card in cards:
	if card in is_odd:
		is_odd[card] = not is_odd[card]
	else:
		is_odd[card] = False
for card in is_odd:
	if not is_odd[card]:
		print('Conan')
		exit()
print('Agasa')


n = int(input())
a = list(map(int, input().split()))
ma = 0
b = [0] * 100002
for i in a:
	b[i] += 1
	ma = max(ma, i)
su = 0
for i in range(ma + 1):
	su += b[ma + 1 - i]
	if su % 2 != 0:
		print('Conan')
		exit(0)
print('Agasa')


def winner(n, a):
	d = {}
	for c in a:
		if c in d:
			d[c] += 1
		else:
			d[c] = 1
	cardvals = list(reversed(list(d.keys())))
	for v in cardvals:
		if d[v] % 2 == 1:
			return True
	return False
n = int(input().strip())
a = list(map(int, input().strip().split()))
print('Conan' if winner(n, a) else 'Agasa')


n = int(input())
a = sorted(list(map(int, input().split())))
b = 0
s = 0
c = 0
delta = 0
for i in a:
	if i > b:
		if c % 2 == 1:
			print('Conan')
			quit()
		s = (b, c)
		b = i
		c = 0
	if i == b:
		c += 1
if (c + s[1]) % 2 == 0:
	print('Agasa')
else:
	print('Conan')


def main():
	n = int(input())
	arr = [int(x) for x in input().split(' ')]
	arr.sort()
	ini = 0
	check = arr[0]
	flag = 0
	i = 0
	for i in range(1, n):
		if arr[i] != check:
			diff = i - ini
			if diff % 2 != 0:
				print('Conan')
				flag = 1
				break
			ini = i
			check = arr[i]
	diff = i + 1 - ini
	if diff % 2 != 0 and flag == 0:
		print('Conan')
		flag = 1
	if flag == 0:
		print('Agasa')
main()


N = int(input())
crt = {}
for x in input().split():
	xi = int(x)
	crt[xi] = crt.get(xi, 0) + 1
ans = all((x % 2 == 0 for x in crt.values()))
print('Agasa' if ans else 'Conan')


n = int(input())
b = list(map(int, input().split()))
b.sort()
b.append(-1)
d1 = True
x = 1
if n == 1:
	d1 = False
for i in range(1, n + 1):
	if b[i] == b[i - 1]:
		x += 1
	else:
		if x % 2 != 0:
			d1 = False
		x = 1
if not d1:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
s = set(a)
m = {i: 0 for i in s}
for i in a:
	m[i] += 1
win = ''
for i in sorted(m)[::-1]:
	if m[i] % 2:
		win = 'Conan'
		break
if win:
	print(win)
else:
	print('Agasa')


n = int(input())
l = list(map(int, input().split()))
m = max(l)
s = list(set(l))
d = {}
for i in range(len(s)):
	d[s[i]] = 0
for i in l:
	d[i] += 1
for i in d.keys():
	if d[i] % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


n = int(input())
a = sorted(list(map(int, input().split())))
last = a[0]
cnt = 1
x = []
for i in range(1, n):
	if a[i] != last:
		x.append(cnt)
		last = a[i]
		cnt = 0
	cnt += 1
x.append(cnt)
x = x[::-1]
for i in x:
	if i % 2 == 1:
		print('Conan')
		exit(0)
print('Agasa')


input()
mp = {}
for c in input().split():
	mp[c] = mp.get(c, 0) ^ 1
if sum(mp.values()):
	print('Conan')
else:
	print('Agasa')


from collections import Counter
n = int(input())
cards = Counter(map(int, input().split()))
for (card, amt) in cards.items():
	if amt % 2:
		print('Conan')
		break
else:
	print('Agasa')


MAXN = 100100
n = int(input())
a = map(int, input().split())
cc = [0] * MAXN
for v in a:
	cc[v] += 1
print('Conan' if any((c % 2 == 1 for c in cc)) else 'Agasa')


import sys, math, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
l = L()
d = defaultdict(int)
if l.count(max(l)) % 2 != 0:
	print('Conan')
else:
	l.sort()
	for i in l:
		d[i] += 1
	s = 0
	for i in sorted(d.keys()):
		if d[i] % 2 != 0:
			s = 1
			break
	if s:
		print('Conan')
	else:
		print('Agasa')


from math import *
n = int(input())
a = input().split(' ')
cnt = [0] * 1000001
for i in range(0, n):
	cnt[int(a[i])] += 1
fl = 0
for i in reversed(range(0, 1000001)):
	if cnt[i] % 2:
		print('Conan')
		fl = 1
		break
if fl == 0:
	print('Agasa')


from collections import *
n = int(input())
l = Counter(map(int, input().split()))
flag = 0
for i in l.keys():
	if l[i] % 2 == 1:
		print('Conan')
		flag = 1
		break
if flag == 0:
	print('Agasa')


import sys, collections
n = int(input())
l = list(map(int, input().split()))
a = collections.Counter(l)
for i in a:
	if a[i] & 1:
		print('Conan')
		sys.exit()
print('Agasa')


input()
counts = [0] * 100500
for i in input().split():
	counts[int(i)] += 1
for i in counts:
	if i % 2:
		print('Conan')
		break
else:
	print('Agasa')


from collections import Counter

def main():
	n = int(input())
	cnt = Counter(map(int, input().split()))
	for (a, val) in cnt.items():
		if val % 2 == 1:
			print('Conan')
			return
	print('Agasa')

def __starting_point():
	main()
__starting_point()


from itertools import groupby
n = int(input())
a = sorted([int(x) for x in input().strip().split()], reverse=True)
b = [len([ci for ci in c]) for (g, c) in groupby(a)]
all_even = True
for bi in b:
	if bi & 1:
		all_even = False
		break
print('Conan' if not all_even else 'Agasa')


from collections import Counter

def main():
	N = int(input())
	A = tuple(map(int, input().split()))
	cnt = Counter(A)
	a = set(A)
	for i in a:
		if cnt[i] & 1:
			print('Conan')
			break
	else:
		print('Agasa')
main()


n = int(input())
a = list(map(int, input().split()))
f = dict()
for x in a:
	if x in f:
		f[x] += 1
	else:
		f[x] = 1
for key in f:
	if f[key] % 2 == 1:
		print('Conan')
		exit(0)
print('Agasa')


from sys import stdin, stdout
from sys import maxsize
input = stdin.readline

def solve():
	pass
test = 1
for t in range(0, test):
	n = int(input().strip())
	a = [int(x) for x in input().strip().split()]
	a.sort()
	i = 0
	while i < n:
		cnt = 0
		j = i
		while j < n and a[i] == a[j]:
			j += 1
		cnt = j - i
		if cnt % 2 == 1:
			print('Conan')
			break
		i = j
	else:
		print('Agasa')
	ans = solve()


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
counts = []
curr = 1
for i in range(1, n):
	if a[i - 1] != a[i]:
		counts.append(curr)
		curr = 1
	else:
		curr += 1
counts.append(curr)
m = len(counts)
ans = False
for i in range(m):
	if counts[i] % 2 == 1:
		ans = True
		continue
if ans:
	print('Conan')
else:
	print('Agasa')


from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
dict_a = Counter(a)
a_sorted = sorted(list(set(a)), reverse=True)
for i in a:
	if dict_a[i] % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


n = int(input())
x = list(map(int, input().split()))
ans = 0
a = (10 ** 5 + 1) * [0]
for i in range(n):
	a[x[i] - 1] += 1
for j in range(len(a)):
	ans += a[-j - 1]
	if ans % 2 != 0:
		print('Conan')
		exit()
if ans % 2 == 0:
	print('Agasa')


n = int(input())
l = [int(i) for i in input().split()]
m = max(l)
cnt = l.count(m)
if cnt & 1:
	print('Conan')
else:
	from collections import Counter
	c = Counter(l)
	even = 0
	for i in c:
		if c[i] % 2 == 1:
			even += 1
	if even >= 1:
		print('Conan')
	else:
		print('Agasa')


from collections import *
i = input
i()
print(['Agasa', 'Conan'][any((x[1] & 1 for x in Counter(i().split()).most_common()))])


def loles(c):
	l = len(c)
	for i in range(l - 1, -1, -1):
		if c[i] % 2 == 1:
			return 'Conan'
	return 'Agasa'
n = int(input())
a = list(map(int, input().split()))
b = {}
c = []
for e in a:
	if e in b:
		b[e] += 1
	else:
		b[e] = 1
for e in b:
	c.append(b[e])
print(loles(c))


n = int(input())
lst = list(map(int, input().split()))
numCnt = [0] * (10 ** 5 + 1)
for i in range(n):
	numCnt[lst[i]] += 1
if any([i % 2 == 1 for i in numCnt]):
	print('Conan')
else:
	print('Agasa')


n = list(map(int, input().strip().split()))
arr = list(map(int, input().strip().split()))
arr.sort()
dp = dict()
find = []
for i in arr:
	if i in dp:
		dp[i] += 1
	else:
		dp[i] = 1
		find.append(i)
answer = 'Agasa'
for i in range(len(find) - 1, -1, -1):
	if dp[find[i]] % 2 == 1:
		answer = 'Conan'
		break
	else:
		continue
print(answer)


d = dict()
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
for it in a:
	if it not in d:
		d[it] = 1
	else:
		d[it] += 1
for key in d:
	if d[key] & 1:
		print('Conan')
		quit()
print('Agasa')


n = int(input())
map = dict()
for i in input().split():
	map[i] = map.get(i, 0) + 1
for k in sorted(map, reverse=True):
	if map[k] % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


import collections as c
n = int(input())
l = list(map(int, input().split()))
d = c.Counter(l)
f = 0
for i in d.keys():
	if d[i] % 2 == 1:
		print('Conan')
		f = 1
		break
if f == 0:
	print('Agasa')


kk = lambda : map(int, input().split())
(n, d) = (input(), {})
for v in kk():
	if v not in d:
		d[v] = 0
	d[v] += 1
for k in d:
	if d[k] & 1:
		print('Conan')
		exit()
print('Agasa')


import re
n = int(input())
d = {}
for i in map(int, input().split()):
	if not i in d:
		d[i] = 0
	d[i] += 1
for i in d.values():
	if i % 2 == 1:
		print('Conan')
		quit()
print('Agasa')


def getAns(nums):
	counter = {}
	for x in nums:
		if x in counter:
			counter[x] += 1
		else:
			counter[x] = 1
	for x in counter:
		if counter[x] % 2 == 1:
			return 'Conan'
	return 'Agasa'

def main():
	m = input()
	nums = list(map(lambda x: int(x), input().split(' ')))
	print(getAns(sorted(nums, reverse=True)))
main()


import itertools as its
n = int(input())
a = sorted(list(map(int, input().split())))
for (k, v) in its.groupby(a):
	if len(list(v)) % 2 == 1:
		print('Conan')
		quit()
print('Agasa')


n = int(input())
a = [int(x) for x in input().split()]
b = [0] * 100005
for k in range(len(a)):
	b[a[k]] += 1
abc = []
for i in range(100005):
	if b[i] != 0:
		abc.append((i, b[i]))
abc.sort(reverse=True)
flag = 0
for j in range(len(abc)):
	if abc[j][1] % 2 == 1:
		flag = 1
		break
if flag:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
mx = max(a)
cnt_max = a.count(mx)
if cnt_max % 2 == 1:
	print('Conan')
else:
	a.sort()
	cnt = []
	c = 1
	for i in range(1, n):
		if a[i] == a[i - 1]:
			c += 1
		else:
			cnt.append(c)
			c = 1
	f = 1
	for i in range(len(cnt)):
		if cnt[i] % 2 == 1:
			f = 0
			break
	if f == 0:
		print('Conan')
	else:
		print('Agasa')


import sys
from collections import Counter
n = int(sys.stdin.readline().strip())
a = [int(x) for x in sys.stdin.readline().strip().split(' ')]
b = list(Counter(a).values())
p = sum([x % 2 for x in b])
p1 = 'Conan'
p2 = 'Agasa'
if p:
	print(p1)
else:
	print(p2)


yolo = int(input())
pren = [int(z) for z in input().split()]
nam = max(pren)
jake = []
like = False
for i in range(nam + 1):
	jake.append(0)
for j in pren:
	jake[j] += 1
for k in jake:
	if k % 2 == 1:
		like = True
if like == False:
	print('Agasa')
else:
	print('Conan')


n = int(input())
a = [int(i) for i in input().split()]
dic = {}
for i in range(n):
	if a[i] in dic:
		if dic[a[i]] == 1:
			dic[a[i]] = 0
		else:
			dic[a[i]] = 1
	else:
		dic[a[i]] = 1
t1 = 0
for i in dic:
	if dic[i] == 1:
		t1 += 1
		break
if t1 == 1:
	print('Conan')
else:
	print('Agasa')


n = int(input())
a = input().split()
for i in range(n):
	a[i] = int(a[i])
a.sort()
k = 0
h = a[0]
for i in a:
	if i == h:
		if k == 1:
			k = 0
		else:
			k = 1
	else:
		if k == 1:
			p = 1
			break
		k = 1
	h = i
if k == 1:
	print('Conan')
else:
	print('Agasa')


n = input()
a = input().split()
d = dict()
for x in a:
	y = int(x)
	if d.get(y) is not None:
		d[y] += 1
	else:
		d[y] = 1
conanIsWin = False
remForWin = 1
for i in reversed(range(1, 100001)):
	z = d.get(i)
	if z is None:
		continue
	if z % 2 == remForWin:
		conanIsWin = True
		break
if conanIsWin:
	print('Conan')
else:
	print('Agasa')


import collections
n = int(input())
temp = [int(x) for x in input().split()]
d = collections.Counter(temp)
switch = True
for i in d.keys():
	if d[i] % 2 == 1:
		print('Conan')
		switch = False
		break
if switch:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
ans = [0] * int(1000000.0 + 1)
for i in a:
	ans[i] += 1
winner = 'Agasa'
for i in ans:
	if i % 2:
		winner = 'Conan'
		break
print(winner)


a = input()
b = [int(i) for i in input().split()]
b.sort()
i = -2
d = b[-1]
c = len(b)
s = 1
while i >= -c:
	if b[i] == d:
		s += 1
	elif s % 2 == 0:
		d = b[i]
		s = 1
	else:
		break
	i -= 1
if s % 2:
	print('Conan')
else:
	print('Agasa')


n = int(input())
cards = dict()
S = input().split(' ')
for i in range(n):
	k = int(S[i])
	if k in cards:
		cards[k] += 1
	else:
		cards[k] = 1
L = list(cards.keys())
L.sort()
b = True
if n % 2 == 0:
	for e in L:
		if cards[e] % 2 != 0:
			b = False
			break
else:
	b = False
if b:
	print('Agasa')
else:
	print('Conan')


input()
c = 0
f = [0] * 100001
for x in map(int, input().split()):
	f[x] += 1
	c += f[x] % 2 * 2 - 1
print(['Agasa', 'Conan'][c > 0])


n = int(input())
l = list(map(int, input().split()))
l1 = [0] * (max(l) + 1)
for i in range(n):
	l1[l[i]] += 1
for elem in l1:
	if elem % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


def main():
	n = int(input())
	x = list(map(int, input().split()))
	ans = [0 for i in range(100002)]
	for i in x:
		ans[i] += 1
	for i in ans:
		if i % 2 == 1:
			print('Conan')
			return 0
	print('Agasa')
	return 0
main()


n = int(input())
a = list(map(int, input().split()))
freq = [0 for i in range(10 ** 5 + 1)]
for ele in a:
	freq[ele] += 1
flag = False
for ele in freq:
	if ele % 2:
		flag = True
if flag:
	print('Conan')
else:
	print('Agasa')


from collections import Counter
n = int(input())
a = list(map(int, input().split()))
if a.count(max(a)) % 2 == 1:
	print('Conan')
else:
	c = Counter(a)
	li = []
	for x in c:
		li += [x]
	li.sort(reverse=True)
	for x in li:
		if c[x] % 2 == 1:
			print('Conan')
			exit()
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))[:n]
values = [0 for i in range(100001)]
for i in a:
	values[i] += 1
for i in reversed(a):
	if values[i] % 2 == 1:
		print('Conan')
		exit()
print('Agasa')


n = int(input())
inp = lambda : map(int, input().split())
a = list(inp())
fl = 0
lab = [0] * (10 ** 5 + 1)
for i in range(n):
	lab[a[i]] += 1
for i in range(10 ** 5 + 1):
	if lab[i] % 2 == 1:
		fl = 1
if fl == 0:
	print('Agasa')
else:
	print('Conan')


n = int(input())
a = list(map(int, input().strip().split(' ')))
a.sort()
b = []
x = -1
c = 0
for i in a:
	if x == -1:
		x = i
		c = 1
	elif x == i:
		c += 1
	else:
		b.append((x, c))
		x = i
		c = 1
b.append((x, c))
n = len(b)
f = 0
for i in range(n):
	if b[i][1] % 2 == 1:
		f = 1
		print('Conan')
		break
if f == 0:
	print('Agasa')


n = int(input())
a = input().split()
for i in range(n):
	a[i] = int(a[i])
numbers = {}
for i in range(n):
	try:
		numbers[a[i]] += 1
	except:
		numbers[a[i]] = 1
sizes = []
for key in numbers.keys():
	val = numbers[key]
	sizes.append([key, val])
sizes.sort(key=lambda x: x[0])
sizes = sizes[::-1]
done = False
for pair in sizes:
	if pair[1] % 2 == 1:
		print('Conan')
		done = True
		break
if not done:
	print('Agasa')


def Main():
	n = int(input())
	numbers = sorted(map(int, input().split()))
	steps = 0
	nmb_old = 0
	numbers.reverse()
	for nmb in numbers:
		if steps == 0:
			nmb_old = nmb
		if nmb_old == nmb:
			steps += 1
		elif steps % 2 == 1:
			break
		else:
			nmb_old = nmb
			steps += 1
	if steps % 2 == 1:
		return 'Conan'
	else:
		return 'Agasa'
print(Main())


n = int(input())
a = list(map(int, input().split()))
b = [0] * 200000
for x in a:
	b[x] += 1
f = True
for x in b:
	if x % 2 == 1:
		f = False
		break
if f:
	print('Agasa')
else:
	print('Conan')


from collections import Counter

def main():
	p = ['Conan', 'Agasa']
	n = int(input())
	cards = [int(c) for c in input().split()]
	cnt = Counter(cards)
	if cards.count(max(cards)) == 1:
		print(p[0])
		return
	odd = 0
	for v in cnt.values():
		if v % 2 != 0:
			odd += 1
	print(p[0] if odd != 0 else p[1])
main()


n = int(input())
T = input().split()
A = [0] * (n + 5)
dp = [0] * (n + 5)

def ok(x):
	if A[x + 1] != A[x]:
		return 1
	return 0
for i in range(0, n):
	A[i] = int(T[i]) * -1
A.sort()
dp[0] = 1
naj = 0
for i in range(0, n):
	dp[i + 1] = max(dp[i], naj)
	dp[i + 1] ^= 1
	if ok(i) == 1:
		naj = max(naj, dp[i])
if dp[n] == 1:
	print('Agasa')
else:
	print('Conan')


n = int(input())
ns = [int(_) for _ in input().strip().split()]
counts = [0 for i in range(100000 + 1)]
for i in ns:
	counts[i] += 1
c = False
for i in counts:
	if i % 2 == 1:
		c = True
if c:
	print('Conan')
else:
	print('Agasa')


n = int(input())
l = list(map(int, input().split()))
l.sort(reverse=True)
i = 0
last = 0
done = False
while True:
	while i != n and l[i] == l[last]:
		i += 1
	last = i
	if i & 1:
		print('Conan')
		done = True
		break
	elif i == n:
		done = True
		print('Agasa')
		break
if not done:
	print('Agasa')


n = int(input())
A = [int(x) for x in input().split()]
B = list(set(A))
test = 0
di = {}
for i in B:
	di[i] = 0
for i in A:
	di[i] += 1
for (key, values) in di.items():
	if values & 1:
		test = 1
		break
if test:
	print('Conan')
else:
	print('Agasa')


inf = 10 ** 5 + 1
n = int(input().strip())
ar = [0] * inf
for i in map(int, input().split()):
	ar[i] += 1
for i in range(inf - 1, -1, -1):
	if ar[i] and ar[i] & 1:
		print('Conan')
		break
else:
	print('Agasa')


n = int(input())
A = list(map(int, input().split()))
hod = {}
fl = 1
for i in A:
	if i not in hod:
		hod[i] = 0
	hod[i] += 1
for k in hod:
	if hod[k] % 2:
		print('Conan')
		fl = 0
		break
if fl:
	print('Agasa')


from collections import Counter
n = int(input())
l = list(map(int, input().split()))
cc = Counter(l)
for i in cc.values():
	if i % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')


n = int(input())
a = list(map(int, input().split()))
l1 = [0] * 100001
for item in a:
	l1[item] += 1
ans = 'Agasa'
for item in l1:
	if item % 2:
		ans = 'Conan'
		break
print(ans)


def solve(L: list):
	d = dict()
	for x in L:
		if x not in d.keys():
			d[x] = 1
		else:
			d[x] += 1
	k = list(d.keys())
	k.sort(reverse=True)
	for x in k:
		if d[x] % 2 == 1:
			print('Conan')
			return
	print('Agasa')
	return
n = int(input())
L = map(int, input().split())
solve(list(L))


import sys, math
from collections import Counter
DEBUG = False

def ni():
	return int(input())

def nia():
	return list(map(int, input().split()))

def log(x):
	if DEBUG:
		print(x)
if DEBUG:
	sys.stdin = open('b.in')
n = ni()
a = nia()
a.sort(reverse=True)
cnt = Counter()
for x in a:
	cnt[x] += 1
log(n)
log(a)
ans = True
for x in a:
	if cnt[x] % 2 == 1:
		ans = False
		break
if ans:
	print('Agasa')
else:
	print('Conan')


n = int(input())
nums = list(map(int, input().strip().split()))
counts = {}
for num in nums:
	if num in counts:
		counts[num] += 1
	else:
		counts[num] = 1
ans = 'Agasa'
for (k, v) in counts.items():
	if v % 2 != 0:
		ans = 'Conan'
		break
print(ans)


bbb = True
m = int(input())
a = list(map(int, input().split()))
b = [0 for _ in range(110000)]
for i in range(0, m):
	b[a[i]] += 1
for i in range(0, 101000):
	if b[i] % 2 != 0:
		bbb = False
		print('Conan')
		break
if bbb:
	print('Agasa')


n = int(input(''))
arr = list(map(int, input().split()))
arr.sort()
x = arr.count(arr[n - 1])
if x % 2:
	print('Conan')
else:
	cnt = [0] * 100005
	for i in arr:
		cnt[i] += 1
	flag = 0
	for i in cnt:
		if i % 2:
			flag = 1
			break
	if flag:
		print('Conan')
	else:
		print('Agasa')


n = int(input())
a = [int(z) for z in input().split()]
b = [0] * 100228
for elem in a:
	b[elem] += 1
for elem in b:
	if elem % 2 == 1:
		print('Conan')
		exit(0)
print('Agasa')


n = int(input().strip())
data = list(map(int, input().split()))
data.sort()

def search(d):
	idx = len(d) - 1
	while idx >= 0:
		cnt = 1
		idx -= 1
		while idx >= 0 and d[idx] == d[idx + 1]:
			cnt += 1
			idx -= 1
		if cnt % 2 == 1:
			return 'Conan'
	return 'Agasa'
print(search(data))


n = int(input())
a = list(map(int, input().split()))
d = dict()
for i in a:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
import collections
nd = collections.OrderedDict(sorted(d.items(), key=lambda t: t[0], reverse=True))
for i in nd:
	if nd[i] % 2 == 1:
		print('Conan')
		break
else:
	print('Agasa')