#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v, g;
  int cnt[m + 1];
  memset(cnt, 0, sizeof cnt);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    v.push_back(a);
    g.push_back(a);
    if (a <= m) cnt[a]++;
  }
  priority_queue<pair<int, int> > pq;
  for (int i = 1; i <= m; i++) {
    pq.push({cnt[i], i});
  }
  int ans = n / m;
  int hano = 0;
  cout << ans << ' ';
  while (pq.size()) {
    int id = pq.top().second;
    int c = pq.top().first;
    int tmp = c - ans;
    pq.pop();
    if (tmp == 0) continue;
    for (int i = 0; i < n; i++) {
      if (tmp == 0) {
        break;
      }
      if (tmp > 0) {
        if (v[i] == id) {
          v[i] = -1;
          hano++;
          tmp--;
        }
      } else if (tmp < 0) {
        if (v[i] == -1) {
          v[i] = id;
          tmp++;
        } else {
          if (v[i] > m) {
            v[i] = id;
            tmp++;
            hano++;
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++)
    if (v[i] == -1) hano -= 1;
  cout << hano << endl;
  for (int i = 0; i < n; i++) {
    if (v[i] == -1)
      cout << g[i] << ' ';
    else
      cout << v[i] << ' ';
  }
  cout << endl;
  return 0;
}
