Dictionary order larger problem 3

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
String str = cin.next();
printString(str, “”, str);
}

public static void printString(String ques,String ans,String org ){
	if(ques.length() == 0 ){
		if(ans.compareTo(org)>0){
			System.out.println(ans+" ");
		}
		return;
	}
	// int cnt = 0;
	for(int i =0;i<ques.length();i++){
         char ch = ques.charAt(0);
		 String roq = ques.substring(0, i) + ques.substring(i + 1);
		 printString(roq,ans+ch,org);
	}
}

}===========still its giving tle

take the ith char in ch
inside the ques loop

i m not able to understand i m already taking char ch in question loop please make correction and point it out