Church, wall and kernighan using py