Added solution for Ex-05 3 subtask