def get_url_at_page_number(url: str, counter: int) -> str:
    """Retrieves the link to the next result page of a query."""
    # All result pages will start out like this
    root_url = "https://www.hearthstonetopdecks.com/cards/"

    # Fhe first page of the query is followed by a string
    # describing your query options, like this
    query_url = url.split(root_url)[1]

    # But subsequent pages have text describing the page number
    # in between the rool url and the query text, as such:
    next_url = f"page/{counter}/"

    # Finally, reconstruct the next URL
    return root_url + next_url + query_url