class SymbolTable:
    def __init__(self):
        self.table = {}

    def put(self, key, value):
        self.table[key] = value

    def get(self, key):
        return self.table.get(key, 0)

    def contains(self, key):
        return key in self.table

    def keys(self):
        return sorted(self.table.keys())

def most_visited(locations):
    st = SymbolTable()

    for location in locations:
        if st.contains(location):
            count = st.get(location)
            st.put(location, count + 1)
        else:
            st.put(location, 1)

    most_frequent_location = None
    max_count = 0

    for location in st.keys():
        count = st.get(location)
        if count > max_count:
            most_frequent_location = location
            max_count = count

    return most_frequent_location

# Usage example:
locations = ["Paris", "New York", "London", "Paris", "Tokyo", "New York", "Paris", "New York", "New York", "New York"]
most_frequent = most_visited(locations)
print("The most frequently visited location is:", most_frequent)
