If you do not know how to get the input, it is always best to discuss this with your teacher. The teacher should know when a student is facing any challenges.
We can definitely tell you how to capture the input, how to parse it, and maybe how to distribute or print it. But, we might not know what your teacher would expect next from you.
Scanner (Java Platform SE 8 )[
^]
Secondly, based on your question it is not clear if the input has to be of this format, do we need to parse the data in variables, keep it in a single String type, or what.