#include<bits/stdc++.h>
#define FileIO freopen("input.in", "r", stdin); freopen("output.in", "w", stdout)
#define ll long long
#define input_vec(v) for(int II=0; II<v.size(); II++) cin >> v[II];
#define sortf(v) sort(v.begin(), v.end());
#define sortr(v) sort(v.rbegin(), v.rend());
#define print_vec(v) for(int II=0; II<v.size(); II++){cout << v[II];} cout << endl;
using namespace std;
void test_case(int tc)
{
int n, k;
cin>>n>>k;
vector <int> v(n);
for(auto &i: v) cin>>i;
int ans=0;
for(int i=0;i<n;i++){
ans=ans^(v[i]%(k+1));
}
if(ans){
cout<<"Hridoy"<<endl;
}
else cout<<"Kamona"<<endl;
}
int main()
{
//if(fopen("input.in", "r")) FileIO;
int n; cin >> n;
for(int i=0; i<n; i++) test_case(i+1);
}