How do you add the current main category into the title of product

Hi all, I would like to add the current category into the product title on the default_template.tpl but can't figure it out. I can get the category Id of the main cat for the current product but how do I get the name?