A characterization of Thompson's sporadic simple group