Let's say $10,000 falls into your lap. Well, you know what the Fool would recommend: Buy 25 or more stocks and hold them for five or more years.

But what if getting the money came with a catch? Say you could invest the money, but in no more than three stocks. 

Well, in that case, here's what I'd do.

Bird's nest with $100 bills in it.

Image source: Getty Images.

1. Workday

To kick things off, I'm allocating $4,000 of my hypothetical $10,000 to Workday (WDAY -1.19%).

It's a maker of enterprise software focusing on financial and human capital management. Workday's market cap has grown from less than $10 billion to more than $53 billion over the last decade.

What's more, the company's cloud-based applications, some enhanced with machine learning, have Wall Street excited. Analysts expect Workday to grow sales 16% this year and a further 17% in 2024, despite what many would characterize as a challenging environment when it comes to business investment.

Chart showing Workday's PS ratio down since 2014.

WDAY PS Ratio data by YCharts

Lastly, Workday's valuation makes it attractive. It trades at a price-to-sales (PS) ratio of 8.1. That's well below its 10-year average of 14.8. So, for investors willing to buy and hold, Workday is a name to consider.

2. Shopify

Next, I'm turning to Shopify (SHOP 1.11%). I'm allocating $1,500 of my hypothetical $10,000 to this e-commerce company. 

Shopify, which operates a platform for online merchants, is one of the big turnaround stories of 2023. Shares of the Canadian company felt the pain last year -- falling 75% during calendar year 2022. 

But, after cutting 20% of its workforce this year, along with shedding some tangential businesses, Shopify shares have rebounded. In its most recent quarter (the three months ending on March 31), the company reported terrific earnings, highlighted by:

  • $1.5 billion in revenue, up 25% year over year
  • $68 million in profit, compared to a $1.5 billion loss a year earlier.

That earnings report sent shares ripping higher by 20%, but even so, Shopify remains well off its all-time high. 

Chart showing Shopify's PS ratio down since 2022.

SHOP PS Ratio data by YCharts

Shares trade at a PS ratio of 13.2, almost half of the company's lifetime average of 23.5. Subsequently, Shopify's valuation -- which crossed into a red zone north of 60 during the pandemic's height -- is reasonable, even cheap, considering its rapid growth.

3. McDonald's

Finally, I'm rounding out my hypothetical portfolio with an iconic consumer brand -- McDonald's (MCD -0.91%). I'll allocate the remaining $4,500 to the legendary fast food chain.

Unlike my first two picks, McDonald's pays a dividend. In fact, not only has McDonald's paid a dividend for 46 straight years, it's raised its dividend in each of those years. Its current dividend payment of $6.08/year yields 2.12%. That compares favorably to the current 1.5% average yield in the S&P 500.

At any rate, McDonald's shares have more to offer than just their famous dividend. The company boasts a solid 45% operating margin and $5.6 billion in free cash flow. That demonstrates that management has what it takes to derive value -- and cash flow -- from the iconic brand that is McDonald's. And that's despite increasing prices due to high inflation. 

McDonald's shares give my hypothetical portfolio a much-needed income-producing stock with a long history of paying and increasing its dividend.