add debugPrint for ancestor map