New and ridiculous (incomplete) Python solution - demo fixed.