import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.HashSet; import java.util.NoSuchElementException; class Main { public static void main(String[] args) { new Main().run(); } boolean isVowel(char c) { return c=='a'||c=='i'||c=='u'||c=='e'||c=='o'; } boolean check(int[] ord) { int p=0; while(p set=new HashSet<>(); for(int i=0;i=0&&a[p-1]>=a[p])--p; if(p==0)return false; int q=p; while(q+1a[p-1])++q; a[q]^=a[p-1];a[p-1]^=a[q];a[q]^=a[p-1]; int s=p,t=a.length-1; while(s Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }