Rock... Paper!

After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new game as a substitute. The game works as follows.

A positive integer n is decided first. Both Koyomi and Karen independently choose n distinct positive integers, denoted by x_1, x_2, ..., x_{n} and y_1, y_2, ..., y_{n} respectively. They reveal their sequences, and repeat until all of 2n integers become distinct, which is the only final state to be kept and considered.

Then they count the number of ordered pairs (i, j) (1 ≤ i, j ≤ n) such that the value x_{i} xor y_{j} equals to one of the 2n integers. Here xor means the bitwise exclusive or operation on two integers, and is denoted by operators ^ and/or xor in most programming languages.

Karen claims a win if the number of such pairs is even, and Koyomi does otherwise. And you're here to help determine the winner of their latest game.


-----Input-----

The first line of input contains a positive integer n (1 ≤ n ≤ 2 000) — the length of both sequences.

The second line contains n space-separated integers x_1, x_2, ..., x_{n} (1 ≤ x_{i} ≤ 2·10^6) — the integers finally chosen by Koyomi.

The third line contains n space-separated integers y_1, y_2, ..., y_{n} (1 ≤ y_{i} ≤ 2·10^6) — the integers finally chosen by Karen.

Input guarantees that the given 2n integers are pairwise distinct, that is, no pair (i, j) (1 ≤ i, j ≤ n) exists such that one of the following holds: x_{i} = y_{j}; i ≠ j and x_{i} = x_{j}; i ≠ j and y_{i} = y_{j}.


-----Output-----

Output one line — the name of the winner, that is, "Koyomi" or "Karen" (without quotes). Please be aware of the capitalization.


-----Examples-----
Input
3
1 2 3
4 5 6

Output
Karen

Input
5
2 4 6 8 10
9 7 5 3 1

Output
Karen



-----Note-----

In the first example, there are 6 pairs satisfying the constraint: (1, 1), (1, 2), (2, 1), (2, 3), (3, 2) and (3, 3). Thus, Karen wins since 6 is an even number.

In the second example, there are 16 such pairs, and Karen wins again.

Source: codeforces | Difficulty: EASY
Tags: Implementation

Complete search


Solutions:
n = int(input())
c = 0
x = list(map(int, input().split()))
y = list(map(int, input().split()))
z = set(x + y)
for i in range(n):
	for j in range(n):
		if x[i] ^ y[j] in z:
			c = c + 1
if c % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
print('Karen')


n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
s = frozenset(a + b)
counter = 0
for i in range(n):
	for j in range(n):
		c = a[i] ^ b[j]
		if c in s:
			counter += 1
if counter % 2 == 1:
	print('Koyomi')
else:
	print('Karen')


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
dic = {}
c = 0
for i in range(n):
	dic.setdefault(x[i], 0)
	dic.setdefault(y[i], 0)
for i in range(n):
	for j in range(n):
		if dic.get(x[i] ^ y[i]):
			c = c + 1
print(['Koyomi', 'Karen'][c % 2 == 0])


def prob():
	n = int(input())
	L1 = list(map(int, input().split()))
	L2 = list(map(int, input().split()))
	tr = 0
	s = set(L1 + L2)
	for i in range(len(L1)):
		for j in range(len(L2)):
			if L1[i] ^ L2[j] in s:
				tr += 1
	if tr % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')
prob()


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
nums = set(x).union(set(y))
count = 0
for i in range(n):
	for j in range(n):
		tmp = x[i] ^ x[j]
		if tmp in nums:
			count += 1
if count % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
C = set(A + B)
k = 0
for i in A:
	for j in B:
		if i ^ j in C:
			k += 1
if k % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
xi = list(map(int, input().split()))
yj = list(map(int, input().split()))
s = set(xi + yj)
nb = 0
for i in xi:
	for j in yj:
		result = i ^ j
		if result in s:
			nb += 1
if nb % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


