#include <bits/stdc++.h>   using namespace std;   map<int, int> mp;   int main() {     ios::sync_with_stdio(false);     int n, m;     cin >> n >> m;     int a[n + 1];     int ev = 2, od = 1;     int tev = 0, tod = 0;     int tot = 0;     for (int i = 0; i < n; i++) {       cin >> a[i];       mp[a[i]]++;       if (a[i] % 2 == 0)         tev++;       else         tod++;     }     for (int i = 0; i < n; i++) {       if (mp[a[i]] > 1) {         if (a[i] % 2) {           if (tod > tev) {             while (mp[ev] != 0) ev += 2;             if (ev > m) return cout << -1, 0;             mp[ev] = 1;             mp[a[i]]--;             a[i] = ev;             tev++;             tod--;             tot++;           } else {             while (mp[od] != 0) od += 2;             if (od > m) return cout << -1, 0;             mp[od] = 1;             mp[a[i]]--;             a[i] = od;             tot++;           }         } else {           if (tod < tev) {             while (mp[od] != 0) od += 2;             if (od > m) return cout << -1, 0;             mp[od] = 1;             mp[a[i]]--;             a[i] = od;             tev--;             tod++;             tot++;           } else {             while (mp[ev] != 0) ev += 2;             if (ev > m) return cout << -1, 0;             mp[ev] = 1;             mp[a[i]]--;             a[i] = ev;             tot++;           }         }       }     }     for (int i = 0; i < n; i++) {       if (a[i] % 2) {         if (tev < tod) {           tot++;           while (mp[ev] != 0) ev += 2;           if (ev > m) return cout << -1, 0;           mp[ev] = 1;           a[i] = ev;           tod--;           tev++;         }       } else {         if (tev > tod) {           tot++;           while (mp[od] != 0) od += 2;           if (od > m) return cout << -1, 0;           mp[od] = 1;           a[i] = od;           tod++;           tev--;         }       }     }     cout << tot << endl;     for (int i = 0; i < n; i++) cout << a[i] <<    ;     return 0;   }   