Pocket Gems Interview Question

construct a trinary tree given string input