During which period did the dinosaurs first appear?

triasic