human
Write me a the Python program you requested given the following:
Solve in Python:
This kata is inspired by Space Invaders (Japanese: スペースインベーダー), an arcade video game created by Tomohiro Nishikado and released in 1978.
Alien invaders are attacking Earth and you've been conscripted to defend.
The Bad News: You performed poorly in the manual training. As a result, you're ranked low priority and you're piloting a space jalopy.
The Good News: Your coding skill is better than your piloting and you know the movement pattern of the alien spaceships.
You're going to program an algorithm that aids in shooting down the incoming alien wave despite your limitations.
Input
The action takes place on an m x n matrix. Your function will receive two arguments:

a 2-D array where each subarray represents a row of alien ships. Subarrays consist of integers that represent each alien ship. Zero values (0) are empty spaces.
        
your [row,column] coordinates

The width (n) of a row is equal to the length of a subarray in the first argument and all rows are of the same length.
Your row coordinate will be the last row of the matrix (m - 1).
Alien Ship Movement Pattern

Each alien ship is given in the form of an integer that represents its movement speed and direction.
Alien ships move left or right. A positive integer means an alien moves right, a negative integer means an alien moves left. The absolute value of the integer is the distance the alien moves in 1 turn.
When an alien reaches an edge, it moves down one position and reverses lateral (left/right) direction.

Your Ship's Limitations

Your position is fixed.
Your pulse cannon has a time delay of 1 turn. After the delay, your cannon blasts the first target in its path.
You can fire up to one shot per turn.

Output
Your function should return an array of integers. Each integer represents the turn for each shot fired from your ship's cannon. If it is not possible to destroy all alien ships before they reach the last row, return null or None.
Test Example

Above: Turn 0 (Initial State)
Below: Turn 1

The images above represent the matrix states at Turn 0...
assistant
#Here is the Python program you requested.

def blast_sequence(aliensStart,position):
    
    def moveAliens(aliens, furthest):
        lst, shootPath = [], []
        for x,y,s in aliens:
            y += s
            if not (0 <= y < N):                                           #Out of the grid: move down and reverse
                x, s = x+1, -s
                y = -y-1 if y < 0 else 2*N-y-1
            (shootPath if y == Y else lst).append((x,y,s))
            if x > furthest: furthest = x
        return lst, shootPath, furthest
    
    def shootTarget(shootPath):
        if shootPath:
            z = max(shootPath, key=lambda a: (a[0], abs(a[2]), a[2]))     # Furthest, fastest, going right is considered the highest
            shootPath.remove(z)                                           # MUTATION
            shots.append(turn)                                            # MUTATION
    
    (X,Y), N = position, len(aliensStart[0])
    aliens   = [(x,y,s) for x,r in enumerate(aliensStart) for y,s in enumerate(r) if s]
    shots, furthest, turn = [], 0, -1
    
    while aliens and furthest < X:
        turn += 1
        aliens, shootPath, furthest = moveAliens(aliens, furthest)        # Move all the aliens, splitting them in 2 groups: those facing "my" ship (shootPath) and the others
        shootTarget(shootPath)                                            # Extract the target in shootPath and pop it if possible (mutation). Mutate 'shots' list at the same time
        aliens += shootPath                                               # Put the remaining aliens in the list
    
    return shots if not aliens else None