Assume that X, a real estate developer, enters into a written contract with Y, a construction company, to build an office tower. Y then enters into a separate written agreement with Z, a geotechnical engineering and piling company, to perform the foundation work for the structure.
In legal terms, correctly describe the relationships between X, Y, and Z.