Simple and brutal... cut the pipe and see which end the water carries on coming out of. Just hope it's not the sulphuric acid pipe or the floor might get damaged.