def most_friends_common(user_id, all_users):
    """Find which user have the most friends in common with the user."""
    def nfriends_common(id, friends=set(all_users[user_id])):
        return len(friends.intersection(all_users[id])) if id != user_id else -1
    return max(all_users, key=nfriends_common)

print(most_friends_common('4444', {
            '1111': ['2222', '3333'], # 1111 has 2222, 3333 friends
            '2222': ['1111'],
            '3333': ['1111', '4444', '5555'],
            '4444': ['1111', '2222', '3333'],
            '5555': []}))
