Exact controllability for the magnetohydrodynamic equations