#include <bits/stdc++.h>
using namespace std;
const int boss = 2e5;
map<int, int> used;
queue<int> q;
int n, k, c[2], a[boss + 10];
int main() {
  int i, answer = 0;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (used[a[i]] || c[a[i] % 2] == n / 2)
      q.push(i);
    else
      used[a[i]] = 1, c[a[i] % 2]++;
  }
  for (i = 1; i <= k && !q.empty(); i++) {
    if (used[i]) continue;
    if (c[i % 2] < n / 2) {
      c[i % 2]++;
      answer++;
      a[q.front()] = i;
      q.pop();
    }
  }
  if (!q.empty())
    return printf("-1"), 0;
  else {
    cout << answer << endl;
    for (i = 1; i <= n; i++) printf("%d ", a[i]);
  }
}
