(Reuters) – Warren Buffett’s Berkshire Hathaway acquired stakes in cosmetics store chain Ulta Beauty and aircraft parts maker Heico during the second quarter, when it also significantly cut its huge stake in Apple.

Berkshire owned about 690,000 Ulta Beauty shares worth $266.3 million and 1.04 million Heico shares worth $185.4 million as of June 30, according to a Wednesday regulatory filing containing its U.S.-listed holdings as of that date.

The quarter reflected a big retreat by Buffett from stocks, with Berkshire selling about 390 million Apple shares, or nearly half its stake.

Berkshire sold $77.2 billion of stocks in the quarter, primarily Apple, and bought $1.6 billion.

(Reporting by Jonathan Stempel in New York; Editing by Marguerita Choy)