Update p3/grid5.py