A :: Let’s start the contest
Time Limit: 5 Seconds Memory Limit: 32768 KB
Passwords provide the first line of defence against unauthorized access to your computer. The stronger your password, the more protected your computer will be from hackers and malicious software. You should make sure you have strong passwords for all accounts on your computer. If you're using a corporate network, your network administrator might require you to use a strong password.
What makes a password strong (or weak)?
A strong password:
1. Is at least eight characters long.
2. Does not contain your user name, real name, or company name.
3. Does not contain a complete word.
4. Is significantly different from previous passwords.
5. Contains characters from each of the following four categories:
The above sentences were gathered from Microsoft website for creating a strong password.
But honestly, now, we aren’t concerned about your strategies for choosing passwords in your life! We just want to start the contest as simple as possible to prevent some bad memories occur again.
So for simplicity we just want you to check if some passwords has the condition 5 or not. For more simplicity you can restrict the symbols to these set:
SYM = {!, @, #, $, %, ^, &, *, (, )}
Note that ‘,’ and ‘{‘ and ‘}’ are not considered as SYM members.
Given a string S, you should print the security state of the password.
The security state of a password defined in this way, If given password has exactly D type of characters category its security state for:
• D = 1 is ‘very bad’
• D = 2 is ‘bad’
• D = 3 is ‘good’
• D = 4 is ‘overkill’
Input
The first line of the input contains an integer t (1 ≤ t ≤ 1000), the number of test cases.
Each test case has one string S, which consists of lowercase and uppercase English alphabets (‘a’...’z’ ’A’...’Z’), digits(‘0’...’9’) and members of SYM.
Length of S is less than 50.
Output
For each test case print the security state of password.
Sample Input
4 SaateConteste8Aban BarcaPerspolisRealEsteghlalNavadVoting numberofqualifiedteamstowfinpreviousyear @SBUContest2014
Sample Output
good bad very bad overkillSubmit
Source: 12th Iran Nationwide Internet Contest III