Taking input format

Im having trouble as to construct tree from input .
Dont know how many iterations to run for taking input.

Can you send me your code by saving in the codepair. I think you forgot to save it as your code is blank.

I havent written the code yet , I mean how will i know how many lines of input will be there?

Just take the input until The input of the tree is followed by a single integer K.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.