Given solution for 2-5