WooCommerce – How can the product category be displayed above the product with the category link?

How can I display the product category name above the product title with the category link? In shop page and single product page.