import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.ArrayDeque; import java.util.Arrays; import java.util.NoSuchElementException; class Edge{ int dst; long cost; public Edge(int dst,long cost) { this.dst=dst; this.cost=cost; } } public class Main { public static void main(String[] args) throws FileNotFoundException { long t = System.currentTimeMillis(); new Main().run(); System.err.println(System.currentTimeMillis() - t); } void run() { FastScanner sc = new FastScanner(); int N=sc.nextInt(); int[] A=new int[N]; int[] B=new int[N]; for(int i=0;i>cur)%2!=1)continue; for(int next=0;next>next)%2==1)continue; int ns=s|1<