inheritance

I received stocks as an inheritance and sold them almost immediately. while waiting on the legal process the stock gained about 10,000.00 do I claim this gain only taxes or not because they weren't officially in my name?