Pathology

A 65 years old smoker presents with chronic cough, hemoptysis and loss of weight. X ray chest shows cavitatory lesion. The most appropriate diagnosis is