node assignment finding mean, median and mode