Updated code for taking input from codejam site.