Sometimes the best stock idea is one you've had before. Image source: Getty Images.

The best kind of investment? How about a company that you find yourself compelled to buy more than once? We reached out to three of our top contributors who recently did just that -- adding shares or reinvesting in companies that they had owned before -- and asked them to talk about the companies they bought, and what made them worth investing in. Here's a closer look at what they had to say about General Electric Company (NYSE:GE)Markel Corporation (NYSE:MKL), and Staples, Inc. (NASDAQ:SPLS)

An industrial renaissance

Todd Campbell (General Electric): This global giant has its hands in infrastructure and energy markets that could benefit significantly if Donald Trump follows through with his American infrastructure spending plans.

On the campaign trail, Trump promised a revitalized U.S. economy built on the back of significant domestic spending on everything from railroads to electricity grids.

If Trump comes anywhere close to funneling the $500 billion-plus into infrastructure he mentioned during the run-up to his election, then demand for General Electric industrial equipment and solutions could soar. For example, sales of the company's locomotives and power generation equipment could climb. Trump's plans could also help General Electric CEO Jeff Immelt deliver on his digital industrial goals. Immelt believes GE Digital products and services sales will grow from $5 billion in 2015 to $15 billion in 2020.

Energy is an important part of GE's future success. Image source: Getty Images. 

General Electric could also benefit from Trump's energy-friendly policies because General Electric is a major player in energy equipment market. Recently, it merged its energy equipment business with Baker Hughes to create the second largest such company in the world.

Overall, many investors no longer have this once-top-performer in their portfolios anymore, and I think that's a mistake. The potential to benefit from Trump's pro-inflationary policies in the U.S., while pocketing a handsome 2.9% dividend yield, makes this a great company to stash away again, and that's why I recently bought it back in my own portfolio.

A proven formula for long-term profit growth

Jason Hall (Markel Corporation): Markel has steadily become a cornerstone of my portfolio. The company, which has steadily used the profits from its specialty insurance business to build a conglomerate of operating companies and stock holdings, has done very well by its shareholders over the past few decades:

MKL Total Return Price Chart

MKL Total Return Price data by YCharts

And while there's no guarantee that Markel will continue to be such an excellent investment, its business remains very high quality, with excellent leadership and a strong culture. 

As a matter of fact, Markel's leadership is a key reason I decided to buy more shares last month. Co-CEOs Tom Gayner and Richard "Richie" Whitt make an excellent pair. Gayner has led the company's investing efforts for decades, consistently delivering market-beating returns with Markel's stock portfolio, while also building up a strong stable of cash-generating operating subsidiaries. Whitt, on the other hand, has proved to be an excellent operator, running the company's critical reinsurance business in the past. Both have been with Markel for over 25 years in various leadership and executive roles. 

Bottom line: Markel has the business and the leadership in place to continue delivering profitable growth for many years to come. I've bought shares more than once already, and it's the kind of great company I'll probably buy more of again. 

Severely underestimated

Tim Green (Staples): Office-supply company Staples is a stock I've owned on a few different occasions over the past five years. The story each time has been the same: The stock would get beaten down by pessimism and then eventually recover. I sold my entire stake after rumors of a merger with Office Depot in late 2014 pushed the stock up, staying away until earlier this year, when the collapse of that deal created a bargain once again.

Staples has some issues, to be sure. Its retail business is doing poorly, suffering from declining sales as demand for core office supplies wanes and competition from online retailers heats up. The international business has been losing money for years, prompting Staples to sell a controlling stake in its European business for next to nothing earlier this month. Profits are down, with the high single-digit operating margins of the past unlikely to ever be repeated again.

Staples' scale and reputation as a supplier gives it a competitive advantage. Image source: Getty Images. 

The reason I keep coming back to Staples is its commercial business. Unlike its retail segment, which is easily disrupted, the business of signing contracts with large organizations to deliver office supplies and other products has proven far more resilient. During the third quarter, North American commercial revenue grew by 1%, excluding divestitures, and operating margin expanded to 8.1%.

Staples expects to generate $700 million of free cash flow this year, compared with a market capitalization of $6.5 billion. My cost basis this time around is well below the current price thanks to the stock market rally over the past month, but Staples is still cheap enough that investors looking for a value play in an expensive market should take a look.