Comments
0

For Python, try using sys.stdin.readline() to read input. Here's the same code with a little touch. 198264310

Spoiler

I think more people will solve E if E and D swap position