Cummins 5.9 coolant temperature sensor location

Hi all I have a 2007 Cummins 5.9 and need to replace the coolant temperature sensor and not sure of it’s location,is it on the top of the engine at the front or the rear of the engine ?and do you get to it through the inspection hatch under the bed inside.?
 
Top