Filling from the cells with the least detour