How to convert flat contours into terrain automatically?

terrain
contours