Identify the series of geologic processes that can transform sandstone into quartzite, quartzite into magma, and magma into rhyolite.