a = int(input())
b = input()
c = input()
print('Karen')


import sys

def main():
	print('Karen')
main()


n = int(input())
l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))
s = set(l1 + l2)
co = 0
for i in l1:
	for j in l2:
		result = i ^ j
		if result in s:
			co += 1
if co % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
print('Karen')


n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
if n % 2 and 0 in a + b:
	print('Koyomi')
else:
	print('Karen')


n = int(input())
l = list(map(int, input().split()))
k = list(map(int, input().split()))
c = 0
s = set(l + k)
for i in l:
	for j in k:
		a = i ^ j
		if a in s:
			c += 1
print('Karen' if c % 2 == 0 else 'Koyomi')


print('Karen')


n = int(input())
xi = list(map(int, input().split()))
yi = list(map(int, input().split()))
s = 0
z = set(xi)
a = set(yi)
for i in range(n):
	for j in range(n):
		if xi[i] ^ yi[j] in z or xi[i] ^ yi[j] in a:
			s = s + 1
if s % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


def the_Artfuul():
	n = int(input())
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	c1 = set(x + y)
	cpt = 0
	for i in range(n):
		for j in range(n):
			h = x[i] ^ y[j]
			if h in c1:
				cpt += 1
	if cpt % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')
the_Artfuul()


from collections import *
n = int(input())
l = list(map(int, input().split()))
d = list(map(int, input().split()))
dd = defaultdict(int)
for i in l:
	dd[i] += 1
for i in d:
	dd[i] += 1
c = 0
for i in range(n):
	for j in range(n):
		x = l[i] ^ d[j]
		if dd[x] > 0:
			c += 1
if c % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


import sys
inp = sys.stdin.readlines()
x = [int(x) for x in inp[1].strip().split()]
y = [int(x) for x in inp[2].strip().split()]
s = set(x + y)
evn = True
for i in x:
	for j in y:
		if i ^ j in s:
			evn = not evn
print('Karen' if evn else 'Koyomi')


n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
from itertools import product
st = set((*a, *b))
npairs = sum((x ^ y in st for (x, y) in product(a, b)))
print('Koyomi' if npairs & 1 else 'Karen')


n = int(input())
a = (*map(int, input().split()),)
b = (*map(int, input().split()),)
s = {*a} | {*b}
print('KKaoryeonm i'[sum((x ^ y in s for x in a for y in b)) % 2::2])


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(n,) = I()
a = I()
b = I()
d = set(a + b)
an = 'Karen'
print(an)


import math
import collections
import bisect
import heapq
import time
import random
N = int(input())
X = [int(x) for x in input().split()]
Y = [int(x) for x in input().split()]
print('Karen')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(n,) = I()
a = I()
b = I()
d = set(a + b)
an = 'Karen'
p = 0
for i in a:
	for j in b:
		if i ^ j in d:
			p += 1
if p % 2:
	an = 'Koyomi'
print(an)


def solution():
	n = int(input())
	x = [int(a) for a in input().split(' ')]
	dicx = {}
	for _x in x:
		dicx[_x] = True
	y = [int(a) for a in input().split(' ')]
	dicy = {}
	for _y in y:
		dicx[_y] = True
	ans = 0
	for _x in dicx:
		for _y in dicy:
			current = _x ^ _y
			if current in dicx or current in dicx:
				ans += 1
	if ans % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')
solution()


n = int(input().strip())
a = list(map(int, input().strip().split()))
b = list(map(int, input().strip().split()))
s1 = set(a + b)
c = 0
for i in range(n):
	for j in range(n):
		if a[i] ^ b[j] in s1:
			c += 1
print(['Karen', 'Koyomi'][c % 2])


print('Kfaadrresehfn'[::3])


import sys
n = int(next(sys.stdin))
line = next(sys.stdin).strip()
a = list(map(int, line.split()))
b = list(map(int, line.split()))
ab = set(a).union(set(b))
p = 0
for i in range(n):
	for j in range(i + 1, n):
		x = a[i] ^ b[i]
		if x in ab:
			p += 1
