def topTen(cnx, domain):
    """
    Given a domain, the function determines top tweets
    :param cnx: connection object
    :param domain: id of the domain to be considred
    :return: List of tweets and list of users who retweeted those tweets
    """
    cursor = cnx.cursor()
    # procedure to calculate top tweets taking intop account stored users, retweets and follower and following counts
    cursor.callproc('top_tweets_of_domain',[domain])

    result =[]
    userlist = []
    for result1 in cursor.stored_results():
        for row in result1.fetchall():
            result.append(row[1])
            userlist.append(row[0])

    return (list(dict.fromkeys(result)))[:6], userlist[:6]