Changed my approach, and solved PE29