A family consists of a mother, a father, and three children: X, Y, and Z. The mother is a chef, and the father is a banker. X is the eldest child and is studying medicine. Y is the middle child and loves painting. Z is the youngest and enjoys sports. Which child is studying medicine?