You are given an M×N 2D grid representing a field of plants. Each cell is one of: 'X' (infected), '.' (healthy/susceptible), or 'I' (immune). The problem is presented as 5 progressive sub-parts, each adding complexity: Part 1 (Basic Infection): Every day, each infected cell ('X') spreads infection to all 8…