#include <bits/stdc++.h>
using namespace std;
int ans[2000];
char ss[][8] = { "oh!","yeah!" };
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
int s, n, m;
int cnt = 0;
scanf("%d%d%d", &s, &n, &m);
for (; n != m && s; --s)
{
if (m < n || m & 1)
{
++m;
ans[cnt++] = 1;
}
else
{
m >>= 1;
ans[cnt++] = 0;
}
}
if (!s && n != m)
puts("OMG!");
else
{
for (int i = cnt - 1; i >= 0; --i)
printf("%s%c", ss[ans[i]], " \n"[i == 0]);
}
}
// system("pause");
}