403862: GYM101343 D Husam's Bug
Description
Two days ago, Husam was very busy in preparing for the 2017 JUST Programming contest 2.0. He was creating user name and password for each team, each password he creates must meet the following conditions:
- The password contains at least 4 English letters.
- The password contains at least 4 digits.
- The password contains at least 2 symbols. The available symbols are '@', '?', and '!'.
Can you help us to complete the passwords before the contest day start!
InputThe first line contains an integer n (1 ≤ n ≤ 100), where n is the number of teams in the contest.
Then n lines follow, each line contains a password. The length of each password is between 9 and 100 (inclusive).
OutputPrint "The last character must be a letter.", if the last character must be a letter.
Print "The last character must be a digit.", if the last character must be a digit.
Print "The last character must be a symbol.", if the last character must be a symbol.
Print "The last character can be any type.", if the last character can be any type.
ExamplesInput2Output
@az19g3544@
zz6?7aa89
The last character must be a letter.Input
The last character must be a symbol.
1Output
!ab55ab!66
The last character can be any type.