Three oxidation states and atomic-scale p-n junctions in manganese perovskite oxide from hydrothermal systems