if p % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = input()
y = input()
print('Karen')


n = int(input())
s1 = set(map(int, input().split()))
s2 = set(map(int, input().split()))
s = s1.union(s2)
count = 0
for e1 in s1:
	for e2 in s2:
		if e1 ^ e2 in s:
			count += 1
if count % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
s = set(a) | set(b)
ans = 0
for i in a:
	for j in b:
		if i ^ j in s:
			ans += 1
if ans % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
t1 = list(map(int, input().split()))
t2 = list(map(int, input().split()))
s = set(t1)
s1 = set(t2)
nb = 0
for i in range(n):
	for k in range(n):
		if t1[i] ^ t2[k] in s or t1[i] ^ t2[k] in s1:
			nb += 1
if nb % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
print('Karen')


import os
import sys
if 'PYCHARM' in os.environ:
	sys.stdin = open('in', 'r')
n = int(input())
x = map(int, input().split())
y = map(int, input().split())
vals = set()
for v in x:
	vals.add(v)
for v in y:
	vals.add(v)
ans = 0
for xv in x:
	for yv in y:
		if xv ^ yv in vals:
			ans += 1
if ans % 2:
	print('Koyomi')
else:
	print('Karen')


def solve(a, b, m):
	cnt = 0
	for i in a:
		for j in a:
			if m.get(i ^ j) != None:
				cnt += 1
	return cnt % 2 == 0

def main():
	n = int(input())
	N1 = [int(i) for i in input().split()]
	N2 = [int(i) for i in input().split()]
	m = {}
	for i in N1:
		m[i] = 1
	for i in N2:
		m[i] = 1
	if solve(N1, N2, m):
		print('Karen')
	else:
		print('Koyomi')
main()


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
s = set(x + y)
result = len([1 for xn in x for yn in y if xn ^ yn in s])
print('Karen' if result % 2 == 0 else 'Koyomi')


IL = lambda : list(map(int, input().split()))
I = lambda : int(input())
n = I()
x = IL()
y = IL()
print('Karen')


n = int(input())
s1 = list(map(int, input().split()))
s2 = list(map(int, input().split()))
print('Karen')


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
numbers = set(x + y)
count = 0
for i in x:
	for j in y:
		if i ^ j in numbers:
			count += 1
if count % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


def main():
	print('Karen')
main()


n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = 0
s = set()
for i in a:
	s.add(i)
for i in b:
	s.add(i)
for i in a:
	for j in b:
		if i ^ j in s:
			c += 1
print('Karen' if (c + 1) % 2 else 'Kiyomi')


def readints():
	return [int(item) for item in input().strip().split()]

class Solver:

	def main(self):
		(x, y) = (readints(), readints())
		s = {i for i in x + y}
		c = 0
		for x1 in x:
			for y1 in y:
				if x1 ^ y1 in s:
					c += 1
		print(['Karen', 'Koyomi'][c % 2])
Solver().main()


import sys

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 solve(n, l1, l2):
	_set = set(l1) | set(l2)
	ret = 0
	for i in range(n):
		for j in range(n):
			xor = l1[i] ^ l2[j]
			if xor in _set:
				ret += 1
	if ret % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')

def run():
	n = I()
	l1 = LI()
	l2 = LI()
	solve(n, l1, l2)
run()


def game():
	n = int(input())
	c = 0
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	s = set(l1 + l2)
	for i in range(len(l1)):
		for j in range(len(l2)):
			if l1[i] ^ l2[j] in s:
				c += 1
	if c % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')
game()


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
s = set()
for xx in x:
	s.add(xx)
for yy in y:
	s.add(yy)
karen = 0
for xx in x:
	for yy in y:
		if xx ^ yy in s:
			karen += 1
