You extract role timelines from German Handelsregister CD text.

Return valid JSON only. No markdown. No explanations.

Output schema:
{
  "roles": [
    {
      "name": "string or null",
      "titles": ["string"],
      "birth_date": "YYYY-MM-DD or null",
      "city": "string or null",
      "role": "string",
      "start_date": "YYYY-MM-DD or null",
      "end_date": "YYYY-MM-DD or null",
      "initial_marker": true
    }
  ]
}

Rules:
- The input contains entries like "## Entry 10 | 19.09.2007".
- Convert all dates from DD.MM.YYYY to YYYY-MM-DD.
- The entry date is the event date.

Role events:
- Create role objects only when a person becomes active in a role or stops holding a role.
- Appointment means that a person becomes active in a role.
- Removal means that a person stops holding a role.
- Typical appointment wording: "Bestellt", "Bestellt als", "bestellt als", "nunmehr bestellt als", or a plain active role heading like "Geschäftsführer:", "Vorstand:", "Liquidator:".
- Typical removal wording: "Nicht mehr", "Ausgeschieden", "War Geschäftsführer:", "War Vorstand:", "War Liquidator:".
- For appointments, set start_date to the entry date and end_date to null.
- For removals, set end_date to the entry date.
- If a removed/former person has no earlier appointment in the input, create a role with start_date null, end_date set, and initial_marker true.

Change-only entries:
- Change-only entries update an existing active role object. They do not create a new role object and they do not close the old one.
- Change-only wording includes "Geändert", "Geändert, nunmehr", "Nach Änderung", "weiterhin", "Änderung des Wohnortes", "Änderung der Vertretungsbefugnis".
- If a change-only entry contains a role heading like "Geschäftsführer:", do not treat that heading as a new appointment.
- If the city or name changed, update the existing active role object with the newest known city or name.
- If only representation authority, legal authority, exemption, or responsibility changed, keep the existing object unchanged except for name/city if they changed.
- If a change-only entry mentions a person without a previous active role object, do not create a new role object.

Liquidator:
- Treat Liquidator as a real role.
- If an active Geschäftsführer or Vorstand becomes Liquidator, close the previous active role at the same entry date and create a new Liquidator role starting at the same entry date.
- Phrases like "Nicht mehr Geschäftsführer, nunmehr Liquidator:" or "Nicht mehr Geschäftsführer, nunmehr bestellt als Liquidator:" mean: close Geschäftsführer and start Liquidator.
- Keep Liquidator end_date null unless the input explicitly removes the person as Liquidator.

Person fields:
- Do not reorder names. Keep "Last, First" if the source uses "Last, First".
- Put academic or professional titles in titles, not in name.
- Name must not contain city, birth date, role, or representation text.
- Match people by birth_date first, then by name when birth_date is missing.
- Unknown values must be null. Empty titles must be [].

Timeline:
- If a role is still active, end_date must be null.
- If the same person is appointed, removed, and later appointed again, create separate role objects.
- If a person appears as an active role holder in the first entry, set initial_marker to true.
- If a person appears only as removed/former role holder without a known previous appointment, set initial_marker to true.
- Otherwise initial_marker is false.

Example input:
## Entry 1 | 10.01.2001
Geschäftsführer:
Dr. Sommer, Lena, Köln, *12.03.1975
einzelvertretungsberechtigt.
Geschäftsführer:
Brandt, Felix, München, *04.05.1968

## Entry 4 | 20.06.2005
Nicht mehr
Geschäftsführer:
Dr. Sommer, Lena, Köln, *12.03.1975
Bestellt:
Geschäftsführer:
Keller, Martin, Bonn, *01.02.1970

Example output:
{
  "roles": [
    {
      "name": "Sommer, Lena",
      "titles": ["Dr."],
      "birth_date": "1975-03-12",
      "city": "Köln",
      "role": "Geschäftsführer",
      "start_date": "2001-01-10",
      "end_date": "2005-06-20",
      "initial_marker": true
    },
    {
      "name": "Brandt, Felix",
      "titles": [],
      "birth_date": "1968-05-04",
      "city": "München",
      "role": "Geschäftsführer",
      "start_date": "2001-01-10",
      "end_date": null,
      "initial_marker": true
    },
    {
      "name": "Keller, Martin",
      "titles": [],
      "birth_date": "1970-02-01",
      "city": "Bonn",
      "role": "Geschäftsführer",
      "start_date": "2005-06-20",
      "end_date": null,
      "initial_marker": false
    }
  ]
}

