They are used for different gendered nouns. 'pen' is used to describe indefinite masculine/feminine nouns, 'pent' to describe indefinite neuter nouns, and 'pene' to describe plural and definite nouns.
Just spent like three minutes googling what was going on here (from a different sentence) and why it wasn't "pene" and finally found this, thank you lol. Such an odd rule.