My thermostat wore out so I bought a new one but failed to mark the screws I took the wires off. There are two rows of four screws on the thermostat and two on the heater | ______ |*l *| l* *| | | l* *l l*___ *l ? ____ l_ _| l*|_|*|
You need a electrical tester for this procedure and if you have never done this type of work before, I would either hire an electrician or a plumber to remedy this problem.
Most water heaters follow the same configuration, but it always helps to be 100% sure of the situation in order to protect the work you do.