#include <iostream>
using namespace std;
int platform[3][3];
bool visited[3][3];
int n;
int success = 0;
void check(int i, int j) {
if (i < 0 || i >= n || j < 0 || j >= n || visited[i][j] || success==1)
return;
visited[i][j] = true;
if (platform[i][j] == -1) {
success = 1;
return;
}
int jump = platform[i][j];
check(i + jump, j);
check(i, j + jump);
}
int main() {
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
cin >> platform[i][j];
check(0, 0);
if (success)
cout << "HaruHaru";
else
cout << "Hing";
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: