solve method returns a string when board is solved