Serial.print is not allowing to execute the program

I got something different challenge today. Let me get the suggestions for that. i wrote a sketch for one application and atlast i made to workout the logic correctly. While developing the solution i kept Serial commands for printing some value of variables for checking purpose. At the end i removed all those commands and i’m trying that same logic it is not working.
I got totally confused. for my application UART port is not all required. If i want make the logic i have initialize the UART and have to open the serial monitor then only it is working fine. i don’t know what this strange challenge is requesting me to do?
Can i get suggestions for solving the issue?

Can i get suggestions for solving the issue?

Post your code !