Stereoselective synthesis of medium lactams enabled by metal-free hydroalkoxylation/stereospecific [1,3]-rearrangement