Magnetosphere, exosphere, and surface of mercury