Failed attempt at Problem 25