You are commuting across a simplified map of San Francisco, represented as a 2D grid. Each cell is one of: 'S' (starting point / home), 'D' (destination / Databricks HQ), a digit '1'–'k' representing a street segment reserved for exactly one transportation mode, or 'X' (impassable roadblock). You are given…