SAP length and ancestor method done.