It was a palace, huge and carved inside out.
The enormous palace was carved on the inside and on the outside.
The temple, constructed around a.d. 500, is encircled by monasteries, shops, and lodges for pilgrims.