Answer:
Gerund or gerund phrase: thinking
Noun function: subject
Step-by-step explanation:
Gerund is a type of verbal which means it is a verb with a different function. In case of a gerund, it functions as a noun.
Basically recognizing gerund in a sentence is easy, it always ends in -ing.
Though it should not be confused with present participle which also ends in -ing. Present participle acts as an adjective and it is a part of verb forms (e.g. present simple continuous).
In this sentence thinking answers to the question what (what is hard work), so that`s why it is a subject.