using System; using System.IO; using System.Collections.Generic; using static System.Console; using static System.Math; class Start{ static void Solve(){ var l=Rint(); var n=Rint(); var w=new List(); for(int i=0;i(ref T a,ref T b){T c=a;a=b;b=c;} static string Read()=>read[readcount++]; static int Rint()=>int.Parse(read[readcount++]); static long Rlong()=>long.Parse(read[readcount++]); static double Rdouble()=>double.Parse(read[readcount++]); static char Rchar()=>read[readcount++][0]; static string[] read;static int readcount; } class Pair:IComparable>where T1:IComparablewhere T2:IComparable{ public T1 F;public T2 S; public Pair(T1 f,T2 s){F=f;S=s;} public int CompareTo(Pair p)=>F.CompareTo(p.F)!=0?F.CompareTo(p.F):S.CompareTo(p.S); }