Implement simple puzzle solving