input: from typing import List
  
  def determine_champion(skills: List[int], k: int) -> int:
      """
      In a competitive event, there are n players indexed from 0 to n - 1.
  
      You have an array skills of size n and a positive integer k, where skills[i] indicates the skill level of the player i. Each skill level in the array is unique.
  
      Players are initially positioned in a line, sorted from player 0 to player n - 1.
  
      The competition follows these rules:
  
      The first two players in line compete, with the player having the higher skill level emerging victorious.
      Post-match, the winner remains at the front of the line while the defeated player moves to the end.
      The champion of the event is the first player to win k consecutive games.
  
      Return the originating index of the champion.
  
      Examples:
      >>> skills = [4,2,6,3,9], k = 2
      2
      >>> skills = [2,5,4], k = 3
      1
  
      Constraints:
      n == skills.length
      2 <= n <= 10^5
      1 <= k <= 10^9
      1 <= skills[i] <= 10^6
      All skill levels in skills are distinct.
      """
output:     
      n = len(skills)
      max_skill = max(skills)
      
      max_index = skills.index(max_skill)
      if k >= n - 1:
          return max_index
  
      current_winner_index = 0
      current_wins = 0
      
      for i in range(1, n):
          if skills[current_winner_index] > skills[i]:
              current_wins += 1
              if current_wins == k:
                  return current_winner_index
          else:
              current_winner_index = i
              current_wins = 1
              if current_wins == k:
                  return current_winner_index
      
      return current_winner_index
  