hey that does the job. I had unnecessarily put the condition to check for not putting an endline at the very end ...
had one query ... why does this not give PE? When exactly does some submission count as PE?
Thanks a lot! Spent too much time on a relatively simple problem [:(]
