public int getValid(int start, char ch1, char ch2, boolean increaz){
		Stack<Integer> stack = new Stack<Integer>();
		while(start < s.length() && start >= 0){
			if(s.charAt(start) == ch1) stack.push(start);
			else if(s.charAt(start) == ch2){
				if(stack.size() > 0) stack.pop();
				else return -1;
			}
			if(stack.size() == 0) return start;
			if(increaz) start ++;
			else start --;
		}
		return -1;
	}