Answer:
<u>of</u>
Explanation:
A preposition is a function word that usually precedes a noun or pronoun and that shows a relationship between that noun or pronoun and other words. There are many prepositions, some of them include <em>of, up, after, before, until, at, for, after </em>and<em> on.</em>
In the sentence, "of" is a preposition because it shows a relationship between the noun "the spirit" with the noun "invention". The other words, on the other hand, are not prepositions: "forever" is an adverb, and "but" and "and" are conjunctions.