Imagine someone gives you $1,000 and says you can invest it in three stocks of your choice. Which ones would you go for? Right now, I would scoop up two that offer fantastic growth prospects -- and a third that offers the security of rising dividend payments and a business that can weather any economy.

I'm talking about e-commerce powerhouse Amazon (AMZN 3.43%), electric vehicle (EV) leader Tesla (TSLA -1.11%), and pharmaceutical giant Johnson & Johnson (JNJ -0.46%). These players make a great addition to a portfolio today, at a time when we're heading toward a bull market -- but still may face some economic headwinds. And I'm confident they have what it takes to grow a portfolio over the long term -- through good and bad market times.

How would I invest in this trio? Let's take a closer look at each and then decide.

Amazon's e-commerce and cloud computing

First, let's talk a bit about Amazon. The company dominates in two high-growth industries: e-commerce and cloud computing. Both markets are growing in the double digits, and Amazon is perfectly positioned to benefit from this in the coming years.

Of course, higher inflation and other economic troubles weighed on Amazon over the past year or so. The company's costs climbed -- and it found itself with too much fulfillment capacity as demand waned. As a result, Amazon last year posted its first loss in almost a decade.

But the good news is, Amazon took aggressive action to improve its cost structure. This included job cuts and even a shift in how it handles fulfillment -- now, in the U.S., it's shifted to a regional model from a national one.

Amazon's efforts are starting to bear fruit. For example, in the most recent quarter, it greatly reduced its outflow of cash over the trailing 12 months to about $3 billion. That's from more than $18 billion in the year-earlier period.

Investors are taking notice. The stock has climbed 50% since the start of the year.

Tesla's strong profit growth

Moving along to Tesla, we'll find another stock that's taken off this year. The shares have climbed 110%. Like Amazon, Tesla shares slid last year. But unlike Amazon, Tesla didn't shift to a loss. In fact, Tesla excelled in spite of the difficult economic environment.

The EV giant's profit doubled last year to more than $12 billion. And in the fourth quarter, the company reported record revenue, net income, and operating income. Of course, this doesn't mean Tesla is immune to today's economic troubles.

The company still has seen an impact on earnings from higher costs and unfavorable currency exchanges, for example. And Tesla, aiming to reach a wider audience, has lowered prices of certain models. This weighed on earnings in the first quarter of this year.

Still, over the long haul, Tesla is likely to benefit from its innovation and leadership in the high-growth EV market.

J&J, the Dividend King

Finally, let's turn our attention to J&J. J&J probably won't deliver the sort of growth we'll see from Amazon and Tesla. But J&J offers us two key elements.

The first is the fact that it's a big healthcare company with a track record of steady earnings growth. Even in the worst of economic times, people need their medicines and medical procedures. This ensures a certain level of earnings from J&J.

The second great thing about J&J is its dividend growth. As a Dividend King, it's increased dividend payments for at least 50 consecutive years. This is positive because it shows the company's commitment to rewarding shareholders. It's unlikely J&J will stray from this policy.

How to divide the pie

Now, let's consider how we should divide up our $1,000 among the three stocks. And this depends on our comfort with risk. A very cautious investor should favor J&J -- and put a smaller amount of the cash into the two growth stocks. A very aggressive investor should do just the opposite.

If you're more middle of the road, you might want to divide your $1,000 equally across the three, and then add to your positions over time. This is the choice I would make for my own portfolio.

How long should you hold? For the long term, which is at least five years. This gives the company the time needed to address any near-term problems, grow earnings, and in the case of dividend stocks, pay you passive income. And it gives you the time to benefit from all of this.

If after five years you still see potential for the company to grow and deliver share performance to investors, hang on. Famous investors like Warren Buffett are known for holding stocks for decades. Buffett bought Coca-Cola shares in the late 1980s and still owns them.

So, whether you're a cautious or aggressive investor, the trio of Amazon, Tesla, and J&J could work for you -- today and over time.