Text based sudoku solver in Python