How was the triassic period affected by the permian period?