ABFS for Rice