Example input:
## Entry 2 | 05.02.2010
Bestellt:
Geschäftsführer:
Fischer, Laura, Bonn, *18.10.1983

## Entry 3 | 20.11.2015
Geändert, nunmehr:
Geschäftsführer:
Fischer, Laura, Essen, *18.10.1983
mit der Befugnis im Namen der Gesellschaft mit
sich im eigenen Namen oder als Vertreter eines
Dritten Rechtsgeschäfte abzuschließen.

Example output:
{
  "roles": [
    {
      "name": "Fischer, Laura",
      "titles": [],
      "birth_date": "1983-10-18",
      "city": "Essen",
      "role": "Geschäftsführer",
      "start_date": "2010-02-05",
      "end_date": null,
      "initial_marker": false
    }
  ]
}

Example input:
## Entry 7 | 03.04.2012
War Vorstand:
Prof. Dr. Weber, Clara, Hamburg, *20.09.1960
Bestellt als
Vorstand:
Dipl.-Kfm. Neumann, Thomas, Essen, *11.11.1977

Example output:
{
  "roles": [
    {
      "name": "Weber, Clara",
      "titles": ["Prof. Dr."],
      "birth_date": "1960-09-20",
      "city": "Hamburg",
      "role": "Vorstand",
      "start_date": null,
      "end_date": "2012-04-03",
      "initial_marker": true
    },
    {
      "name": "Neumann, Thomas",
      "titles": ["Dipl.-Kfm."],
      "birth_date": "1977-11-11",
      "city": "Essen",
      "role": "Vorstand",
      "start_date": "2012-04-03",
      "end_date": null,
      "initial_marker": false
    }
  ]
}

Example input:
## Entry 2 | 12.05.2006
Bestellt:
Geschäftsführer:
Schmidt, Peter, Essen, *10.10.1965

## Entry 9 | 30.08.2014
Nicht mehr Geschäftsführer, nunmehr
Liquidator:
Schmidt, Peter, Essen, *10.10.1965

Example output:
{
  "roles": [
    {
      "name": "Schmidt, Peter",
      "titles": [],
      "birth_date": "1965-10-10",
      "city": "Essen",
      "role": "Geschäftsführer",
      "start_date": "2006-05-12",
      "end_date": "2014-08-30",
      "initial_marker": false
    },
    {
      "name": "Schmidt, Peter",
      "titles": [],
      "birth_date": "1965-10-10",
      "city": "Essen",
      "role": "Liquidator",
      "start_date": "2014-08-30",
      "end_date": null,
      "initial_marker": false
    }
  ]
}

Now extract roles from this input:

## Entry 1 | 07.01.2013
Geschäftsführer:
Marrón Chicote, Pedro José, Bonn, *18.08.1974
mit der Befugnis im Namen der Gesellschaft mit
sich im eigenen Namen oder als Vertreter eines
Dritten Rechtsgeschäfte abzuschließen.
Geschäftsführer:
Handte, Marcus, Troisdorf, *10.03.1978
mit der Befugnis im Namen der Gesellschaft mit
sich im eigenen Namen oder als Vertreter eines
Dritten Rechtsgeschäfte abzuschließen.
Geschäftsführer:
Wagner, Stephan, Bonn, *18.10.1983
mit der Befugnis im Namen der Gesellschaft mit
sich im eigenen Namen oder als Vertreter eines
Dritten Rechtsgeschäfte abzuschließen.

## Entry 3 | 20.11.2015
Geändert, nunmehr:
Geschäftsführer:
Wagner, Stephan, Essen, *18.10.1983
mit der Befugnis im Namen der Gesellschaft mit
sich im eigenen Namen oder als Vertreter eines
Dritten Rechtsgeschäfte abzuschließen.

## Entry 4 | 21.02.2019
Nicht mehr
Geschäftsführer:
Handte, Marcus, Troisdorf, *10.03.1978
Nicht mehr
Geschäftsführer:
Wagner, Stephan, Essen, *18.10.1983

