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; using System.Diagnostics; static class Program{ const int mod=(int)1e9+7; static List[] li; static void Main(){ Sc sc=new Sc(); var s=sc.Ia; int n=(s[0]>>1)+1,m=s[1]; li=new List[n+1]; for(int i=1;i<=n;i++){li[i]=new List();} var t=sc.S; var h=new int[t.Length]; var d=new int[n+1][]; int p=1,g=-1; Fu(1); void Fu(int a){ g++; while(g[] li; private readonly int[] at,l; public readonly int[] ix,de; private readonly int[][] g; private int f=0; public Alca(List[] li,bool bo,int r){ int n=li.Length,z=(n<<1)-3,m=0; this.li=li; at=new int[z]; ix=new int[n]; de=new int[n]; if(bo){Fu1(r,1);} else{ for(int i = 1;i>1]+1; } for(int i=1,k=1;ib){(a,b)=(b,a);} int p=l[b-a]; return at[de[at[g[p][a]]](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(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]));} public (T,T,T) Tp3(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]),Ct(s[2]));} public (T,T,T,T) Tp4(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]),Ct(s[2]),Ct(s[3]));} public (T,T,T,T,T) Tp5(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]),Ct(s[2]),Ct(s[3]),Ct(s[4]));} public (T1,T2) Tp2(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]));} public (T1,T1,T2) Tp3(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]),Ct(s[2]));} private T Ct(string s){return (T)Convert.ChangeType(s,typeof(T));} }