Adding solution for problem 20