static void moveAllXToEnd(String ques, String ans, int count) {
if (ques.length() == 0) {
for (int i = 0; i < count; i++) {
ans += ‘x’;
}
System.out.println(ans);
return;
}
char cc = ques.charAt(0);
String ros = ques.substring(1);
if (cc != ‘x’) {
ans += cc;
moveAllXToEnd(ros, ans, count);
} else {
moveAllXToEnd(ros, ans, count + 1);
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String ques = sc.next();
moveAllXToEnd(ques, "", 0);
}