Hossam and (sub-)palindromic tree

Problem Name:
Hossam and (sub-)palindromic tree
Site:CodeForces
Links:
Tags:
Problem setters: