A 40-year-old man with a history of treated pulmonary tuberculosis presents with chronic cough and occasional hemoptysis

Chest Xray reveals thick-walled cavity in the right upper lobe with an air crescent sign.

What is the most likely diagnosis?