After the educational reform Polycarp studies only two subjects at school, Safety Studies and PE (Physical Education). During the long months of the fourth term, he received n marks in them. When teachers wrote a mark in the journal, they didn't write in what subject the mark was for, they just wrote the mark.

Now it's time to show the journal to his strict parents. Polycarp knows that recently at the Parent Meeting the parents were told that he received a Safety Studies marks and b PE marks (a + b = n). Now Polycarp wants to write a subject's name in front of each mark so that: 

  * there are exactly a Safety Studies marks, 
  * there are exactly b PE marks, 
  * the total average score in both subjects is maximum. 



An average subject grade is the sum of all marks in it, divided by the number of them. Of course, the division is performed in real numbers without rounding up or down. Polycarp aims to maximize the x1 + x2, where x1 is the average score in the first subject (Safety Studies), and x2 is the average score in the second one (Physical Education).

Input

The first line contains an integer n (2 ≤ n ≤ 105), n is the number of marks in Polycarp's Journal. The second line contains two positive integers a, b (1 ≤ a, b ≤ n - 1, a + b = n). The third line contains a sequence of integers t1, t2, ..., tn (1 ≤ ti ≤ 5), they are Polycarp's marks.

Output

Print the sequence of integers f1, f2, ..., fn, where fi (1 ≤ fi ≤ 2) is the number of a subject to which the i-th mark should be attributed. If there are several possible solutions, then print such that the sequence f1, f2, ..., fn is the smallest lexicographically.

The sequence p1, p2, ..., pn is lexicographically less than q1, q2, ..., qn if there exists such j (1 ≤ j ≤ n) that pi = qi for all 1 ≤ i < j, аnd pj < qj.

Examples

Input

5
3 2
4 4 5 4 4


Output

1 1 2 1 2 

Input

4
2 2
3 5 4 5


Output

1 1 2 2 

Input

6
1 5
4 4 4 5 4 4


Output

2 2 2 1 2 2 

Note

In the first sample the average score in the first subject is equal to 4, and in the second one — to 4.5. The total average score is 8.5.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.InputMismatchException;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.lang.Double.*;
import static java.math.BigInteger.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class Main implements Runnable {
	
	private long start;
	
	private void solve() throws IOException {
//      start = System.currentTimeMillis();
		init();
		readData();
		processing();
	}

	private void processing() {
		int[] c = new int[6];
		fill(c, 0);
		for (int i = 0; i < n; ++i) {
			++c[marks[i]];
		}
		int[] take = new int[6];
		fill(take, 0);
		if (n > 2*a) {
			int r = a;
			for (int i = 5; i >= 1; --i) {
				if (c[i] <= r) {
					take[i] = c[i];
					r -= c[i];
					if (r == 0) {
						break;
					}
				}
				else {
					take[i] = r;
					r = 0;
					break;
				}
			}
			for (int i = 0; i < n; ++i) {
				if (take[marks[i]] > 0) {
					--take[marks[i]];
					print("1 ");
				}
				else {
					print("2 ");
				}
			}
		}
		else if (n < 2*a) {
			int r = a;
			for (int i = 1; i <= 5; ++i) {
				if (c[i] <= r) {
					take[i] = c[i];
					r -= c[i];
					if (r == 0) {
						break;
					}
				}
				else {
					take[i] = r;
					r = 0;
					break;
				}
			}
			for (int i = 0; i < n; ++i) {
				if (take[marks[i]] > 0) {
					--take[marks[i]];
					print("1 ");
				}
				else {
					print("2 ");
				}
			}
		}
		else {
			for (int i = 0; i < a; ++i) {
				print("1 ");
			}
			for (int i = 0; i < a; ++i) {
				print("2 ");
			}
		}
	}
	
	private void init() {
	
	}
	
	private void readData() throws IOException {
		n = nextInt();
		a = nextInt();
		b = nextInt();
		marks = new int[n];
		for (int i = 0; i < n; ++i) {
			marks[i] = nextInt();
		}
	}

	private int n;
	private int a;
	private int b;
	private int[] marks;

	private static final int INF = 1000000001;
	
	public static void main(String[] args) throws InterruptedException {
		new Thread(null, new Runnable() {
			public void run() {
				new Main().run();
			}
		}, "1", 1 << 26).start();
	}	
	
	// @Override
	public void run() {
		try {
			boolean onlineJudge = System.getProperty("ONLINE_JUDGE") != null;
			reader = onlineJudge ? new BufferedReader(new InputStreamReader(
					System.in)) : new BufferedReader(
					new FileReader("input.txt"));
			writer = onlineJudge ? new PrintWriter(new BufferedWriter(
					new OutputStreamWriter(System.out))) : new PrintWriter(
					new BufferedWriter(new FileWriter("output.txt")));
			Locale.setDefault(Locale.US);
			tokenizer = null;
			solve();
			writer.flush();
		} catch (Exception error) {
			error.printStackTrace();
			System.exit(1);
		}
	}
	
	class InputReader {
	       
        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 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 String readString() {
            int c = read();
            while (isSpaceChar(c))
                    c = read();
            StringBuffer res = new StringBuffer();
            do {
                    res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
 
        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
        private String readLine0() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                    if (c != '\r')
                            buf.appendCodePoint(c);
                    c = read();
            }
            return buf.toString();
        }
 
        public String readLine() {
            String s = readLine0();
            while (s.trim().length() == 0)
                    s = readLine0();
            return s;
        }
 
        public String readLine(boolean ignoreEmptyLines) {
            if (ignoreEmptyLines)
                    return readLine();
            else
                    return readLine0();
        }
 
        public char readCharacter() {
            int c = read();
            while (isSpaceChar(c))
                    c = read();
            return (char) c;
        }
 
        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;
        }
        
        private InputStream stream;
        private byte[] buf = new byte[1<<16];
        private int curChar;
        private int numChars;
	}
	
	private class Parser {

        public Parser(InputStream in) {
           din = new DataInputStream(in);
           buffer = new byte[BUFFER_SIZE];
           bufferPointer = bytesRead = 0;
        }

        public byte c;
        
        public int nextInt() throws IOException {
           int value = 0;
           c = read();
           while (c <= ' ') c = read();
           boolean neg = c == '-';
           if (neg) c = read();
           do {
              value = value*10 + c-48;
              c = read();
           } 
           while (c > ' ');
           if (neg) {
               return -value;
           }
           else {
               return value;
           }
        }

        private void fillBuffer() throws IOException {
           bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
           if (bytesRead == -1) buffer[0] = -1;
        }

        public byte read() throws IOException {
           if (bufferPointer == bytesRead) fillBuffer();
           return buffer[bufferPointer++];
        }

        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
        
        final private int BUFFER_SIZE = 1 << 16;
    }

	private BufferedReader reader;
	private PrintWriter writer;
	private StringTokenizer tokenizer;

	private void println() {
		writer.println();
	}
	
	private void print(Object obj) {
		writer.print(obj);
	}
	
	private void println(Object obj) {
		writer.println(obj);
	}
	
	private void printf(String f, Object... obj) {
		writer.printf(f, obj);
	}

	private int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	private double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	private String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}