Given a tree of �n vertices and �−1n−1 edges. Each vertex �i has a color ��ci = 'a' or 'b' or 'c'.
Please count the number of simple path between �i and �j satisfy :
The first line contains one integer n (n≤105).
The second line contains a string S with length of n . (Si represents the color of i-th vertex,Si= ′a′ or ′b′ or ′c′)
Each of the next n−1 lines contains a pair of vertex indices ui and vi (1≤ui,vi≤n)— endpoints of the corresponding edge.
6
abbccb
1 2
1 3
1 4
1 5
4 6
5