#include <bits/stdc++.h>
using namespace std;
int arr[200100], a[2];
vector<int> vec;
map<int, int> mp;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  int odd = 0, even = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    if (mp.count(arr[i]) || a[arr[i] % 2] >= n / 2)
      vec.push_back(i);
    else {
      mp[arr[i]]++;
      a[arr[i] % 2]++;
    }
  }
  int x = vec.size();
  for (int i = 1; i <= m && vec.size(); i++) {
    if (mp.count(i) == 0 && a[i % 2] < n / 2) {
      arr[vec.back()] = i;
      vec.pop_back();
      a[i % 2]++;
    }
  }
  if (vec.size())
    cout << "-1";
  else {
    cout << x << "\n";
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
  }
  return 0;
}
