Home work #3 solved