Dear Mangesh:

The solution may be literally simple, but your explanation was not!

Could you please rewrite the program above in the terms you described?