Added solution for Ex-09 2 subtask