fork(1) download
  1. t = int(input())
  2. numbers = "0123456789"
  3. lower_case = "abcdefghijklmnopqrstuvwxyz"
  4. upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  5. special_characters = "!@#$%^&*()-+"
  6. for i in range(t):
  7. s = input().split()
  8. if len(s[0]) >= 10:
  9. if len(list(set(s[0][1:-1])&set(numbers))) >= 1 and len(list(set(s[0][1:-1])&set(upper_case))) >= 1 and len(list(set(s[0][1:-1])&set(special_characters))) >=1:
  10. print('YES')
  11. print('NO')
  12. print('NO')
  13.  
Success #stdin #stdout 0.02s 9256KB
stdin
3
#cookOff#P1
U@code4CHEFINA
gR3@tPWD
stdout
NO
NO
YES
NO
NO
NO