I am trying to solve a problem on codingame.com. So far tasks seem easy but this one just keeps failing and I\'ve wasted like 10 hours on it. I have the following code in Py