it comes down to what you want.
more reliability, fastest car of the three (besides the CTS-V) buy the G35. Their auto trannies are also better than the BMW auto.
a little tighter handling, slower than the G35, more maintainence, buy the E46 330i. Only get 5 speed and look at 2001+.
I've driven the CTS and i didnt like it (2003 and 2005 I drove). The newer ones are pretty nice though. Terrible resale as well.