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 static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (Throwable e) {
					e.printStackTrace();
					exit(999);
				}
			}
		}, "1", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

		int n = nextInt();
		int a = nextInt();
		int b = nextInt();
		
		int m[] = new int[n];
		int mm[] = new int[n];
		for(int i = 0; i < n; i++)
			m[i] = mm[i] = nextInt();
		sort(mm);
		
		int z1[] = new int[6];
		int z2[] = new int[6];
		int sum[] = new int[6];
		for(int i = 0; i < a; i++){
			if(a < b)
				z1[mm[n - 1 - i]]++;
			else
				z1[mm[i]]++;
		}
		for(int i = 0; i < n; i++){
			sum[mm[n - 1 - i]]++;
		}
//		if(d == 1)
			for(int i = 0; i < 6; i++)
				z2[i] = sum[i] - z1[i];
			
//		System.err.println(Arrays.toString(z1));
//		System.err.println(Arrays.toString(sum));
//		System.err.println(Arrays.toString(z1));
		
		char s1[] = new char[n];
		char s2[] = new char[n];
		int i1 = 0, i2 = 0;
		for(int i = 0; i < n; i++){
			if(z1[m[i]] --> 0)
				s1[i1++] = '1';
			else
				s1[i1++] = '2';
		}
		

		

		for(int i = 0; i < n; i++){
			if(z2[m[i]] --> 0)
				s2[i2++] = '2';
			else
				s2[i2++] = '1';
		}
		String ss1 = new String(s1);
		String ss2 = new String(s2);
		if(a == b)
			for(int i = 0; i < n; i++){
				if(i != 0)
					out.print(" ");
				if(i < a)
					out.print("1");
				else
					out.print("2");
			}
		else
			if(ss1.compareTo(ss2) > 0)
				for(int i = 0; i < n; i++){
					if(i != 0)
						out.print(" ");
					out.print(ss2.charAt(i));
				}
			else
				for(int i = 0; i < n; i++){
					if(i != 0)
						out.print(" ");
					out.print(ss1.charAt(i));
				}
		in.close();
		out.close();
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}
