#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000 + 13;
int cnt[MAXN], goal, moves, playlist[MAXN];
set<pair<int, int> > bs;
int main() {
  int n, m;
  cin >> n >> m;
  int S = 0;
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    playlist[i] = a;
    if (a <= m) {
      cnt[a]++;
      S++;
    }
  }
  for (int i = 1; i <= m; i++) bs.insert(make_pair(cnt[i], i));
  goal = n / m;
  set<pair<int, int> >::iterator it = bs.begin();
  if ((*it).first >= goal) {
    cout << (*it).first << " " << 0 << endl;
    for (int i = 1; i <= n; i++) cout << playlist[i] << " ";
    cout << endl;
    return 0;
  }
  moves = 0;
  for (int i = 1; i <= n; i++) {
    if ((*it).first >= goal) {
      cout << (*it).first << " " << moves << endl;
      for (int i = 1; i <= n; i++) cout << playlist[i] << " ";
      cout << endl;
      return 0;
    }
    if (playlist[i] > m) {
      moves++;
      int ff = (*it).first, ss = (*it).second;
      playlist[i] = (*it).second;
      bs.erase(it);
      bs.insert(make_pair(ff + 1, ss));
      it = bs.begin();
    }
  }
  if ((*it).first >= goal) {
    cout << (*it).first << " " << moves << endl;
    for (int i = 1; i <= n; i++) cout << playlist[i] << " ";
    cout << endl;
    return 0;
  }
  while ((*it).first < goal) {
    set<pair<int, int> >::iterator itp = bs.end();
    itp--;
    for (int i = 1; i <= n; i++)
      if (playlist[i] == (*itp).second) {
        playlist[i] = (*it).second;
        int ff = (*it).first, ss = (*it).second;
        bs.erase(it);
        bs.insert(make_pair(ff + 1, ss));
        ff = (*itp).first, ss = (*itp).second;
        bs.erase(itp);
        bs.insert(make_pair(ff - 1, ss));
        moves++;
        break;
      }
    it = bs.begin();
  }
  cout << (*it).first << " " << moves << endl;
  for (int i = 1; i <= n; i++) cout << playlist[i] << " ";
  cout << endl;
  return 0;
}
