How to get lowest level of {post_terms_product_cat}?

Hello,

Is there a way to get the lowest level of the {post_terms_product_cat} category aka the most direct category of the product with dynamic tags? Or is it only possible with code?

Thanks in advance!