top_median_or_bottom function

Top, median, or bottom