You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour.

Read More ~