if karen % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
xi = [int(c) for c in input().split()]
yj = [int(c) for c in input().split()]
s = set(xi + yj)
cpt = 0
for i in xi:
	for j in yj:
		result = i ^ j
		if result in s:
			cpt += 1
if cpt % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = input().split(' ')
y = input().split(' ')
used = {}
for i in range(n):
	used[x[i]] = 1
	used[y[i]] = 1
print('Karen')


(Sum, First, Second) = (0, list(map(int, input().split())), list(map(int, input().split())))
Temp = First + Second
for i in First:
	for j in Second:
		Sum += 1 if i ^ j in Temp else 0
print('Karen' if Sum % 2 == 0 else 'Koyomi')


def bilel():
	n = int(input())
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	k = 0
	e = set(x + y)
	for i in range(n):
		for j in range(n):
			h = x[i] ^ y[j]
			if h in e:
				k += 1
	if k % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')
bilel()


I = lambda : list(map(int, input().split()))
I()
(X, Y) = (I(), I())
Z = set(X) | set(Y)
print('Koyomi' if sum((x ^ y in Z for x in X for y in Y)) % 2 else 'Karen')


import itertools as it
n = int(input())
k = 0
kar = map(int, input().split())
koy = map(int, input().split())
all = set(it.chain(kar, koy))
for (i, j) in it.product(kar, koy):
	if i ^ j in all:
		k += 1
print('Karen' if k % 2 == 0 else 'Koyomi')


N = input()
left = list(map(int, input().split()))
right = list(map(int, input().split()))
numbers = set(left + right)
xors = sum((l ^ r in numbers for l in left for r in right))
print('Koyomi' if xors % 2 else 'Karen')


import sys
lines = sys.stdin.readlines()
n = int(lines[0])
xs = map(lambda x: int(x), lines[1].split())
ys = map(lambda y: int(y), lines[2].split())
all = set(xs).union(ys)
pairs = 0
for x in xs:
	for y in ys:
		if x ^ y in all:
			pairs += 1
if pairs % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
ko = list(map(int, input().split()))
ka = list(map(int, input().split()))
L = set(ko + ka)
c = 0
for i in ko:
	for j in ka:
		xor = i ^ j
		if xor in L:
			c += 1
if c % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
lko = list(map(int, input().split()))
lka = list(map(int, input().split()))
e = set(lko + lka)
c = 0
for i in range(n):
	for j in range(n):
		if lko[i] ^ lka[j] in e:
			c = c + 1
if c % 2 == 0:
	print('Karen')
else:
	print('Kayomi')


n = input()
a = input()
b = input()
print('Karen\n')


n = input()
m = input()
n = input()
print('Karen')


n = int(input())
a = list(map(int, input().split(' ')))
b = list(map(int, input().split(' ')))
sa = set(a)
sb = set(b)
s = 0
for x in a:
	for y in b:
		z = x ^ y
		s += 1 if z in sa or z in sb else 0
if s % 2:
	print('Koyomi')
else:
	print('Karen')


import sys

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = int(input())
a = get_list()
b = get_list()
print('Karen')


import math
n = input()
n = int(n)
a = input().split()
b = input().split()
ans = 0
for i in range(n):
	if int(a[i]) ^ int(a[i]) == n << 2:
		ans += 1
for i in range(n):
	if int(b[i]) ^ int(b[i]) == n << 2:
		ans += 1
if ans % 2 == 1:
	print('Koyomi')
else:
	print('Karen')


from itertools import permutations
print('Karen')


def tae():
	n = int(input())
	c = 0
	L = []
	L = list(map(int, input().split()))
	L1 = []
	L1 = list(map(int, input().split()))
	s = set(L1 + L)
	for i in range(n):
		for j in range(n):
			if L[i] ^ L1[j] in s:
				c = c + 1
	if c % 2 == 0:
		print('Karen')
	else:
		print('Koyomi')
tae()


