func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     char alfabetGainuse[] =          -abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789 ;     int T;     cin >> T;     for (int t = 1; t <= T; t++) {       int r, c, k;       cin >> r >> c >> k;       char harta[r + 1][c + 1];       cin.get();       for (int i = 1; i <= r; i++) {         cin.get(harta[i], c + 1);         cin.get();       }       int mancare = 0;       for (int i = 1; i <= r; i++) {         for (int j = 0; j < c; j++) {           if (harta[i][j] ==  R ) mancare++;         }       }       int mancareGainuse[k + 1];       for (int i = 1; i <= k; i++) {         mancareGainuse[i] = mancare / k;       }       for (int i = 1; i <= mancare % k; i++) {         mancareGainuse[i]++;       }       char hartaNoua[r + 1][c + 2];       int indexGaina = 1;       int mancareGasita = 0;       for (int i = 1; i <= r; i++) {         hartaNoua[i][c] =   0 ;         if (i % 2 == 1) {           for (int j = 0; j < c; j++) {             if (indexGaina == k + 1) {               hartaNoua[i][j] = alfabetGainuse[indexGaina - 1];             } else {               hartaNoua[i][j] = alfabetGainuse[indexGaina];               if (harta[i][j] ==  R ) {                 mancareGasita++;                 if (mancareGasita == mancareGainuse[indexGaina]) {                   indexGaina++;                   mancareGasita = 0;                 }               }             }           }         } else {           for (int j = c - 1; j >= 0; j--) {             if (indexGaina == k + 1) {               hartaNoua[i][j] = alfabetGainuse[indexGaina - 1];             } else {               hartaNoua[i][j] = alfabetGainuse[indexGaina];               if (harta[i][j] ==  R ) {                 mancareGasita++;                 if (mancareGasita == mancareGainuse[indexGaina]) {                   indexGaina++;                   mancareGasita = 0;                 }               }             }           }         }       }       for (int i = 1; i <= r; i++) {         cout << hartaNoua[i] <<   n ;       }     }     return 0;   }   