Serialize s.inverted by key, values