Solution of #42.