You are rewriting a Python program for the following task.

TASK:
{task_prompt}

CURRENT PROGRAM (score {parent_score}):
```python
{parent_code}
```

INSPIRATIONS FROM OTHER SOLUTIONS:
{inspirations}

DIRECTIVE:
{directive}

LESSONS:
{lessons}

Rewrite the complete program with a stronger algorithm, from scratch unless the DIRECTIVE asks
to keep the design. Keep the program's entry-point function name(s) and their return interface
EXACTLY as in the current program above; do not rename functions or change what they return. Output the COMPLETE program in a single
```python code block.
{bet_block}
