The same window on the string version of the question, worked through and coded in Python, in under seven minutes.