What dynasty built walls ?
In 907 , the Khitan chieftain Abaoji succeeded in getting himself appointed khaghan of all Khitan tribes in the north , laying the foundations to what would officially become the Liao dynasty .