#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[200005], x, y;
map<int, int> mp;
int main(void) {
  cin >> n >> m;
  if (n & 1) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    mp[a[i]]++;
    if (mp[a[i]] == 1) {
      if (a[i] & 1)
        x++;
      else
        y++;
    }
  }
  int even = 2, odd = 1, ans = 0;
  for (int i = 0; i < n; ++i) {
    if (mp[a[i]] == 1 && (a[i] & 1) && x > n / 2) {
      ans++;
      mp[a[i]] = 0;
      while (mp[even] != 0) even += 2;
      if (even > m) {
        cout << "-1\n";
        return 0;
      }
      a[i] = even;
      mp[even] = 1;
      x--, y++;
    } else if (mp[a[i]] == 1 && (a[i] % 2 == 0) && y > n / 2) {
      ans++;
      mp[a[i]] = 0;
      while (mp[odd] != 0) odd += 2;
      if (odd > m) {
        cout << "-1\n";
        return 0;
      }
      a[i] = odd;
      mp[odd] = 1;
      y--, x++;
    }
    if (mp[a[i]] > 1) {
      ans++;
      mp[a[i]] -= 1;
      if (x <= y) {
        while (mp[odd] != 0) odd += 2;
        if (odd > m) {
          cout << "-1\n";
          return 0;
        }
        a[i] = odd;
        mp[odd] = 1;
        x++;
      } else {
        while (mp[even] != 0) even += 2;
        if (even > m) {
          cout << "-1\n";
          return 0;
        }
        a[i] = even;
        mp[even] = 1;
        y++;
      }
    }
  }
  if (x != y) {
    cout << "-1\n";
    return 0;
  }
  cout << ans << endl;
  for (int i = 0; i < n; ++i) cout << a[i] << " ";
}
