How to invest wisely in midcap segment