#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[2222];
int d[2222];
int b[2222];
vector<int> ps;
bool check(int x) {
  memset(d, 0, sizeof(d));
  ps.clear();
  for (int i = 1; i <= n; i++)
    if (a[i] > m) {
      ps.push_back(i);
    } else {
      if (d[a[i]] < x) {
        d[a[i]]++;
      } else
        ps.push_back(i);
    }
  int cnt = 0;
  for (int i = 1; i <= m; i++) cnt += (x - d[i]);
  return (cnt <= (int)ps.size());
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int ret = -1;
  for (int i = 0; i <= n; i++)
    if (!check(i))
      break;
    else
      ret = i;
  cout << ret << " ";
  check(ret);
  int rr = 0;
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= ret - d[i]; j++) {
      a[ps[rr]] = i;
      rr++;
    }
  cout << rr << "\n";
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
