These are rollovers, not new contributions. Enter the rollovers by entering the Forms 1099-R under Wages & Income -> Retirement Plans and Social Security -> IRA, 401(k), Pension Plan Withdrawals (1099-R) and in the questions that follow indicate that you moved the money to another retirement account (or returned it to the same account) and indicate the amount of each distribution that you rolled over back into the IRAs. Remove any entries you make with regard to this under Deductions & Credits -> Retirement and Investments -> Traditional and Roth IRA Contributions.
These are rollovers, not new contributions. Enter the rollovers by entering the Forms 1099-R under Wages & Income -> Retirement Plans and Social Security -> IRA, 401(k), Pension Plan Withdrawals (1099-R) and in the questions that follow indicate that you moved the money to another retirement account (or returned it to the same account) and indicate the amount of each distribution that you rolled over back into the IRAs. Remove any entries you make with regard to this under Deductions & Credits -> Retirement and Investments -> Traditional and Roth IRA Contributions.
"...repayed them during 2018..." Hopefully within 60 day of the date of distribution, or it is not an eligible rollover and it still an excess contribution subject to penalty.
There are many reasons you may go beyond the 60 day rollover period. Fidelity has a form for that.