import java.util.Scanner; public class Dome21 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int M = scanner.nextInt(); for (int i = 0; i < M; i++) { String str = scanner.next(); if (str.length() >= 8 && str.length() <= 16) { int count = 0; if (str.matches(".*[~!@#$%^].*")) count++; if (str.matches(".*[a-z].*")) count++; if (str.matches(".*[A-Z].*")) count++; if (str.matches(".*\\d.*")) count++; if (count>=3) System.out.println("YES"); else System.out.println("NO"); } else { System.out.println("NO"); } } } }
0.0分
0 人评分