Fixing the input processing to match the hackerrank.com format.