public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] strTemp = sc.nextLine().split("]"); List<List<Integer>> map = new LinkedList(); for(String str : strTemp) { List<Integer> path = new LinkedList<>(); for (int i = 0; i < str.length(); i++) { if(str.charAt(i) - '0&(30533)#39; >= 0 && str.charAt(i) - '0&(30533)#39; <= 9) { path.add(str.charAt(i) - '0&(30533)#39; ); } } map.add(new ArrayList(path)); } boolean res = verify(map); System.out.print(res); }