Working solutions for problems 7 and 25.