There are two (2) custom records with parent-child relationship: Contract (customrecord_contract) and Monthly Plan (customrecord_monthly_plan). The Monthly Plan record has the following definition:
Assuming that the Month field is populated automatically, the following code creates five (5) rows in the Monthly Plan sublist on the Contract record.