import java.io.IOException; import java.io.InputStream; import java.util.ArrayDeque; import java.util.Arrays; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().run(); } boolean solve(ArrayDeque dq) { int ans=0; { boolean same=true; int v=dq.peekFirst(); for (int i=0;i dq=new ArrayDeque<>(); for (int i=0;i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }