Ruby code to solve sudoku puzzles