private List<Integer> toList(String s) {
            List<Integer> result = new ArrayList<Integer>();
            for (int i = s.length() - 1; i >= 0; i--) {
                result.add(s.charAt(i) - '0');
            }
            return result;
        }