Deducting health insurance premiums with a mix of marketplace, Medicare, and medigap plans

I'm self-employed. My wife does not work. In 2024, we were both covered by a marketplace plan until April, when I turned 65. At that point, I started Medicare as well as a medigap plan, and my wife got a marketplace plan covering only her. I don't collect SS, so I directly paid the premiums for Medicare Part B and for the medigap plan, as well as for the marketplace plans.

 

For the marketplace plans, we got a subsidy, but, due to some stock sales, our estimated income turned out to be low. TT says our 2024 income was too high to qualify for the premium tax credit, and we'll have to pay it back as part of our return.

 

We received two 1095-As, one for the marketplace plan we were both on before I turned 65 and one for the marketplace plan my wife was on after I turned 65.

 

Being self-employed, I'm used to being able to deduct the cost of health insurance premiums. For 2024, there are four sets of premiums: one for each of the two marketplace plans we had, one for Medicare Part B, and one for my medigap plan. I don't know how to enter the information for these four sets of premiums into TT so that we get the full deduction we're entitled to.  Help?