Schrödinger interview question

I was asked to build a string parser in python to represent molecules