using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; class TEST{ static void Main(){ Sol mySol =new Sol(); mySol.Solve(); } } class Sol{ public void Solve(){ long Inf = (long) 1e18; long[][] dp = new long[2][]; for(int i=0;i<2;i++) { dp[i] = new long[N + 1]; for(int j=0;j<=N;j++) dp[i][j] = -Inf; } List[] E = new List[N + 1]; for(int i=0;i(); for(int i=0;iint.Parse(e));} static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));} static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));} }