Step 1: Understand the flow chart.
We start from bauxite and reach pure aluminium. We must find $Z$, the substance just before electrolysis.
Step 2: First step (forming X).
Bauxite is treated with hot concentrated NaOH at 523 K. The aluminium oxide dissolves to form sodium aluminate. \[ Al_2O_3 + 2NaOH + 3H_2O \rightarrow 2Na[Al(OH)_4] \] So $X$ is sodium aluminate in solution.
Step 3: Second step (forming Y).
Carbon dioxide is passed through the solution. This brings down aluminium hydroxide as a solid. \[ Na[Al(OH)_4] + CO_2 \rightarrow Al(OH)_3 \downarrow + NaHCO_3 \] So $Y$ is $Al(OH)_3$.
Step 4: Third step (forming Z).
$Al(OH)_3$ is heated strongly at 1473 K. Heating drives off water and leaves pure alumina. \[ 2Al(OH)_3 \xrightarrow{1473K} Al_2O_3 + 3H_2O \] So $Z$ is $Al_2O_3$.
Step 5: Confirm the last step.
Only pure $Al_2O_3$ is melted and electrolysed in the Hall-Heroult process to give aluminium metal. This fits the chart.
Step 6: Identify Z clearly.
The substance fed into electrolysis is alumina, $Al_2O_3$.
Step 7: State the final answer.
Therefore $Z$ is:
\[ \boxed{Al_2O_3} \]