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.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * 111118315581
 *
 * -3 3 2 3 2 3 2 3 -3 3 -3 3 -3 3 2 3
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static int[][] dp;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        Entry[] data = new Entry[n];
        for (int i = 0; i < data.length; i++) {
            data[i] = new Entry(i, in.nextInt());
        }

        int[] result = new int[n];
        int index = n - 1;
        if (b < a) {
            Arrays.sort(data, new Comparator<Entry>() {
                @Override
                public int compare(Entry o1, Entry o2) {
                    if (o1.val != o2.val) {
                        return o1.val - o2.val;
                    }
                    return o1.index - o2.index;
                }
            });
            while (b > 0) {
                result[data[index--].index] = 2;
                b--;
            }
            while (a > 0) {
                result[data[index--].index] = 1;
                a--;
            }
        } else if(a < b){
            Arrays.sort(data, new Comparator<Entry>() {
                @Override
                public int compare(Entry o1, Entry o2) {
                    if (o1.val != o2.val) {
                        return o1.val - o2.val;
                    }
                    return o2.index - o1.index;
                }
            });
            while (a > 0) {
                result[data[index--].index] = 1;
                a--;
            }
            while (b > 0) {
                result[data[index--].index] = 2;
                b--;
            }
        }else{
            for(int i = 0; i < a; i++){
                result[i] = 1;
            }
            for(int j = a; j < a + b ; j++){
                result[j] = 2;
            }
        }
        for(int i= 0; i < n; i++){
            out.print(result[i] + " ");
        }
        out.close();
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Entry implements Comparable<Entry> {

        int index, val;

        public Entry(int index, int val) {
            this.index = index;
            this.val = val;
        }

        @Override
        public int compareTo(Entry o) {
            return val - o.val;
        }
    }

//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}
