Add cut three or more algorithm with moving all rest gems to bottom