A 32-year-old male developed high fever, cough, and copious purulent foul-smelling sputum for 2 weeks after catching a cold. Physical examination reveals dullness on percussion and moist rales in the right lower lung. Lab tests show WBC 12×10<sup>9</sup>/L with 92% lobulated neutrophils. Chest X-ray (CXR) demonstrates a large shadow with thick-walled cavity in the posterior segment of the right lower lobe. The most important next diagnostic test should be: