compete logic.py