def indexing(pair):
    """
    The indexing method receives a pair of user X and followed users by X.
    for example it receives (X, Fi) as a pair which X follows Fi.
    This method returns (Fi, X) and (X, -Fi).
    :param pair: (X, Fi) as a pair which X follows Fi.
    :return: is a list of pairs [(Fi, X), (X, -Fi)].
    """
    user, followed_by_user = pair
    result = []
    for f in followed_by_user:
        result.append((f, user))
        result.append((user, '-' + f))
    return result