def get_pokemon_name_and_url(chain):
    """Returns two lists: name and the url of the pokemons in the evolution chain"""
    pokemon_name = [chain.get("species").get("name")]
    pokemon_url = [chain.get("species").get("url")]
    pokemon_name2 = chain.get("evolves_to")
    while len(pokemon_name2) != 0:
        pokemon_name2 = pokemon_name2[0]
        pokemon_name.append(pokemon_name2.get("species").get("name"))
        pokemon_url.append(pokemon_name2.get("species").get("url"))
        pokemon_name2 = pokemon_name2.get("evolves_to")
    return pokemon_name, pokemon_url