This is my solution to the CodinGame challenge Defibrillators: