Dictionary order larger problem 4

import java.util.Scanner;

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;
	}
	for (int i = 0; i < ques.length(); i++) {
		char ch = ques.charAt(i);
		String roq = ques.substring(0, i) + ques.substring(i + 1);
		printString(roq, ans + ch, org);
	}
}

}=====I have made the changes still the test case are wrong please correct my code

@AbhishekAhlawat1102 you have to print the output string in lexographically sorted manner
for acb answer should be
bac
bca
cab
cba