In which of the following sentences is 'but' used as a preposition?

AI wanted to leave, but I was embarrassed to do so.
BWe discovered that Candy will do anything but work.
CThe lake is pretty, but it's too cold for swimming.

D, I would like to return to Italy, but i have no money.