The three valves in question correspond to valves 1, 2 and 4 in the photo below (valve 3 is not installed, no problem).
Among them: valve 4 is the valve under the water heater;
How to identify valve 1 and valve 2: close 1 and 2, open 3 and 4. Then , open one of 1 and 2 respectively. Pay attention to the water heater when it is turned on. When there is a sound of water flowing through the water heater or the water outlet becomes hot, the one open at 1 and 2 is valve 2.