#include <iostream>
using namespace std;
int main()
{
int x;
while(cin >> x)
{
if(x%5>0)
{
if(x%5==4)
{
cout << "I" << endl;
}
else if(x%5==3)
{
cout << "T" << endl;
}
else if(x%5==2)
{
cout << "Y" << endl;
}
else if(x%5==1)
{
cout << "G" << endl;
}
}
else
{
cout << "U" << endl;
}
}
return 0;
}