Solved problem 143 (slow!)