Problem: Eugeny has n cards, each of them has exactly one integer written on it. Eugeny wants to exchange some cards with Nikolay so that the number of even integers on his cards would equal the number of odd integers, and that all these numbers would be distinct. 

Nikolay has m cards, distinct numbers from 1 to m are written on them, one per card. It means that Nikolay has exactly one card with number 1, exactly one card with number 2 and so on. 

A single exchange is a process in which Eugeny gives one card to Nikolay and takes another one from those Nikolay has. Your task is to find the minimum number of card exchanges and determine which cards Eugeny should exchange.

Input

The first line contains two integers n and m (2 ≤ n ≤ 2·105, 1 ≤ m ≤ 109) — the number of cards Eugeny has and the number of cards Nikolay has. It is guaranteed that n is even.

The second line contains a sequence of n positive integers a1, a2, ..., an (1 ≤ ai ≤ 109) — the numbers on Eugeny's cards.

Output

If there is no answer, print -1.

Otherwise, in the first line print the minimum number of exchanges. In the second line print n integers — Eugeny's cards after all the exchanges with Nikolay. The order of cards should coincide with the card's order in the input data. If the i-th card wasn't exchanged then the i-th number should coincide with the number from the input data. Otherwise, it is considered that this card was exchanged, and the i-th number should be equal to the number on the card it was exchanged to.

If there are multiple answers, it is allowed to print any of them.

Examples

Input

6 2
5 6 7 9 4 5


Output

1
5 6 7 9 4 2 


Input

8 6
7 7 7 7 8 8 8 8


Output

6
7 2 4 6 8 1 3 5 


Input

4 1
4 2 1 10


Output

-1

Solution (in JAVA):

Solution:


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.lang.*;


public class E{
	static long mod=1000000007;
	
    public static void main(String[] args) throws Exception{           	
    	InputReader in = new InputReader(System.in);       
    	PrintWriter pw=new PrintWriter(System.out);   
    	
    	
    	//int t=in.readInt();
        //while(t-->0)
        //{
    	
        int n=in.readInt();
        int m=in.readInt();
    	//long n=in.readLong();
        TreeSet<Integer> ts1=new TreeSet<Integer>(); //odd
        TreeSet<Integer> ts2=new TreeSet<Integer>(); //evem
        if(m<=1000000)
        {
        	for(int i=1;i<=m;i++)
        	{
        		if(i%2==1)
        			ts1.add(i);
        		else
        			ts2.add(i);
        	}
        }
        else
        {
        	for(int i=1;i<=1000000;i++)
        	{
        		if(i%2==1)
        			ts1.add(i);
        		else
        			ts2.add(i);
        	}
        }
        int k=n/2;
        int o=0,e=0;
    	int a[]=new int[n];
    	int c1=0,c2=0;
    	int min=0;
    	int f=1;
    	HashSet<Integer>hs1=new HashSet<Integer>();
    	HashSet<Integer>hs2=new HashSet<Integer>();
    	for(int i=0;i<n;i++)
    	{
    		a[i]=in.readInt();
    		
    		if(a[i]%2==1)
    			{
    				if(ts1.contains(a[i]))
    					ts1.remove(a[i]);
    				o++;
    				hs1.add(a[i]);
    			}
    		else
    			{
    				if(ts2.contains(a[i]))
    					ts2.remove(a[i]);
    				e++;
    				hs2.add(a[i]);
    			}
    	}
    	HashSet<Integer>hs=new HashSet<Integer>();
    	for(int i=0;i<n;i++)
    	{
    		int x=a[i];
    		if(x%2==1)
    		{
    			if(hs.contains(x))
    			{
    				if(c1==k)
    				{
    					c2++;
    					min++;
    					if(ts2.size()==0)
    					{
    						f=0;
    						break;
    					}
    					int y=ts2.first();
    					ts2.remove(y);
    					a[i]=y;
    				}
    				else
    				{
    				int r=k-c1;
    				if(hs1.size()>=r)
    				{
    					c2++;
    					min++;
    					if(ts2.size()==0)
    					{
    						f=0;
    						break;
    					}
    					int y=ts2.first();
    					ts2.remove(y);
    					a[i]=y;
    				}
    				else
    				{
    				min++;
    				if(ts1.size()==0)
					{
						f=0;
						break;
					}
    				int y=ts1.first();
    				ts1.remove(y);
    				a[i]=y;
    				c1++;
    				}
    				}
    			}
    			else
    			{
    				if(c1==k)
    				{
    					c2++;
    					if(ts2.size()==0)
    					{
    						f=0;
    						break;
    					}
    					int y=ts2.first();
    					ts2.remove(y);
    					a[i]=y;
    					min++;
    				}
    				else
    				{
    					hs1.remove(x);
    					hs.add(x);
    					c1++;
    				}
    			}
    		}
    		else
    		{
    			if(hs.contains(x))
    			{
    				if(c2==k)
    				{
    					c1++;
    					min++;
    					if(ts1.size()==0)
    					{
    						f=0;
    						break;
    					}
    					int y=ts1.first();
    					ts1.remove(y);
    					a[i]=y;
    				}
    				else
    				{
    				int r=k-c2;
    				if(hs2.size()>=r)
    				{
    					c1++;
    					min++;
    					if(ts1.size()==0)
    					{
    						f=0;
    						break;
    					}
    					int y=ts1.first();
    					ts1.remove(y);
    					a[i]=y;
    				}
    				else
    				{
    				min++;
    				if(ts2.size()==0)
					{
						f=0;
						break;
					}
    				int y=ts2.first();
    				ts2.remove(y);
    				a[i]=y;
    				c2++;
    				}
    				}
    			}
    			else
    			{
    				if(c2==k)
    				{
    					c1++;
    					if(ts1.size()==0)
    					{
    						f=0;
    						break;
    					}
    					int y=ts1.first();
    					ts1.remove(y);
    					a[i]=y;
    					min++;
    				}
    				else
    				{
    					hs2.remove(x);
    					hs.add(x);
    					c2++;
    				}
    			}
    		}
    	}
    	//String a=in.readString();
    	if(f==0)
    		pw.println("-1");	     	
    	else
    	{
    		pw.println(min);
    		for(int i=0;i<n;i++)
    			pw.print(a[i]+" ");
    	}
    	//}
    	
    	pw.close();
    }
    

	
public static long gcd(long x,long y)
{
	if(x%y==0)
		return y;
	else
		return gcd(y,x%y);
}
public static int gcd(int x,int y)
{
	if(x%y==0)
		return y;
	else 
		return gcd(y,x%y);
}
public static int abs(int a,int b)
{
	return (int)Math.abs(a-b);
}
public static long abs(long a,long b)
{
	return (long)Math.abs(a-b);
}
public static int max(int a,int b)
{
	if(a>b)
		return a;
	else
		return b;
}
public static int min(int a,int b)
{
	if(a>b)
		return b;
	else 
		return a;
}
public static long max(long a,long b)
{
	if(a>b)
		return a;
	else
		return b;
}
public static long min(long a,long b)
{
	if(a>b)
		return b;
	else 
		return a;
}


public static long pow(long n,long p,long m)
{
	 long  result = 1;
	  if(p==0)
	    return 1;
	if (p==1)
	    return n;
	while(p!=0)
	{
	    if(p%2==1)
	        result *= n;
	    if(result>=m)
	    result%=m;
	    p >>=1;
	    n*=n;
	    if(n>=m)
	    n%=m;
	}
	return result;
}
public static long pow(long n,long p)
{
	long  result = 1;
	  if(p==0)
	    return 1;
	if (p==1)
	    return n;
	while(p!=0)
	{
	    if(p%2==1)
	        result *= n;	    
	    p >>=1;
	    n*=n;	    
	}
	return result;

}
static class Pair implements Comparable<Pair>
{
	int a,b;
	Pair (int a,int b)
	{
		this.a=a;
		this.b=b;
	}

	public int compareTo(Pair o) {
		// TODO Auto-generated method stub
		if(this.a!=o.a)
		return Integer.compare(this.a,o.a);
		else
			return Integer.compare(this.b, o.b);
		//return 0;
	}
	public boolean equals(Object o) {
        if (o instanceof Pair) {
            Pair p = (Pair)o;
            return p.a == a && p.b == b;
        }
        return false;
    }
    public int hashCode() {
        return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
    }
    
} 
    
static long sort(int a[])
{  int n=a.length;
	int b[]=new int[n];	
	return mergeSort(a,b,0,n-1);}
static long mergeSort(int a[],int b[],long left,long right)
{ long c=0;if(left<right)
 {   long mid=left+(right-left)/2;
	 c= mergeSort(a,b,left,mid);
	 c+=mergeSort(a,b,mid+1,right);
	 c+=merge(a,b,left,mid+1,right); }	
	return c;	 }
static long merge(int a[],int  b[],long left,long mid,long right)
{long c=0;int i=(int)left;int j=(int)mid; int k=(int)left;
while(i<=(int)mid-1&&j<=(int)right)
{ if(a[i]<=a[j]) {b[k++]=a[i++]; }
else	{ b[k++]=a[j++];c+=mid-i;}}
while (i <= (int)mid - 1)   b[k++] = a[i++]; 
while (j <= (int)right) b[k++] = a[j++];
for (i=(int)left; i <= (int)right; i++) 
	a[i] = b[i];  return c;  }
    
public static int[] radixSort(int[] f)
{
	int[] to = new int[f.length];
	{
		int[] b = new int[65537];
		for(int i = 0;i < f.length;i++)b[1+(f[i]&0xffff)]++;
		for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
		for(int i = 0;i < f.length;i++)to[b[f[i]&0xffff]++] = f[i];
		int[] d = f; f = to;to = d;
	}
	{
		int[] b = new int[65537];
		for(int i = 0;i < f.length;i++)b[1+(f[i]>>>16)]++;
		for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
		for(int i = 0;i < f.length;i++)to[b[f[i]>>>16]++] = f[i];
		int[] d = f; f = to;to = d;
	}
	return f;
}    
static  class InputReader
{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream)
    {
        this.stream = stream;
    }

    public int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars)
        {
            curChar = 0;
            try
            {
                numChars = stream.read(buf);
            } catch (IOException e)
            {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt()
    {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-')
        {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do
        {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String readString()
    {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do
        {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
    public String readLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }
    

    public double readDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E')
                return res * Math.pow(10, readInt());
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }
    public long readLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }
    public boolean isSpaceChar(int c)
    {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public String next()
    {
        return readString();
    }

    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
    public boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }
}

  
//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	//StringBuilder sb=new StringBuilder("");
	 //InputReader in = new InputReader(System.in);
	//PrintWriter pw=new PrintWriter(System.out);
	//String line=br.readLine().trim();
	       	
	//int t=Integer.parseInt(br.readLine());
  //	while(t-->0)
  	//{
  	//int n=Integer.parseInt(br.readLine());
	//long n=Long.parseLong(br.readLine());
	//String l[]=br.readLine().split(" ");
  //int m=Integer.parseInt(l[0]);
	//int k=Integer.parseInt(l[1]);
	//String l[]=br.readLine().split(" ");
	//l=br.readLine().split(" ");
	/*int a[]=new int[n];
	for(int i=0;i<n;i++)
	{
		a[i]=Integer.parseInt(l[i]);
	}*/
	   //System.out.println(" ");	     	
	
	//}
}