Photosensitive protection of functional groups