Here are some synonyms for "hit upon":
* Stumble upon
* Chance upon
* Discover
* Invent
* Conceive of
Here are some examples of how the phrase is used:
* "After days of struggling, she finally hit upon a scheme to get the money she needed."
* "He hit upon a scheme to make a quick buck by selling used books online."
* "The detective hit upon a scheme to catch the thief red-handed."
The word "scheme" implies a plan that is often clever, perhaps even a bit underhanded or manipulative. However, it's important to note that the term can have neutral connotations as well.