public PocketNode build(String s) {
        if (index == s.length())
            return null;
        PocketNode root = new PocketNode(s.charAt(index));
        if (index + 1 >= s.length())
            return root;
        char symbol = s.charAt(index + 1);
        index += 2;
        if (symbol == '?')
            root.left = build(s);
        else if (symbol == ':')
            return root;
        if (index < s.length())
            root.right = build(s);
        return root;
    }