Higher-Order Molecular Grammars for Generative and Foundation Models in Chemistry — ThinkLLM