problem 31 done