using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; using System.Threading; using System.Runtime.CompilerServices; static class Program{ const int mod=(int)1e9+7; static List[] li; static bool[] b; static int[] h; static void Main(){ Sc sc=new Sc(); var s=sc.Ia; int n=s[0],m=n-1; li=new List[n+1]; b=new bool[n+1]; h=new int[n+1]; var c=sc.Ia2; for(int i=1;i<=n;i++){li[i]=new List();} for(int i=0;i1){dat[q>>=1]=dat[q<<1]^dat[(q<<1)+1];} } public long Get(int l,int r){ long x=0; l+=n;r+=n; while(l<=r){ if((l&1)==1){x^=dat[l];l++;} if((r&1)==0){x^=dat[r];r--;} l>>=1;r>>=1; } return x; } } public class Et{ private List[] li; public int[] at2,ixl2,ixr2; private int f=1,f2=1; public Et(List[] li,int o){ int n=li.Length,z=(n<<1)-2; this.li=li; at2=new int[n]; ixl2=new int[n]; ixr2=new int[n]; Fu1(o,1); } private void Fu1(int a,int g){ at2[f2]=a; ixl2[a]=f2; f++;f2++; for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i