Sometimes it happened that I didn't put a newline at end and the program worked but sometimes it showed some error.