You are commuting across a simplified map of San Francisco, represented as a 2D grid. Each cell on the grid is one of the following: 'S' (your home location, the starting point), 'D' (your office location, the destination), a digit from '1' to 'k' (a street segment reserved for exactly one transportation mode), or 'X' (an impassable roadblock). You are also given three arrays of length k: modes (the name of each available transportation mode), times (the time in minutes required to traverse a single block using each mode), and costs (the cost in dollars to traverse a single block using each mode). Movement is allowed up, down, left, and right only (no diagonal movement). You may only travel along contiguous cells of the same transportation mode (i.e., same digit); you cannot switch modes mid-journey, nor can you move between cells of different modes or cross roadblocks. For each mode i (0-indexed), the time and cost to traverse a single block are given by times[i] and costs[i], respectively. The total travel time and total cost are calculated as the sum of the time and cost for each mode cell traversed along the path from 'S' to 'D'; 'S' and 'D' are special cells and do not contribute to cost. Return the name of the transportation mode that yields the minimum total time from 'S' to 'D'. If multiple modes result in the same minimum time, return the one with the lowest total cost. Return an empty string "" if no valid route exists.