You are given a weighted tree with vertices. You can denote the value of path of vertices and as XOR of weights of all edges on path from to . Your task is to print the number of four vertices such that the value of path of vertices and differs from the value of path of vertices and in not more than one bit.
Input format
Output format
Print one integer that represents the answer for the problem modulo .
Test data
There are fourth of vertices: