#include <iostream>
using namespace std;
// #include <iostream>
// using namespace std;
struct table
{
int idx;
char text[20];
};
struct table data[] =
{
{0, "Goodnight"},
{4, "Goodmorning"},
{12, "Goodafternonn"},
{18, "Goodevening"},
{23, "Goodnight"}
};
int main()
{
int n;
while (1)
{
cout << "何時(0~23)";
cin >> n;
if (n == -1)return 0;
if ((n < 0) || (n > 23))continue;
for (int i = sizeof(data) / sizeof(data[0]); --i >= 0;)
{
if (n >= data[i].idx)
{
cout << data[i].text << endl;
break;
}
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwovLyAjaW5jbHVkZSA8aW9zdHJlYW0+Ci8vIHVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpzdHJ1Y3QgdGFibGUKewogICAgaW50IGlkeDsKICAgIGNoYXIgdGV4dFsyMF07Cgp9OwoKc3RydWN0IHRhYmxlIGRhdGFbXSA9CnsKICAgIHswLCAiR29vZG5pZ2h0In0sCiAgICB7NCwgIkdvb2Rtb3JuaW5nIn0sCiAgICB7MTIsICJHb29kYWZ0ZXJub25uIn0sCiAgICB7MTgsICJHb29kZXZlbmluZyJ9LAogICAgezIzLCAiR29vZG5pZ2h0In0KfTsKCmludCBtYWluKCkKewogICAgaW50IG47CiAgICB3aGlsZSAoMSkKICAgIHsKICAgICAgICBjb3V0IDw8ICLkvZXmmYLvvIgw772eMjPvvIkiOwogICAgICAgIGNpbiA+PiBuOwogICAgICAgIGlmIChuID09IC0xKXJldHVybiAwOwogICAgICAgIGlmICgobiA8IDApIHx8IChuID4gMjMpKWNvbnRpbnVlOwogICAgICAgIGZvciAoaW50IGkgPSBzaXplb2YoZGF0YSkgLyBzaXplb2YoZGF0YVswXSk7IC0taSA+PSAwOykKICAgICAgICB7CiAgICAgICAgICAgIGlmIChuID49IGRhdGFbaV0uaWR4KQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBjb3V0IDw8IGRhdGFbaV0udGV4dCA8PCBlbmRsOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gMDsKfQo=