Repaint a connected patch
An image is a non-empty grid image of integers, one color per pixel. Starting from the pixel in row row and column col, repaint with color that pixel and every pixel you can reach from it by stepping up, down, left or right through pixels of the same color as the start. Return the image after repainting; every other pixel keeps its color.
Diagonal steps don't count, and color may already be the start's color.
Examples
repaint([[1,1,1],[1,1,0],[1,0,1]], 1, 1, 2)→[[2,2,2],[2,2,0],[2,0,1]]repaint([[0,0,0],[0,0,0]], 0, 0, 0)→[[0,0,0],[0,0,0]]repaint([[1,0],[0,1]], 0, 0, 3)→[[3,0],[0,1]]