GuyManuel Thomas plan 144 trip worldyou give simple weight undirected connect graph n vertex m edge follow restriction is not simple cycle e cycle do not pass vertex length great 3 pass vertex 1 the cost path necessarily simple graph define XOR weight edge path edge count times path pass itBut trip cost 0 are not exciting you choose subset edges incident vertex 1 remove how subset remove nontrivial cycle cost equal 0 pass vertex 1 result graph a cycle call nontrivial pass edge odd number time as answer big output modulo 1097