func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX = 2e5 + 5;   int now;   int n, m, c, a[MAX];   int main() {     cin >> n >> m >> c;     c /= 2;     while (m--) {       int x;       scanf( %d , &x);       if (x <= c) {         for (int i = 1; i <= n; i++) {           if (a[i] == 0 || a[i] > x) {             a[i] = x;             printf( %d n , i);             fflush(stdout);             break;           }         }       } else {         for (int i = n; i >= 1; i--) {           if (a[i] == 0 || a[i] < x) {             a[i] = x;             printf( %d n , i);             fflush(stdout);             break;           }         }       }       now = 0;       for (int i = 1; i <= n; i++) {         if (a[i] != 0) now++;       }       if (now == n) break;     }     return 0;   }   