wordpress - Post Category Breadcrumbs in index.php

one text

I'm trying to setup a category "breadcrumb" ontop of every post that pulls through using template part loop to Index.php. So at the top of every post I want categories to be listed e.g

News > Sponsorships

News is the main category and Sponsorships is the sub-category. (also the greater than seperator is needed here, however if a post isn't within a sub-category the greater than sign shouldn't display.)

How do I pull through both of these dynamically using php?

Source