Trie implemetation for http://www.codechef.com/JAN15/problems/XRQRS

PLease help me …I am not getting how its implemtation is working but conceptually i know how to find maxxor and draw Trie using pen and paper…

http://www.codechef.com/viewsolution/5788631