Stellar archaeology in the galactic halo with the ultra-faint dwarfs. VI. URSA MAJOR II