@niranjanajit typically the last mentioned one. This leads to all sorts of mistakes/confusions when people overlook that two things have the same gender like:"I was parking the truck in front of the fence while my friend gave me instructions. I ran him over, he is broken and I was able to temporarily prop him back up." (the fence in "der Zaun" = male in German)