ROOT get root path

ROOT(P) returns the root path of P.