#include <bits/stdc++.h>   #pragma comment(linker,  /STACK:200000 )   const int INF = 1e9 + 7;   const double EPS = 1e-6;   const double pi = acos(-1);   const int MOD = 1e9 + 7;   const int N = 1e5 + 1000;   using namespace std;   double mid;   struct node {     int pos, val;     node() { pos = val = 0; }     node(int a, int b) {       pos = a;       val = b;     }     bool operator<(node a) const {       if (val != a.val) return val < a.val;       if (abs(mid - pos * 1.0) != abs(mid - a.pos * 1.0))         return abs(mid - pos * 1.0) < abs(mid - a.pos * 1.0);       return pos < a.pos;     }   };   int n, m, ans[N];   set<node> st;   int main() {     cin >> n >> m;     mid = (m + 1) * 0.5;     for (int i = 1; i <= m; i++) {       st.insert(node(i, 0));     }     for (int i = 1; i <= n; i++) {       auto it = *st.begin();       st.erase(it);       it.val++;       ans[i] = it.pos;       st.insert(it);     }     for (int i = 1; i <= n; i++) cout << ans[i] <<   n ;     return 0;   }   