give 2D grid size m x n integer k you need shift grid k timesIn shift operationElement gridij move gridij 1element gridin 1 move gridi 10element gridm 1n 1 move grid00return 2D grid apply shift operation k times Example 1input grid 123456789 k 1Output 912345678example 2input grid 3819197254611101202113 k 4Output 1202113381919725461110example 3input grid 123456789 k 9output 123456789 Constraintsm gridlengthn gridilength1 m 501 n 501000 gridij 10000 k 100