Answer:
of
Step-by-step 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 of, up, after, before, until, at, for, after and on.
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.