system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What is smoke made out of that makes ham and fish taste better?
gpt
Hardwoods (the type used for smoking ham, fish and other foods) are made up mostly of three materials: cellulose, hemicellulose, and lignin. 

Cellulose and hemicellulose are sugar molecules which, when burnt effectively caramelize to produce carbonyls. These provide most of the color components and sweet, flowery, and fruity aromas.

Lignin also produces a number of distinctive aromatic elements when burnt, including smoky, spicy, and pungent compounds such as guaiacol, phenol, and syringol, and sweeter scents such as the vanilla-scented vanillin and clove-like isoeugenol.

Since different species of trees have different ratios of components, various types of wood impart a different flavor to food.