fork(2) download
  1. n = int(input())
  2. while n:
  3. duza = False
  4. duze = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  5. mala = False
  6. male = 'abcdefghijklmnopqrstuvwxyz'
  7. number = False
  8. liczby = '0123456789'
  9. dlugie = False
  10. specialCharacter = False
  11. haslo = input()
  12. kopiaHasla = haslo
  13. if len(haslo) >= 8:
  14. dlugie = True
  15. for c in duze:
  16. if c in haslo:
  17. duza = True
  18. haslo = haslo.replace(c,'')
  19.  
  20. for c in male:
  21. if c in haslo:
  22. mala = True
  23. haslo = haslo.replace(c, '')
  24.  
  25. for c in liczby:
  26. if c in haslo:
  27. number = True
  28. haslo = haslo.replace(c, '')
  29.  
  30. if len(haslo) > 0:
  31. specialCharacter = True
  32.  
  33. if duza and mala and number and specialCharacter and dlugie:
  34. print(kopiaHasla)
  35. n -= 1
Success #stdin #stdout 0.02s 28384KB
stdin
7
pass1234
P@$$1234
Pa$$1234
Ala ma 2 koty i 1 psa
lub na odwrot
1 kota i 2 psy ma Ala
9lHgp4kDePlMdefARCTyKBLH@
stdout
Pa$$1234
Ala ma 2 koty i 1 psa
1 kota i 2 psy ma Ala
9lHgp4kDePlMdefARCTyKBLH@