func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 402;   int a[maxn], f[maxn][2];   int n, m, s, ans;   int main() {     int i, j, k;     scanf( %d%d , &n, &m);     while (m--) {       scanf( %d , &k);       while (k--) {         scanf( %d , &i);         a[i] = ++s;       }     }     for (k = 1; k <= n; k++)       if (!a[k]) break;     for (i = 1; i <= s; i++) {       if (a[i] != i) {         for (j = i + 1; j <= n; j++)           if (a[j] == i) break;         if (i != k) {           f[++ans][0] = i;           f[ans][1] = k;         }         f[++ans][0] = j;         f[ans][1] = i;         a[k] = a[i];         a[i] = i;         k = j;       }     }     printf( %d n , ans);     for (i = 1; i <= ans; i++) printf( %d %d n , f[i][0], f[i][1]);     return 0;   }   