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. for i in s[0][1:-1]:
  10. if len(list(set(i)&set(numbers))) >= 1 and len(list(set(i)&set(upper_case))) >= 1 and len(list(set(i)&set(special_characters))) >=1:
  11. print('YES')
  12. else:
  13. print('NO')
  14.  
Success #stdin #stdout 0.02s 9156KB
stdin
3
#cookOff#P1
U@code4CHEFINA
gR3@tPWD
stdout
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO