#include <bits/stdc++.h>   int main(void) {     static unsigned char mas[125 * 1000000], mas1[125 * 1000000];     int n, m, mas2[200000], x, rez = 0, last1 = 0, last2 = 1;     scanf( %d %d , &n, &m);     for (int i = 0; i < ceil(m / 8.0); i++) {       mas[i] = 0;       mas1[i] = 0;     }     int samechet = 0, samenechet = 0, dif = 0;     for (int i = 0; i < n; i++) {       scanf( %d , &x);       mas2[i] = x;       if (x & 1) {         dif++;       } else {         dif--;       }       if (mas[(x - 1) >> 3] & (1 << ((x - 1) & 7))) {         mas1[(x - 1) >> 3] |= 1 << ((x - 1) & 7);         if (x & 1) {           samenechet++;         } else {           samechet++;         }       } else {         mas[(x - 1) >> 3] |= 1 << ((x - 1) & 7);       }     }     for (int j = 0; j < n; j++) {       x = mas2[j];       if (x & 1) {         if (mas1[(x - 1) >> 3] & (1 << ((x - 1) & 7))) {           if (mas[(x - 1) >> 3] & (1 << ((x - 1) & 7))) {             mas[(x - 1) >> 3] -= (1 << ((x - 1) & 7));           } else {             if (dif > 0) {               for (int i = last2; i < m; i += 2) {                 if (!(mas[i >> 3] & (1 << (i & 7))) &&                     !(mas1[i >> 3] & (1 << (i & 7)))) {                   mas[i >> 3] |= 1 << (i & 7);                   mas2[j] = i + 1;                   rez++;                   break;                 }                 if (i + 2 >= m) {                   printf( -1 );                   return 0;                 }                 last2 += 2;               }               dif -= 2;             } else {               for (int i = last1; i < m; i += 2) {                 if (!(mas[i >> 3] & (1 << (i & 7))) &&                     !(mas1[i >> 3] & (1 << (i & 7)))) {                   mas[i >> 3] |= 1 << (i & 7);                   mas2[j] = i + 1;                   rez++;                   break;                 }                 if (i + 2 >= m) {                   printf( -1 );                   return 0;                 }                 last1 += 2;               }             }             samenechet--;           }         } else {           if (dif / 2 > samenechet) {             for (int i = last2; i < m; i += 2) {               if (!(mas[i >> 3] & (1 << (i & 7))) &&                   !(mas1[i >> 3] & (1 << (i & 7)))) {                 mas[i >> 3] |= 1 << (i & 7);                 mas2[j] = i + 1;                 rez++;                 break;               }               if (i + 2 >= m) {                 printf( -1 );                 return 0;               }               last2 += 2;             }             dif -= 2;           }         }       } else {         if (mas1[(x - 1) >> 3] & (1 << ((x - 1) & 7))) {           if (mas[(x - 1) >> 3] & (1 << ((x - 1) & 7))) {             mas[(x - 1) >> 3] -= (1 << ((x - 1) & 7));           } else {             if (dif < 0) {               for (int i = last1; i < m; i += 2) {                 if (!(mas[i >> 3] & (1 << (i & 7))) &&                     !(mas1[i >> 3] & (1 << (i & 7)))) {                   mas[i >> 3] |= 1 << (i & 7);                   mas2[j] = i + 1;                   rez++;                   break;                 }                 if (i + 2 >= m) {                   printf( -1 );                   return 0;                 }                 last1 += 2;               }               dif += 2;             } else {               for (int i = last2; i < m; i += 2) {                 if (!(mas[i >> 3] & (1 << (i & 7))) &&                     !(mas1[i >> 3] & (1 << (i & 7)))) {                   mas[i >> 3] |= 1 << (i & 7);                   mas2[j] = i + 1;                   rez++;                   break;                 }                 if (i + 2 >= m) {                   printf( -1 );                   return 0;                 }                 last2 += 2;               }             }             samechet--;           }         } else {           if (dif / 2 < -samechet) {             for (int i = last1; i < m; i += 2) {               if (!(mas[i >> 3] & (1 << (i & 7))) &&                   !(mas1[i >> 3] & (1 << (i & 7)))) {                 mas[i >> 3] |= 1 << (i & 7);                 mas2[j] = i + 1;                 rez++;                 break;               }               if (i + 2 >= m) {                 printf( -1 );                 return 0;               }               last1 += 2;             }             dif += 2;           }         }       }     }     printf( %d n , rez);     for (int i = 0; i < n; i++) {       printf( %d  , mas2[i]);     }   }