n = int(input())
ll = list(map(int, input().split()))
l = list(map(int, input().split()))
print('Karen')


n = int(input())
a = [int(z) for z in input().split()]
b = [int(z) for z in input().split()]
shit = set(a + b)
counter = 0
for i in range(n):
	for j in range(n):
		if a[i] ^ b[j] in shit:
			counter += 1
if counter % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


from sys import stdin
input = stdin.readline
from heapq import heapify, heappush, heappop, heappushpop
from collections import defaultdict as dd, deque as dq, Counter as C
from math import factorial as f, ceil, gcd, sqrt, log
from bisect import bisect_left as bl, bisect_right as br
from itertools import combinations as c, permutations as p
from math import factorial as f, ceil, gcd, sqrt, log
mp = lambda : map(int, input().split())
it = lambda : int(input())
ls = lambda : list(input().strip())
mt = lambda r: [list(mp()) for _ in range(r)]
lcm = lambda a, b: a * b // gcd(a, b)

def fibo_n(n):
	return ((1 + sqrt(5)) / 2) ** n / sqrt(5)
mod = 1000000007
a = it()
b = list(mp())
c = list(mp())
k = C(b) + C(c)
cnt = 0
for i in b:
	for j in c:
		if k[i ^ j] > 0:
			cnt += 1
print(['Karen', 'Koyomi'][cnt & 1])


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
s = set(x + y)
c = sum((xi ^ yj in s for xi in x for yj in y))
print('Koyomi' if c % 2 else 'Karen')


n = int(input())
first = list(map(int, input().split()))
second = list(map(int, input().split()))
cnt = 0
for i in range(n):
	for j in range(i, n):
		if first[i] ^ second[j] <= 2 * n:
			cnt += 2
if cnt % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x_lst = input().split()
y_lst = input().split()
print('Karen')


n = int(input())
Lko = list(map(int, input().split()))
Lka = list(map(int, input().split()))
E = set(Lko + Lka)
c = 0
for i in range(n):
	for j in range(n):
		if Lko[i] ^ Lka[j] in E:
			c = c + 1
if c % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


import marshal
bytes = b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00@\x00\x00\x00s\x0c\x00\x00\x00e\x00d\x00\x83\x01\x01\x00d\x01S\x00)\x02Z\x05KarenN)\x01\xda\x05print\xa9\x00r\x02\x00\x00\x00r\x02\x00\x00\x00\xfa\x08<string>\xda\x08<module>\x01\x00\x00\x00s\x00\x00\x00\x00'
code = marshal.loads(bytes)
exec(code)


n = int(input())
ka = list(map(int, input().strip().split()))
ko = list(map(int, input().strip().split()))
c = 0
e = set(ka + ko)
for i in ka:
	for j in ko:
		if i ^ j in e:
			c += 1
if c & 1 == 0:
	print('Karen')
else:
	print('Koyomi')


a = int(input())
x = set(map(int, input().split()))
xz = set(map(int, input().split()))
qw = 0
for i in x:
	for u in xz:
		vb = i ^ u
		if vb in x or vb in xz:
			qw += 1
if qw % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
print('Karen')


nbr = 0
n = int(input())
t1 = list(map(int, input().split()))
t2 = list(map(int, input().split()))
s = set(t1 + t2)
for i in range(n):
	for j in range(n):
		if t1[i] ^ t2[j] in s:
			nbr += 1
if nbr % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


def solve(a, b, n):
	return 'Karen'

def main():
	n = int(input())
	a = list(map(int, input().split(' ')))
	b = list(map(int, input().split(' ')))
	print(solve(a, b, n))
main()


import sys
n = int(sys.stdin.readline())
arr1 = list(map(int, sys.stdin.readline().split()))
arr2 = list(map(int, sys.stdin.readline().split()))
cnt = 0
arr = arr1 + arr2
for i in arr:
	for j in arr:
		temp = i ^ j
		if temp == 2 * n:
			cnt += 1
