A thousand-year-old town built on a waterfall