below comment has two comments related to triple loss, check if any of the two threads solves your issue in where you might have gone wrong.
Also as a general rule, sharing a screenshot of error or your outout to expected output is more better idea, although your explanation is great.
let me know if you still have any issue.
Regards
DP