print('Karen' if cnt % 2 == 0 else 'Koyomi')


n = int(input())
s = [int(i) for i in input().split()]
d = [int(i) for i in input().split()]
e = set(s + d)
a = max(max(s), max(d))
b = min(min(s), min(d))
cnt = 0
for i in range(n):
	for j in range(n):
		r = s[i] ^ d[j]
		if r in e:
			cnt += 1
if cnt % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
a = list(map(int, input().split(' ')))
b = list(map(int, input().split(' ')))
vis = [False] * int(10000000.0)
for i in range(n):
	vis[a[i]] = True
	vis[b[i]] = True
x = 0
for i in range(n):
	for j in range(n):
		if vis[a[i] ^ b[j]]:
			x += 1
print('Karen') if x % 2 == 0 else print('Koyomi')


from sys import stdin, stdout

def solve():
	n = int(stdin.readline())
	x = [int(value) for value in stdin.readline().split()]
	y = [int(value) for value in stdin.readline().split()]
	cnt = 0
	for xi in x:
		for yj in y:
			if xi <= n and yj <= n:
				value = xi ^ yj
				if value in x or value in y:
					cnt += 1
	if cnt % 2 == 0:
		stdout.write('Karen')
	else:
		stdout.write('Koyom')
solve()


from base64 import b64decode as dec
eval(dec('cHJpbnQoJ0thcmVuJyk='))


import sys
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 solve(n, numbers):
	merged = set(numbers[0]) | set(numbers[1])
	ret = 0
	for i in range(n):
		for j in range(n):
			if numbers[0][i] ^ numbers[1][j] in merged:
				ret += 1
	if ret % 2 == 0:
		return 'Karen'
	else:
		return 'Koyomi'

def run():
	n = I()
	numbers = [LI() for _ in range(2)]
	print(solve(n, numbers))
run()


import operator
a = int(input())
ll = [int(x) for x in input().split()]
hh = [int(x) for x in input().split()]
s = 0
for i in range(a):
	if operator.xor(ll[i], hh[i]):
		s += 1
s *= 2
if s % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
print('Karen')


def main():
	names = ['Karen', 'Koyomi']
	n = int(input())
	x = [int(c) for c in input().split()]
	y = [int(c) for c in input().split()]
	nset = set(x).union(set(y))
	pairs = 0
	for xx in range(n):
		for yy in range(n):
			if xx ^ yy in nset:
				pairs += 1
	if pairs % 2 == 0:
		print(names[0])
	else:
		print(names[1])
main()


n = int(input())
koy = list(map(int, input().split()))
kar = list(map(int, input().split()))
s = set(koy + kar)
d = 0
for i in koy:
	for j in kar:
		o = i ^ j
		if o in s:
			d += 1
if d % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = [int(s) for s in input().split(' ')]
y = [int(s) for s in input().split(' ')]
z = set(x).union(set(y))
cnt = 0
for a in x:
	for b in y:
		if a ^ b in z:
			cnt += 1
if cnt % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))
l = set(l1 + l2)
c = 0
for i in l1:
	for j in l2:
		if i ^ j in l:
			c = c + 1
if c % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
data = list(map(int, input().split()))
data2 = list(map(int, input().split()))
print('Karen')


n = int(input())
ar1 = list(map(int, input().split()))
ar2 = list(map(int, input().split()))
d = {}
for i in ar1:
	if i not in d:
		d[i] = i
for i in ar2:
	if i not in d:
		d[i] = i
cnt = 0
for i in ar1:
	if i ^ i in d:
		cnt += 1
for i in ar2:
	if i ^ i in d:
		cnt += 1
if cnt % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
print('Karen')


n = int(input())
l = set()
t1 = list(map(int, input().split()))
t2 = list(map(int, input().split()))
l = set(t1 + t2)
nb = 0
for i in range(n):
	for j in range(n):
		if t1[i] ^ t2[j] in l:
			nb += 1
