Script for mapper and reducer