Match longest length first