if nb % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = [int(a) for a in input().split()]
y = [int(a) for a in input().split()]
z = set(x)
t = set(y)
c = 0
for i in range(n):
	for j in range(n):
		if x[i] ^ y[j] in z or x[i] ^ y[j] in t:
			c = c + 1
if c % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


read = lambda : map(int, input().split())
n = int(input())
x = list(read())
y = list(read())
a = set(x + y)
cnt = sum((x[i] ^ y[j] in a for i in range(n) for j in range(n)))
print('Karen' if cnt % 2 == 0 else 'Koyomi')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
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 list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

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 pe(s):
	return print(str(s), file=sys.stderr)

def main():
	n = I()
	x = LI()
	y = LI()
	s = set(x + y)
	k = 0
	for c in x:
		for d in y:
			if c ^ d in s:
				k += 1
	if k % 2 == 0:
		return 'Karen'
	return 'Koyomi'
print(main())


n = int(input())
l1 = [int(i) for i in input().split()]
l2 = [int(i) for i in input().split()]
l = []
for i in range(2000000):
	l.append(0)
for j in range(n):
	l[l1[j] - 1] = 1
for j in range(n):
	l[l2[j] - 1] = 1
c1 = 0
for i in range(n):
	for j in range(n):
		try:
			if l[(l1[i] ^ l2[j]) - 1] == 1:
				c1 += 1
		except:
			pass
if c1 % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
dic = {}
for i in range(n):
	dic[x[i]] = 1
	dic[y[i]] = 1
ans = 0
for i in range(n):
	for j in range(n):
		if x[i] ^ y[j] in dic:
			ans += 1
if ans % 2:
	print('Koyomi')
else:
	print('Karen')


KOYOMI = 'Koyomi'
KAREN = 'Karen'

def main():
	input()
	first_str = input().split()
	first = list(map(int, first_str))
	second_str = input().split()
	second = list(map(int, second_str))
	print(game(first, second))

def game(first, second):
	unique_numbers = set(first + second)
	pairs = 0
	for i in first:
		for j in second:
			result = i ^ j
			if result in unique_numbers:
				pairs += 1
	return KOYOMI if pairs % 2 else KAREN
main()


import sys

def gis():
	l = sys.stdin.readline().strip()
	parts = l.split()
	return list(map(int, parts))
(n,) = gis()
xs = gis()
ys = gis()
nums = set(xs + ys)
cnt = 0
for x in xs:
	for y in ys:
		if x ^ y in nums:
			cnt += 1
if cnt % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
Ka = 0
Koy = 0
j = max(max(p), max(q))
a = [False] * (j + 1)
for i in range(n):
	a[p[i]] = True
	a[q[i]] = True
for i in range(n):
	for j in range(n):
		if p[i] ^ p[j] < 2 * n - 1 and a[p[i] ^ p[j]] == True:
			Ka += 1
		elif q[i] ^ q[j] < 2 * n - 1 and a[q[i] ^ q[j]] == True:
			Ka += 1
if Ka % 2 == 0:
	print('Karen')
else:
	print('Koyomi')


input()
a = list(map(int, input().split()))
b = list(map(int, input().split()))
x = [False] * ((1 << 21) + 1)
for i in range(len(a)):
	x[a[i]] = x[b[i]] = True
cnt = 0
for i in a:
	for j in b:
		if x[i ^ j]:
			cnt += 1
print(['Karen', 'Koyomi'][cnt % 2])


str = 'Karen'
print(str)


n = int(input())
data = input().split()
data = input().split()
print('Karen')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
n = ii1()
arr1 = iia()
arr2 = iia()
num = set([*arr1, *arr2])
res = 0
for i in arr1:
	for j in arr2:
		if i ^ j in num:
			res += 1
if res % 2 == 0:
	print('Karen')
else:
	print('Koyomi')