A student performs an experiment where he sends sound waves from the air through a solid, a liquid, and a gas. He records the speed of the wave traveling through each medium but forgets to label each medium. The table shows his observations.

Medium Speed Before (m/s)
972
1,483
5,940

The student knows that sound travels through room temperature air at 343 m/s. Based on the student's results, which medium is the solid, the liquid, and the gas?

A. X is the gas, Y is the solid, and Z is the liquid.
B. X is the solid. Y is the liquid, and Z is the gas.
C. X is the liquid, Y is the gas, and Z is the solid
D. X is the gas, Y is the liquid, and Z is the solid.

Based on the student's results, the medium with the speed of 5,940 m/s is the solid because sound travels fastest through solids. The medium with the speed of 1,483 m/s is the liquid because sound travels slower through liquids compared to solids. Therefore, the remaining medium with the speed of 972 m/s must be the gas.

Therefore, the correct answer is option D: X is the gas, Y is the liquid, and Z is the solid.