Added solution for Ex-04 3 subtask