Data structure - Ternary Tree