///P2- 駭客不要來 - 密碼分析器

#include <iostream>
#include <cctype>
#include <cstring>
using namespace std;

bool checklength(char []);
bool withLowUpper(char []);
bool withAlphaDigit(char []);

int main()
{
    char pass[50];

    while (cin >> pass)
    {
        int security = 0;
        if (checklength(pass)) security++;
        if (withLowUpper(pass)) security++;
        if (withAlphaDigit(pass)) security++;

        switch (security)
        {
        case 0:
            cout <<"This password is WEAK" << endl;
            break;
        case 1:
            cout << "This password is ACCEPTABLE"<< endl;
            break;
        case 2:
            cout <<"This password is GOOD" << endl;
            break;
        case 3:
            cout << "This password is STRONG" << endl;
            break;
        }
    }

    return 0;
}

bool checklength(char s[50])
{
    if (strlen(s)>=8)
        return true;
    else
        return false;
}

bool withLowUpper(char s[50])
{
   int l=0;
   int u=0;
   for (int i=0; i<strlen(s); i++)
   {
       if (isupper(s[i])) u++;
       if (islower(s[i])) l++;
       if (u>0 && l>0) return true;
   }
   return false;
}

bool withAlphaDigit(char s[50])
{
   int a=0;
   int d=0;
   for (int i=0; i<strlen(s); i++)
   {
       if (isalpha(s[i])) a++;
       else d++;
       if (a>0 && d>0) return true;
   }
   return false;
}


/*
lizard
aardvark
Aardvark
Aardvark77
A1234567890
ccH23455245
yzL0802
00000000
123456
sPookyFiSH3
$PookyFI3H
sPookyFISH
spookyfish
*/

/*
lizard
This password is WEAK
aardvark
This password is ACCEPTABLE
Aardvark
This password is GOOD
Aardvark77
This password is STRONG
A1234567890
This password is GOOD
ccH23455245
This password is STRONG
yzL0802
This password is GOOD
00000000
This password is ACCEPTABLE
123456
This password is WEAK
sPookyFiSH3
This password is STRONG
$PookyFI3H
This password is STRONG
sPookyFISH
This password is GOOD
spookyfish
This password is ACCEPTABLE
$P
This password is ACCEPTABLE
*/
