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: competition

Starter code:

Solutions:
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())
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")


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')

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())
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()

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 list(dd.keys()):
    if dd[k] % 2 == 1:
        odd_found = True

if odd_found:
    print("Conan")
else:
    print("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")


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 list(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

_ = 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')


import collections

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


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')

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())
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')
        return
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')

# int(input())
# [int(i) for i in input().split()]

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)
#print(counts)

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 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
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())
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")

#!/usr/bin/env python3
#! -*- coding: utf-8 -*-
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()

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")


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

from collections import Counter

cards = Counter(ns)
#print(cards)

# given largest cards, invariant is parity of copies
parities = sorted([item for item in cards.items()], reverse=True)
for val, copies in parities:
    if copies % 2:  # odd copies off largest card
        print('Conan')
        break
else:
    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())
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())
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")