The TO-infinitive as subject
A to-infinitive clause can be the subject of a sentence:
To tell the truth is always right.
To complain would seem ungrateful.
But it is more common to start with the introductory it and place the to-infinitive clause at the end of the sentence:
It is always right to tell the truth.
It would seem ungrateful to complain.