From Python to Java or C++? [closed]

I was learning Python 3 since the Last 2 years and I have covered many topics in python. And Python is the 1st ever language I have learnt ( i really had tough times to learn python)

Now, I want to participate in a coding contest like USACO, there python is not allowed so I want to learn Java/C++

But I am Confused about Which is the best way to learn and from where to learn? How long will it take to learn?should I learn Java Or C++ which one is better for future demand?

And How hard is it to transfer my python knowledge to Learn Java/C++?

About Me In Future, I would like to work with the Theoretical Computer Science and Solve Real World Problems and Develop New Technologies .

(I do not want to be Software Engineer )