Inheriting haraam stocks what to do

if I inherit or receive as a gift halal stock or the money earned from the sale of said stocks (mtn,satrix raffia,sp500 etfs,sp global etfs) if the owner of the stocks my father sells said stock and gives me the money will it be halal or haram also if my grandparents per say are to pass-away any assets that Inheriet that are non sharia compliant what shall I do with them