Google interview question

Serialize and deserialize n-ary tree