def modified_median(x):
    """
Given a list of objects, sort them in place and return the median one.
Note: the returned object is guaranteed to be one of those in the list.

"""
    x.sort()
    return x[(len(x) - 1) // 2]
