Magnetic fields of HgMn stars