#include
#include<math.h>
using namespace std;
int main() {
int n;
cin>>n;
for(int k=0;k<n;k++)
{long long int m,n;
cin>>m>>n;
long long int naayush=pow(m,0.5);
long long int nharshit=n/2;
int i=1;
while(naayush!=0 && nharshit!=0){
if(i%2!=0) naayush--;
else nharshit--;
i++;
}
if(naayush==0) cout<<"Harshit"<<endl;
else cout<<"Aayush"<<endl;}
return 0;
}