import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.*;

public class C {

    MyScanner in;
    PrintWriter out;

    public static void main(String[] args) throws Exception {
        new C().run();
    }

    public void run() throws Exception {
        in = new MyScanner();
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class Pair implements Comparable<Pair> {
        int x, i;

        public Pair (int x, int i) {
            this.x = x;
            this.i = i;
        }

        public int compareTo(Pair o) {
            if (x != o.x) {
                return x - o.x;
            }
            return i - o.i;
        }

    }
    public void solve() throws Exception {
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        int[] p = new int[n];
        int[] ab = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }
        if (a == b) {
            for (int i = 0; i < a; i++) {
                out.print("1 ");
            }
            for (int i = a; i < n; i++) {
                out.print("2 ");
            }
            return;
        }
        Pair[] t = new Pair[n];
        for (int i = 0; i < n; i++) {
            t[i] = new Pair(p[i], i);
        }
        Arrays.sort(t);
        int ta, tb;
        if (a < b) {
            ta = 1;
            tb = 2;
            int tt = a;
            a = b;
            b = tt;
        } else {
            ta = 2;
            tb = 1;
        }
        for (int i = 0; i < a; i++) {
            ab[t[i].i] = tb;
        }
        for (int i = a; i < n; i++) {
            ab[t[i].i] = ta;
        }
        for (int i = 0; i < n; i++) {
            out.print(ab[i] + " ");
        }
    }

    class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() throws Exception {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws Exception {
            while ((st == null) || (!st.hasMoreTokens())) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

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

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

        boolean nextBoolean() throws Exception {
            return Boolean.parseBoolean(next());
        }

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

}


import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.*;

public class C {

    MyScanner in;
    PrintWriter out;

    public static void main(String[] args) throws Exception {
        new C().run();
    }

    public void run() throws Exception {
        in = new MyScanner();
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class Pair implements Comparable<Pair> {
        int x, i;

        public Pair (int x, int i) {
            this.x = x;
            this.i = i;
        }

        public int compareTo(Pair o) {
            if (x != o.x) {
                return x - o.x;
            }
            return i - o.i;
        }

    }
    public void solve() throws Exception {
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        int[] p = new int[n];
        int[] ab = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }
        if (a == b) {
            for (int i = 0; i < a; i++) {
                out.print("1 ");
            }
            for (int i = a; i < n; i++) {
                out.print("2 ");
            }
            return;
        }
        Pair[] t = new Pair[n];
        for (int i = 0; i < n; i++) {
            t[i] = new Pair(p[i], i);
        }
        Arrays.sort(t);
        if (a < b) {
            for (int i = 0; i < b; i++) {
                ab[t[i].i] = 2;
            }
            for (int i = b; i < n; i++) {
                ab[t[i].i] = 1;
            }
        } else {
            for (int i = 0; i < a; i++) {
                ab[t[i].i] = 1;
            }
            for (int i = a; i < n; i++) {
                ab[t[i].i] = 2;
            }
        }
        for (int i = 0; i < n; i++) {
            out.print(ab[i] + " ");
        }
    }

    class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() throws Exception {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws Exception {
            while ((st == null) || (!st.hasMoreTokens())) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

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

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

        boolean nextBoolean() throws Exception {
            return Boolean.parseBoolean(next());
        }

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

}


import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.*;

public class C {

    MyScanner in;
    PrintWriter out;

    public static void main(String[] args) throws Exception {
        new C().run();
    }

    public void run() throws Exception {
        in = new MyScanner();
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class Pair1 implements Comparable<Pair1> {
        int x, i;

        public Pair1 (int x, int i) {
            this.x = x;
            this.i = i;
        }

        public int compareTo(Pair1 o) {
            if (x != o.x) {
                return x - o.x;
            }
            return i - o.i;
        }

    }
    class Pair2 implements Comparable<Pair2> {
        int x, i;

        public Pair2 (int x, int i) {
            this.x = x;
            this.i = i;
        }

        public int compareTo(Pair2 o) {
            if (x != o.x) {
                return x - o.x;
            }
            return o.i - i;
        }

    }
    public void solve() throws Exception {
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        int[] p = new int[n];
        int[] ab = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }
        if (a == b) {
            for (int i = 0; i < a; i++) {
                out.print("1 ");
            }
            for (int i = a; i < n; i++) {
                out.print("2 ");
            }
            return;
        }
        if (a < b) {
            Pair2[] t = new Pair2[n];
            for (int i = 0; i < n; i++) {
                t[i] = new Pair2(p[i], i);
            }
            Arrays.sort(t);
            for (int i = 0; i < b; i++) {
                ab[t[i].i] = 2;
            }
            for (int i = b; i < n; i++) {
                ab[t[i].i] = 1;
            }
        } else {
            Pair1[] t = new Pair1[n];
            for (int i = 0; i < n; i++) {
                t[i] = new Pair1(p[i], i);
            }
            Arrays.sort(t);
            for (int i = 0; i < a; i++) {
                ab[t[i].i] = 1;
            }
            for (int i = a; i < n; i++) {
                ab[t[i].i] = 2;
            }
        }
        for (int i = 0; i < n; i++) {
            out.print(ab[i] + " ");
        }
    }

    class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() throws Exception {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws Exception {
            while ((st == null) || (!st.hasMoreTokens())) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

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

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

        boolean nextBoolean() throws Exception {
            return Boolean.parseBoolean(next());
        }

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

}


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();
            }
        }
    }
}


import static java.lang.Math.*;
import java.util.*;
import java.io.*;

public class yandex_q1_C {

    public void solve() throws Exception {
        int n = nextInt();
        int[] p = new int[n];
        int[] cnt = new int[6];
        int a = nextInt(), b= nextInt();
        if (a==b) {
            print(1); a--;
            while (a-->0) print(" ",1);
            while (b-->0) print(" ",2);
            println();
            return;
        }
        int afree=a, bfree=b;
        for (int i=0; i<n; i++) {
            int z = nextInt();
            p[i] = z;
            cnt[z]++;
        }

        int[] az = new int[6];
        int[] bz = new int[6];
        if (a<b) {
            for (int i=5; i>0; i--) {
                az[i] = min(afree, cnt[i]); cnt[i]-=az[i]; afree-=az[i];
            }
            bz = cnt;
        } else {
            for (int i=5; i>0; i--) {
                bz[i] = min(bfree, cnt[i]); cnt[i]-=bz[i]; bfree-=bz[i];
            }
            az = cnt;
        }

        for (int i=0; i<n; i++) {
            if (i!=0) print(" ");
            if (az[p[i]]>0) {
                print(1);
                az[p[i]]--;
            } else {
                print(2);
            }
        }
        println();
    }

    ////////////////////////////////////////////////////////////////////////////

    double EPS = 1e-7;
    int INF = Integer.MAX_VALUE;
    long INFL = Long.MAX_VALUE;
    double INFD = Double.MAX_VALUE;

    int[] dx = {0,1,0,-1};
    int[] dy = {-1,0,1,0};
    int[] dx8 = {0,1,1,1,0,-1,-1,-1};
    int[] dy8 = {-1,-1,0,1,1,1,0,-1};
    int[] knightMovesX = {1,2,2,1,-1,-2,-2,-1};
    int[] knightMovesY = {-2,-1,1,2,2,1,-1,-2};

    class Point {
        int x,y;
        public Point(int xx, int yy) {
            x=xx; y=yy;
        }
        public double dist(Point p) {
            return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
        }
    }
    class PointL {
        long x,y;
        public PointL(long xx, long yy) {
            x=xx; y=yy;
        }
        public double dist(PointL p) {
            return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
        }
    }
    class PointD {
        double x,y;
        public PointD(double xx, double yy) {
            x=xx; y=yy;
        }
        public double dist(PointD p) {
            return sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
        }
    }
    double dist(int x, int y, int xx, int yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }
    double dist(long x, long y, long xx, long yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }
    double dist(double x, double y, double xx, double yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }

    @SuppressWarnings("serial")
    class IncMap extends HashMap<Object, Integer> {
        boolean add(Object key) {
            Integer i = get(key);
            if (i!=null) {
                put(key, i+1);
                return false;
            } else {
                put(key, 1);
                return true;
            }
        }
    }

    int min(int... nums) {
        int r = INF;
        for (int i: nums)
            if (i<r) r = i;
        return r;
    }
    int max(int... nums) {
        int r = -INF;
        for (int i: nums)
            if (i>r) r = i;
        return r;
    }
    long minL(long... nums) {
        long r = INFL;
        for (long i: nums)
            if (i<r) r = i;
        return r;
    }
    long maxL(long... nums) {
        long r = -INFL;
        for (long i: nums)
            if (i>r) r = i;
        return r;
    }

    int digitSum(long i) {
        i = abs(i);
        int r = 0;
        while (i>0) {
            r+=i%10;
            i/=10;
        }
        return r;
    }
    long digitProd(long i) {
        if (i==0) return 0;
        i = abs(i);
        long r = 1;
        while (i>0) {
            r*=i%10;
            i/=10;
        }
        return r;
    }

    double log2(long i) {
        return log(i)/log(2);
    }
    double log2(double i) {
        return log(i)/log(2);
    }
    long binpow(int x, int n) {
        long r = 1;
        while (n>0) {
            if ((n&1)!=0) r*=x;
            x*=x;
            n>>=1;
        }
        return r;
    }

    int[] months = {0,31,28,31,30,31,30,31,31,30,31,30,31};
    boolean isLeapYear(int y) {
        return y%4==0 && (y%400==0 || y%100!=0);
    }
    boolean isValidDate(int d, int m, int y) {
        if (isLeapYear(y) && m==2 && d==29) return true;
        return m>0 && m<=12 && d>0 && d<=months[d];
    }
    int[] nextDay(int d, int m, int y) {
        if (d>=months[m])
            if (m==2 && d==28 && isLeapYear(y)) d++;
            else {d=1; m++;}
        else
            d++;
        if (m==13) {d=1; m=1; y++;}
        return new int[] {d,m,y};
    }

    long timer = System.currentTimeMillis();
    void startTimer() {
        timer = System.currentTimeMillis();
    }
    void stopTimer() {
        System.err.println("time: "+(System.currentTimeMillis()-timer)/1000.0);
    }

    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

    String nextLine() throws IOException {
        return in.readLine();
    }
    String nextWord() throws IOException {
        StringBuilder sb = new StringBuilder();
        int c = 0;
        while (c<=' ') c=in.read();
        while (c>' ') {
            sb.append((char)c);
            c = in.read();
        }
        return sb.toString();
    }
    int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextWord());
    }
    long nextLong() throws NumberFormatException, IOException {
        return Long.parseLong(nextWord());
    }
    double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextWord());
    }

    void print(Object o) throws IOException {
        out.write(o.toString());
    }
    void println(Object o) throws IOException {
        out.write(o.toString());
        out.newLine();
    }
    void print(Object... o) throws IOException {
        if (o.length>0) out.write(o[0].toString());
        for (int i=1; i<o.length; i++)
            out.write(" "+o[i].toString());
    }
    void println(Object... o) throws IOException {
        print(o);
        out.newLine();
    }

    void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }

    public static void main(String[] args) throws Exception {
        Locale.setDefault(Locale.US);
        new yandex_q1_C().solve();
        out.flush();
        out.close(); in.close();
    }
}


import static java.lang.Math.*;
import java.util.*;
import java.io.*;

@SuppressWarnings("unused")
public class pokus {

    public void solve() throws Exception {
        int n = nextInt();
        int[] p = new int[n];
        int[] cnt = new int[6];
        int a = nextInt(), b= nextInt();
        if (a==b) {
            print(1); a--;
            while (a-->0) print(" ",1);
            while (b-->0) print(" ",2);
            println();
            return;
        }
        int afree=a, bfree=b;
        for (int i=0; i<n; i++) {
            int z = nextInt();
            p[i] = z;
            cnt[z]++;
        }

        int[] az = new int[6];
        int[] bz = new int[6];
        if (a<b) {
            for (int i=5; i>0; i--) {
                az[i] = min(afree, cnt[i]); cnt[i]-=az[i]; afree-=az[i];
            }
            bz = cnt;
        } else {
            for (int i=5; i>0; i--) {
                bz[i] = min(bfree, cnt[i]); cnt[i]-=bz[i]; bfree-=bz[i];
            }
            az = cnt;
        }

        for (int i=0; i<n; i++) {
            if (i!=0) print(" ");
            if (az[p[i]]>0) {
                print(1);
                az[p[i]]--;
            } else {
                print(2);
            }
        }
        println();
    }

    ////////////////////////////////////////////////////////////////////////////

    boolean showDebug = true;

    double EPS = 1e-7;
    int INF = Integer.MAX_VALUE;
    long INFL = Long.MAX_VALUE;
    double INFD = Double.MAX_VALUE;

    int absPos(int i) {
        return i<0 ? 0:i;
    }
    long absPos(long i) {
        return i<0 ? 0:i;
    }
    double absPos(double i) {
        return i<0 ? 0:i;
    }

    int min(int... nums) {
        int r = INF;
        for (int i: nums)
            if (i<r) r=i;
        return r;
    }
    int max(int... nums) {
        int r = -INF;
        for (int i: nums)
            if (i>r) r=i;
        return r;
    }
    long minL(long... nums) {
        long r = INFL;
        for (long i: nums)
            if (i<r) r=i;
        return r;
    }
    long maxL(long... nums) {
        long r = -INFL;
        for (long i: nums)
            if (i>r) r=i;
        return r;
    }
    double minD(double... nums) {
        double r = INFD;
        for (double i: nums)
            if (i<r) r=i;
        return r;
    }
    double maxD(double... nums) {
        double r = -INFD;
        for (double i: nums)
            if (i>r) r=i;
        return r;
    }
    long sumArr(int[] arr) {
        long res = 0;
        for (int i: arr)
            res+=i;
        return res;
    }
    long sumArr(long[] arr) {
        long res = 0;
        for (long i: arr)
            res+=i;
        return res;
    }
    double sumArr(double[] arr) {
        double res = 0;
        for (double i: arr)
            res+=i;
        return res;
    }

    long partsFitCnt(long partSize, long wholeSize) {
        return (partSize+wholeSize-1)/partSize;
    }

    boolean odd(long i) {
        return (i&1)==1;
    }

    long binpow(int x, int n) {
        long r = 1;
        while (n>0) {
            if ((n&1)!=0) r*=x;
            x*=x;
            n>>=1;
        }
        return r;
    }

    String str(Object o) {
        return o.toString();
    }

    long timer = System.currentTimeMillis();
    void startTimer() {
        timer = System.currentTimeMillis();
    }
    void stopTimer() {
        System.err.println("time: "+(System.currentTimeMillis()-timer)/1000.0);
    }

    class InputReader {
        byte[] buf = new byte[1<<16];
        int bufPos = 0, bufLim = -1;
        char read() throws IOException {
            if (bufPos>=bufLim) {
                bufLim = System.in.read(buf);
                bufPos = 0;
            }
            return (char)buf[bufPos++];
        }
    }

    InputReader in = new InputReader();
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out), 1<<16);

    char nextInput() throws IOException {
        return in.read();
    }
    char nextChar() throws IOException {
        char c = in.read();
        while (c<=' ') c=in.read();
        return c;
    }
    String nextWord() throws IOException {
        StringBuilder sb = new StringBuilder();
        char c = in.read();
        while (c<=' ') c=in.read();
        while (c>' ') {
            sb.append(c);
            c = in.read();
        }
        return new String(sb);
    }
    String nextLine() throws IOException {
        StringBuilder sb = new StringBuilder();
        char c = in.read();
        while (c<=' ') c=in.read();
        while (c!='\n' && c!='\r') {
            sb.append(c);
            c = in.read();
        }
        return new String(sb);
    }
    int nextInt() throws IOException {
        int r = 0;
        char c = nextChar();
        boolean neg = false;
        if (c=='-') neg=true;
        else r = c-48;
        c = nextInput();
        while (c>='0' && c<='9') {
            r*=10;
            r+=c-48;
            c=nextInput();
        }
        return neg ? -r:r;
    }
    long nextLong() throws IOException {
        long r = 0;
        char c = nextChar();
        boolean neg = false;
        if (c=='-') neg=true;
        else r = c-48;
        c = nextInput();
        while (c>='0' && c<='9') {
            r*=10L;
            r+=c-48L;
            c=nextInput();
        }
        return neg ? -r:r;
    }
    double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextWord());
    }
    int[] nextArr(int size) throws NumberFormatException, IOException {
        int[] arr = new int[size];
        for (int i=0; i<size; i++)
            arr[i] = nextInt();
        return arr;
    }
    long[] nextArrL(int size) throws NumberFormatException, IOException {
        long[] arr = new long[size];
        for (int i=0; i<size; i++)
            arr[i] = nextLong();
        return arr;
    }
    double[] nextArrD(int size) throws NumberFormatException, IOException {
        double[] arr = new double[size];
        for (int i=0; i<size; i++)
            arr[i] = nextDouble();
        return arr;
    }
    String[] nextArrS(int size) throws NumberFormatException, IOException {
        String[] arr = new String[size];
        for (int i=0; i<size; i++)
            arr[i] = nextWord();
        return arr;
    }
    char[] nextArrCh(int size) throws IOException {
        char[] arr = new char[size];
        for (int i=0; i<size; i++)
            arr[i] = nextChar();
        return arr;
    }
    char[][] nextArrCh(int rows, int columns) throws IOException {
        char[][] arr = new char[rows][columns];
        for (int i=0; i<rows; i++)
            for (int j=0; j<columns; j++)
                arr[i][j] = nextChar();
        return arr;
    }

    void print(Object o) throws IOException {
        out.write(o.toString());
    }
    void println(Object o) throws IOException {
        out.write(o.toString());
        out.newLine();
    }
    void print(Object... o) throws IOException {
        for (int i=0; i<o.length; i++) {
            if (i!=0) out.write(' ');
            out.write(o[i].toString());
        }
    }
    void println(Object... o) throws IOException {
        print(o);
        out.newLine();
    }
    void printn(Object o, int n) throws IOException {
        String s = o.toString();
        for (int i=0; i<n; i++) {
            out.write(s);
            if (i!=n-1) out.write(' ');
        }
    }
    void printnln(Object o, int n) throws IOException {
        printn(o, n);
        out.newLine();
    }
    void printArr(int[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Integer.toString(arr[i]));
        }
    }
    void printArr(long[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Long.toString(arr[i]));
        }
    }
    void printArr(double[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Double.toString(arr[i]));
        }
    }
    void printArr(String[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(arr[i]);
        }
    }
    void printArr(char[] arr) throws IOException {
        for (char c: arr) out.write(c);
    }
    void printlnArr(int[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(long[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(double[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(String[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(char[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }

    void debug(Object... o) {
        if (showDebug) System.err.println(Arrays.deepToString(o));
    }

    public static void main(String[] args) throws Exception {
        Locale.setDefault(Locale.US);
        new pokus().solve();
        out.flush(); out.close();
    }
}


import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new Main().start();
	}

	int a, b, n;
	T[] v;
	int[] f;

	class T {

		int index;
		int value;

		public T(int i, int v) {
			index = i;
			value = v;
		}

		public T() {

		}

	}

	private void start() {
		Scanner in = new Scanner(System.in);

		n = in.nextInt();
		v = new T[n];
		a = in.nextInt();
		b = in.nextInt();
		f = new int[n];

		for (int i = 0; i < n; i++) {
			v[i] = new T(i, in.nextInt());
		}

		if (a == b) {
			for (int i = 0; i < a; i++) {
				System.out.print("1 ");
			}
			for (int i = 0; i < a; i++) {
				System.out.print("2 ");
			}
			return;
		}

		if (a <= b) {

			Arrays.sort(v, 0, v.length, new Comparator<T>() {
				@Override
				public int compare(T a, T b) {
					if (a.value != b.value) {
						return b.value - a.value;
					}
					return a.index - b.index;
				}
			});

			for (int i = 0; i < a; i++) {
				f[v[i].index] = 1;
			}
			for (int i = a; i < n; i++) {
				f[v[i].index] = 2;
			}
		} else {

			Arrays.sort(v, 0, v.length, new Comparator<T>() {
				@Override
				public int compare(T a, T b) {
					if (a.value != b.value) {
						return a.value - b.value;
					}
					return a.index - b.index;
				}
			});

			for (int i = 0; i < a; i++) {
				f[v[i].index] = 1;
			}
			for (int i = a; i < n; i++) {
				f[v[i].index] = 2;
			}
		}
		for (int i = 0; i < n; i++) {
			System.out.print(f[i] + " ");
		}
	}

}


import java.io.*;
import java.util.*;
public class Main
{
     static boolean marked[];
    public static void main(String[] args)
    {
        try
        {
            Parserdoubt pd=new Parserdoubt(System.in);
                PrintWriter pw=new PrintWriter(System.out);
                int n=pd.nextInt();
                int count1=pd.nextInt();
                int count2=pd.nextInt();
                Number nums[]=new Number[n];
                for(int i=0;i<nums.length;i++)
                    nums[i]=new Number(pd.nextInt(),i);
                if(count2<count1)Number.use=-1;
                Arrays.sort(nums);
                int print[]=new int[n];
                if(count1>count2)
                {
                    Arrays.fill(print,1);
                    for(int i=0;i<count2;i++)
                        print[nums[i].index]=2;
                }
                else if(count2>count1)
                {
                    Arrays.fill(print,2);
                    for(int i=0;i<count1;i++)
                        print[nums[i].index]=1;
                }
                else
                {
                    Arrays.fill(print,2);
                    for(int i=0;i<count1;i++)
                        print[i]=1;
                }
                for(int i=0;i<print.length;i++)
                    pw.print(print[i]+" ");

                pw.flush();

          }
        catch(Exception e)
        {
          e.printStackTrace();
          }

    }
    }

class Parserdoubt
    {
       final private int BUFFER_SIZE = 1 << 17;

       private DataInputStream din;
       private byte[] buffer;
       private int bufferPointer, bytesRead;

       public Parserdoubt(InputStream in)
       {
          din = new DataInputStream(in);
          buffer = new byte[BUFFER_SIZE];
          bufferPointer = bytesRead = 0;
       }
       public String nextString() throws Exception
       {
           StringBuffer sb=new StringBuffer("");
           byte c = read();
           while (c <= ' ') c = read();
           do
           {
               sb.append((char)c);
               c=read();
           }while(c>' ');
           return sb.toString();
       }
       public char nextChar() throws Exception
       {
           byte c=read();
           while(c<=' ') c= read();
           return (char)c;
       }
       public int nextInt() throws Exception
       {
          int ret = 0;
          byte c = read();
          while (c <= ' ') c = read();
          boolean neg = c == '-';
          if (neg) c = read();
          do
          {
              ret = ret * 10 + c - '0';
             c = read();
          } while (c > ' ');
          if (neg) return -ret;
          return ret;
       }
       public long nextLong() throws Exception
       {
          long ret = 0;
          byte c = read();
          while (c <= ' ') c = read();
          boolean neg = c == '-';
          if (neg) c = read();
          do
          {
              ret = ret * 10 + c - '0';
             c = read();
          } while (c > ' ');
          if (neg) return -ret;
          return ret;
       }
       private void fillBuffer() throws Exception
       {
          bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
          if (bytesRead == -1) buffer[0] = -1;
       }

       private byte read() throws Exception
       {
          if (bufferPointer == bytesRead) fillBuffer();
          return buffer[bufferPointer++];
       }
    }
class Number implements Comparable<Number>
{
    int index;
    int value;
    static int use=1;
    public Number(int val,int ind)
    {

        value=val;
        index=ind;
    }
    public int compareTo(Number n)
    {
        if(n.value>value)
            return 1;
        if(n.value<value)
            return -1;
        if(n.index<index)
            return 1*use;
        return -1*use;
    }
}


import java.io.*;
import java.util.*;

public class AverageScore
{
	TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
	public AverageScore() throws Exception
	{
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		int N = sc.nextInt(), A = sc.nextInt(), B = sc.nextInt();
		int[] s = new int[N], t = new int[N];
		for(int i = 0; i < N; i++)
			s[i] = t[i] = sc.nextInt();
		Arrays.sort(s);

		if(A == B)
		{
			for(int i = 0; i < N; i++)
				if(i < A) out.print("1 ");
				else out.print("2 ");
			out.println();
		}
		else
		{
			int inc = 1, start = 0;
			if(B > A)
			{
				inc = -1;
				start = N-1;
			}

			for(int k = 0, i = start; k < A; k++, i += inc)
				add(s[i]);

			for(int i = 0; i < N; i++)
				if(rem(t[i])) out.print("1 ");
				else out.print("2 ");
		}
		out.close();
	}

	boolean rem(int elem)
	{
		if(map.containsKey(elem))
		{
			int cnt = map.get(elem);
			if(cnt == 0) return false;
			map.put(elem, cnt-1);
			return true;
		}
		return false;
	}
	void add(int elem)
	{
		if(!map.containsKey(elem))
			map.put(elem, 0);
		map.put(elem, map.get(elem)+1);
	}

	public static void main(String[] args) throws Exception
	{
		new AverageScore();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {

    static BufferedReader in;
    static StringTokenizer st;

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static class sort_1 implements Comparable<sort_1> {

        int value;
        int id;

        public sort_1(int value, int id) {
            this.value = value;
            this.id = id;
        }

        public int compareTo(sort_1 that) {
            if (this.value > that.value
                    || (this.value == that.value && this.id > that.id)) {
                return 1;
            }
            return 0;
        }

    }

    static class sort_2 implements Comparable<sort_2> {

        int value;
        int id;

        public sort_2(int value, int id) {
            this.value = value;
            this.id = id;
        }

        public int compareTo(sort_2 that) {
            if (this.value > that.value
                    || (this.value == that.value && this.id < that.id)) {
                return 1;
            }
            return 0;
        }

    }

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new BufferedWriter(
                new OutputStreamWriter(System.out)));
        int n = nextInt();
        int a = nextInt();
        int b = nextInt();
        sort_1[] scores_1 = new sort_1[n];
        sort_2[] scores_2 = new sort_2[n];
        for (int i = 0; i < n; i++) {
            scores_1[i] = new sort_1(nextInt(), i);
            scores_2[i] = new sort_2(scores_1[i].value, i);
        }
        int[] ans = new int[n];
        if (a == b) {
            for (int i = 0; i < a; i++) {
                out.print(1 + " ");
            }
            for (int i = a; i < n; i++) {
                out.print(2 + " ");
            }
            out.close();
            return;
        } else if (a > b) {
            Arrays.sort(scores_1);
            for (int i = 0; i < a; i++) {
                ans[scores_1[i].id] = 1;
            }
            for (int i = a; i < n; i++) {
                ans[scores_1[i].id] = 2;
            }
            for (int i = 0; i < n; i++) {
                out.print(ans[i] + " ");
            }
            out.close();
            return;
        } else {
            Arrays.sort(scores_2);
            for (int i = 0; i < a; i++) {
                ans[scores_2[n - i - 1].id] = 1;
            }
            for (int i = a; i < n; i++) {
                ans[scores_2[n - i - 1].id] = 2;
            }
            for (int i = 0; i < n; i++) {
                out.print(ans[i] + " ");
            }
            out.close();
            return;
        }
    }

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C {

    static BufferedReader in;
    static StringTokenizer st;

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static class sort implements Comparable<sort> {

        int value;
        int id;

        public sort(int value, int id) {
            this.value = value;
            this.id = id;
        }

        public int compareTo(sort that) {
            if (this.value > that.value
                    || (this.value == that.value && this.id > that.id)) {
                return 1;
            }
            return 0;
        }

    }

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new BufferedWriter(
                new OutputStreamWriter(System.out)));
        int n = nextInt();
        int a = nextInt();
        int b = nextInt();
        sort[] scores = new sort[n];
        for (int i = 0; i < n; i++) {
            scores[i] = new sort(nextInt(), i);

        }
        int[] ans = new int[n];
        Arrays.sort(scores);
        if (a == b) {
            for (int i = 0; i < a; i++) {
                out.print(1 + " ");
            }
            for (int i = a; i < n; i++) {
                out.print(2 + " ");
            }
            out.close();
            return;
        } else if (a > b) {
            for (int i = 0; i < a; i++) {
                ans[scores[i].id] = 1;
            }
            for (int i = a; i < n; i++) {
                ans[scores[i].id] = 2;
            }
            for (int i = 0; i < n; i++) {
                out.print(ans[i] + " ");
            }
            out.close();
            return;
        } else {
            for (int i = 0; i < a; i++) {
                ans[scores[n - i - 1].id] = 1;
            }
            for (int i = a; i < n; i++) {
                ans[scores[n - i - 1].id] = 2;
            }
            for (int i = 0; i < n; i++) {
                out.print(ans[i] + " ");
            }
            out.close();
            return;
        }
    }

}


import java.io.*;
import java.util.*;

public class Main implements Runnable {

	class Pair {
		int val, pos;
		Pair(int val, int pos) {
			this.val = val;
			this.pos = pos;
		}
	}

	public void _main() throws IOException {
		int n = nextInt();
		int a = nextInt();
		int b = nextInt();
		int[] t = new int[n];
		int sum = 0;
		Pair[] p = new Pair[n];
		for (int i = 0; i < n; i++) {
			t[i] = nextInt();
			p[i] = new Pair(t[i], i);
		}
		int[] res = new int[n];
		if (a > b) {
			Arrays.sort(p, new Comparator<Pair>() {
				public int compare(Pair a, Pair b) {
					if (a.val != b.val)
						return b.val - a.val;
					return b.pos - a.pos;
				}
			});
			Arrays.fill(res, 1);
			int idx = 0;
			for (int i = 0; i < b; i++)
				res[p[idx++].pos] = 2;
		}
		else if (a < b) {
			Arrays.sort(p, new Comparator<Pair>() {
				public int compare(Pair a, Pair b) {
					if (a.val != b.val)
						return b.val - a.val;
					return a.pos - b.pos;
				}
			});
			Arrays.fill(res, 2);
			int idx = 0;
			for (int i = 0; i < a; i++)
				res[p[idx++].pos] = 1;
		}
		else {
			Arrays.fill(res, 2);
			for (int i = 0; i < a; i++)
				res[i] = 1;
		}
		for (int i = 0; i < n; i++)
			out.print(res[i] + " ");
	}

	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;

	private String next() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String rl = in.readLine();
			if (rl == null)
				return null;
			st = new StringTokenizer(rl);
		}
		return st.nextToken();
	}

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

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

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

	public static void main(String[] args) {
		Locale.setDefault(Locale.UK);
		new Thread(new Main()).start();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			_main();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(202);
		}
	}

}


import java.io.*;
import java.util.*;

public class SolC implements Runnable {
	public static void main(String[] args) {
		new Thread(new SolC()).start();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	boolean eof;

	@Override
	public void run() {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		try {
			solve();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		out.close();
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

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

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

	void solve() throws IOException {
		int n = nextInt();
		int a = nextInt();
		int b = nextInt();
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			t[i] = nextInt();
		}
		if (a == b) {
			for (int i = 0; i < a; i++) {
				out.print("1 ");
			}
			for (int i = 0; i < b; i++) {
				out.print("2 ");
			}
			return;
		}
		int[] ans = new int[n];
		if (a < b) {
			Arrays.fill(ans, 2);
			int c = 0;
			for (int v = 5; v > 0; v--) {
				for (int i = 0; i < n; i++) {
					if (t[i] == v && c < a) {
						ans[i] = 1;
						c++;
					}
				}
			}
		} else {
			Arrays.fill(ans, 1);
			int c = 0;
			for (int v = 5; v > 0; v--) {
				for (int i = n - 1; i >= 0; i--) {
					if (t[i] == v && c < b) {
						ans[i] = 2;
						c++;
					}
				}
			}
		}
		for (int i = 0; i < n; i++) {
			out.print(ans[i] + " ");
		}
	}
}


import java.io.*;
import java.util.Scanner;

public class Main{

     static void process(InputStream is, OutputStream os) {
        Scanner sc = new Scanner(is);
        int nT = sc.nextInt();
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();

        int[][] p = new int[5][nT];
        int[] u = new int[5];
        int[] s = new int[nT];

        for (int i = 0; i < nT; i++) {
            int mark = sc.nextInt() - 1;
            p[mark][u[mark]++] = i;
        }

        String m1 = null;
        String m2 = null;

        if(n1 == n2) {
            m1 = "2";
            m2 = "1";
            for(int i = 0; i < n1; i++) {
                s[i] = 1;
            }
        } else if (n2 < n1) {
            int grab = n2;
            m1 = "1";
            m2 = "2";
            while (grab > 0) {
                if (u[4] > 0) {
                    s[p[4][--u[4]]] = 1;
                } else if (u[3] > 0) {
                    s[p[3][--u[3]]] = 1;
                } else if (u[2] > 0) {
                    s[p[2][--u[2]]] = 1;
                } else if (u[1] > 0) {
                    s[p[1][--u[1]]] = 1;
                } else {
                    s[p[0][--u[0]]] = 1;
                }
                grab--;
            }
        } else {
            int grab = n1;
            m1 = "2";
            m2 = "1";
            int[] b = new int[5];
            while (grab > 0) {
                if (b[4] < u[4]) {
                    s[p[4][b[4]++]] = 1;
                } else if (b[3] < u[3]) {
                    s[p[3][b[3]++]] = 1;
                } else if (b[2] < u[2]) {
                    s[p[2][b[2]++]] = 1;
                } else if (b[1] < u[1]) {
                    s[p[1][b[1]++]] = 1;
                } else {
                    s[p[0][b[0]++]] = 1;
                }
                grab--;
            }
        }

        PrintWriter pw = new PrintWriter(os);
        for (int i = 0; i < nT; i++) {
            if (i > 0) pw.write(" ");
            pw.write(s[i] == 0 ? m1 : m2);
        }
        pw.flush();
    }

    public static void main(String[] arg) {
        process(System.in, System.out);
    }

}


import java.io.*;
import java.util.*;

public class Main
{
   public static void main(String[] args) throws IOException
   {
      new Main().run();
   }

   StreamTokenizer in;
   PrintWriter out;

   String nextString() throws IOException
   {
      in.nextToken();
      return (String)in.sval;
   }

   int nextInt() throws IOException
   {
      in.nextToken();
      return (int)in.nval;
   }

   void run() throws IOException
   {
      in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
      out = new PrintWriter(new OutputStreamWriter(System.out));
      solve();
      out.flush();
   }

   void solve() throws IOException
   {
    int n = nextInt();
    int x = nextInt();
    int y = nextInt();
    int[] mas = new int[n];
    int[] mas1 = new int[n];
    for (int i=0; i<n; i++){
        mas[i] = nextInt();
        mas1[i] = mas[i];
        }
    Arrays.sort(mas1);
    if (x>y){
    int c = mas1[x-1];
    int k = 0;
        for (int i=0; i<x; i++){
        if (mas1[i] == c){
        k++;
        }
        }
    int m = 0;
        for (int i = 0; i<n; i++){
        if (mas[i]<=c){
            if (mas[i]<c){
            out.print(1+" ");
            } else {
            if (m<k){
            out.print(1+" ");
            } else {
            out.print(2+" ");
            }
            m++;
            }
        } else {
        out.print(2+" ");
        }
        }
        } else {
            if (y>x){
            int[] otv = new int[n];
            int c = mas1[y-1];
            int k = 0;
            for (int i=0; i<y; i++){
                if (mas1[i] == c){
                k++;
                }
            }
            int m = 0;
            for (int i = n-1; i>=0; i--){
                if (mas[i]<=c){
                if (mas[i]<c){
                otv[i] = 2;
                } else {
                if (m<k){
                otv[i] = 2;
                } else {
                otv[i] = 1;
                }
                m++;
                }
                } else {
                otv[i] = 1;
                }
             }
             for (int i=0; i<n; i++){
                  out.print(otv[i]+" ");
             }
             } else {
             for (int i=0; i<x; i++){
             out.print(1+" ");
             }
             for (int i=0; i<x; i++){
             out.print(2+" ");
             }
             }
        }
   }
}


//package yandex;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class C {
	Scanner in;
	PrintWriter out;
	String INPUT = "";

	// \sum t_a/a+\sum t_b/b
	void solve()
	{
		int n = ni();
		int a = ni();
		int b = ni();
		Datum[] d = new Datum[n];
		for(int i = 0;i < n;i++){
			d[i] = new Datum(ni(), i);
		}
		int[] ar = new int[n];
		if(a == b){
			for(int i = 0;i < n;i++){
				ar[i] = i < a ? 1 : 2;
			}
		}else if(a < b){
			Arrays.sort(d, new Comparator<Datum>(){
				public int compare(Datum x, Datum y){
					if(x.mark - y.mark != 0)return -(x.mark - y.mark);
					return x.ind - y.ind;
				}
			});
			Arrays.fill(ar, 2);
			for(int i = 0;i < a;i++){
				ar[d[i].ind] = 1;
			}
		}else{
			Arrays.sort(d, new Comparator<Datum>(){
				public int compare(Datum x, Datum y){
					if(x.mark - y.mark != 0)return -(x.mark - y.mark);
					return -(x.ind - y.ind);
				}
			});
			Arrays.fill(ar, 1);
			for(int i = 0;i < b;i++){
				ar[d[i].ind] = 2;
			}
		}
		for(int i = 0;i < n;i++){
			out.print(ar[i] + " ");
		}
		out.println();

	}

	static class Datum {
		public int mark;
		public int ind;

		public Datum(int a, int b) {
			this.mark = a;
			this.ind = b;
		}

		public String toString() {
			return "(" + mark + "," + ind + ")";
		}
	}

	void run() throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		solve();
		out.flush();
	}

	public static void main(String[] args) throws Exception
	{
		new C().run();
	}

	int ni() { return Integer.parseInt(in.next()); }
	double nd() { return Double.parseDouble(in.next()); }
	void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}


import java.util.*;
public class P081C {
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int A = in.nextInt();
        int B = in.nextInt();

        int[] val = new int[N];
        int[] sval = new int[N];
        for (int n = 0; n < N; ++n)
            val[n] = sval[n] = in.nextInt();

        Arrays.sort(sval);
        boolean[] assign = new boolean[N];

        if (A == B)
        {
            for (int a = 0; a < A; ++a)
                assign[a] = true;
        }
        else if (A > B)
        {
            int midval = sval[A-1];
            int midcount = 0;
            for (int i = A-1; i >= 0 && sval[i] == midval; --i, ++midcount);

            for (int n = 0; n < N; ++n)
            {
                assign[n] = (val[n] < midval);
                if (val[n] == midval && midcount > 0) { assign[n] = true; --midcount; }
            }
        }
        else
        {
            int midval = sval[B-1];
            int midcount = 0;
            for (int i = B-1; i >= 0 && sval[i] == midval; --i, ++midcount);

            for (int n = 0; n < N; ++n)
            {
                assign[n] = !(val[n] < midval);
                if (val[n] == midval && midcount > 0) { assign[n] = false; --midcount; }
            }
        }

        for (int n = 0; n < N; ++n)
            System.out.print(assign[n] ? "1 " : "2 ");
        System.out.println();
    }
}


import java.util.*;
public class P081C {
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int A = in.nextInt();
        int B = in.nextInt();

        int[] val = new int[N];
        int[] sval = new int[N];
        for (int n = 0; n < N; ++n)
            val[n] = sval[n] = in.nextInt();

        Arrays.sort(sval);
        boolean[] assign = new boolean[N];

        if (A == B)
        {
            for (int a = 0; a < A; ++a)
                assign[a] = true;
        }
        else if (A > B)
        {
            int midval = sval[A-1];
            int midcount = 0;
            for (int i = A-1; i >= 0 && sval[i] == midval; --i, ++midcount);

            for (int n = 0; n < N; ++n)
            {
                assign[n] = (val[n] < midval);
                if (val[n] == midval && midcount > 0) { assign[n] = true; --midcount; }
            }
        }
        else
        {
            int midval = sval[B-1];
            int midcount = 0;
            for (int i = B-1; i >= 0 && sval[i] == midval; --i, ++midcount);

            for (int n = N-1; n >= 0; --n)
            {
                assign[n] = !(val[n] < midval);
                if (val[n] == midval && midcount > 0) { assign[n] = false; --midcount; }
            }
        }

        for (int n = 0; n < N; ++n)
            System.out.print(assign[n] ? "1 " : "2 ");
        System.out.println();
    }
}
/*

6
5 1
4 4 4 5 4 4

*/


import java.io.*;
import java.util.*;

public class CodeForce {
    /*
    private void solve() throws IOException {
        int n = nextInt(), k = nextInt();
        int []arr = new int[n];
        int sum = 0;
        for(int i = 0; i < n; i++) {
            int u = nextInt();
            sum += u;
            arr[i] = u;
        }
        Arrays.sort(arr);
        double average = (double)sum / (double)n;
        int n_isum = 0, isum = 0, n_jsum = 0, jsum = 0;
        for(int i = 0; i < n && arr[i] <= average; i++)     { isum += arr[i]; n_isum++; }
        for(int j = n - 1; j >= 0 && arr[j] > average; j--) { jsum += arr[j]; n_jsum++; }
        double a = (double)isum / (double)n_isum;
        double b = (n_jsum == 0) ? a : (double)jsum / (double)n_jsum;
        double m = (double)jsum;
        double ua = 0.0, ub = m;
        while(Math.abs(a - b) > 10.e-9) {
            double kk = m * ((100.0 - k) / 100.0);
            a = (double)(isum + kk) / (double)n_isum;
            b = (double)(jsum - m)  / (double)n_jsum;
            if(a < b) {
                ua = m;
            } else {
                ub = m;
            }
            m = ua + (ub - ua) / 2.0;
        }
        System.out.println(a);
    }
    */

    private void solve() throws IOException {
        final int n = nextInt(), a = nextInt(), b = nextInt();
        int [][]arr = new int[n][2];
        int []c = new int[n];
        for(int i = 0; i < n; i++) {
            int u = nextInt();
            arr[i] = new int[2];
            arr[i][0] = u;
            arr[i][1] = i;
        }
        Arrays.sort(arr, new Comparator<int []>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                int x = o2[0] - o1[0];
                if(a == b) return o2[1] - o1[1];
                if(x != 0) return x;
                if(a > b) {
                    return o2[1] - o1[1];
                } else  {
                    return o1[1] - o2[1];
                }
            }
        });
        int s = (a >= b) ? 2 : 1;
        int u = (a >= b) ? b : a;
        for(int i = 0; i < u; i++)
            c[arr[i][1]] = s;
        s = s == 1 ? 2 : 1;
        int m = u == b ? a : b;
        for(int i = u; i < u + m; i++)
            c[arr[i][1]] = s;
        for(int i = 0; i < c.length; i++)
            System.out.print(c[i] + " ");
    }

    /*
    private static boolean can(int h, int w, int l, int []arr) {
        int area = h * w;
        for(int i = 0; i < arr.length; i++) {
            if(arr[i] < l) continue;
            else if(arr[i] >= w) {
                int d = arr[i] / w;
                area -= (d * w);
            } else if(w - arr[i] >= l) {
                area -= arr[i];
            }
        }
        return area <= 0;
    }

    private void solve() throws IOException {
        int n = nextInt(), l = nextInt();
        int []arr = new int[n];
        int m = Integer.MIN_VALUE;
        for(int i = 0; i < n; i++) {
            int u = nextInt();
            arr[i] = u;
            if(u > m) m = u;
        }

        int max = 0;
        for(int h = 1; h <= n; h++)
            for(int w = 1; w <= Math.max(n, m); w++)
                if(can(h, w, l, arr) && h * w > max)
                    max = h * w;
        System.out.println(max);
    }

    /*
    private void solve() throws IOException {
        int n = nextInt();
        boolean []arr = new boolean[n];
        for(int i = 0; i < n; i++) {
            int u = nextInt();
            if(u == 1) arr[i] = true;
        }
        boolean ret = false;
        out:
        for(int i = 0; i <= n / 3; i++) {
            if(arr[i]) {
                for(int k = 1; k <= n / 3; k++) {
                    int j = k;
                    while(true) {
                        int u = (i + j) % n;
                        if(!arr[u]) break;
                        if(i + j >= n) {
                            if(arr[u])
                                ret = true;
                            break out;
                        }
                        j += k;
                    }
                }
            }
        }
        if(ret) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
    */

    public static void main(String[] args) {
        new CodeForce().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    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 {
        return reader.readLine();
    }

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


import java.util.Arrays;
import java.util.Scanner;

public class C
{

	public static void main(String[] args)
	{
		new C();
	}

	int N;
	pair[] T;
	int A,B;

	C()
	{
		Scanner in=new Scanner(System.in);
		N=in.nextInt();
		T=new pair[N];
		A=in.nextInt();
		B=in.nextInt();
		for (int i=0; i<N; ++i)
			T[i]=new pair(in.nextInt(),i);

		if (A>B)
			pair.CMP=0;
		else if (B>A)
			pair.CMP=1;
		else
			pair.CMP=2;
		Arrays.sort(T);

		int[] S=new int[N];
		for (int i=0; i<A; ++i)
			S[T[i].y]=1;
		for (int i=A; i<N; ++i)
			S[T[i].y]=2;

		for (int i=0; i<N; ++i)
			System.out.print(S[i]+" ");
		System.out.println();
	}

}

class pair implements Comparable<pair>
{
	static int CMP;
	int x,y;
	pair(int x, int y)
	{
		this.x=x;
		this.y=y;
	}

	public int compareTo(pair o)
	{
		if (CMP==0)
			return x-o.x;
		else if (CMP==1)
			return o.x-x;
		return 0;
	}
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main implements Runnable {
	public void solution() throws IOException {
		int n = in.nextInt();
		long a = in.nextInt();
		long b = in.nextInt();
		int[] mark = new int[n];
		for (int i = 0; i < n; ++i) {
			mark[i] = in.nextInt();
		}
		int[][] am = new int[n + 1][6];
		for (int i = n - 1; i >= 0; --i) {
			am[i] = am[i + 1].clone();
			am[i][mark[i]] += 1;
		}
		int[] res = new int[n];
		long bestScore;
		{
			long min = Math.min(a, b);
			long max = Math.max(a, b);
			bestScore = getMaxSum(am[0], min) * max + (getMaxSum(am[0], n) - getMaxSum(am[0], min)) * min;
		}
		int haveA = 0;
		int haveB = 0;
		for (int i = 0; i < n; ++i) {
			if (haveA == a) {
				res[i] = 2;
				bestScore -= a * mark[i];
				++haveB;
			} else if (haveB == b) {
				res[i] = 1;
				bestScore -= b * mark[i];
				++haveA;
			} else {
				long canBe = mark[i] * b;
				if (a <= b) {
					canBe += getMaxSum(am[i + 1], a - (haveA + 1)) * b + (getMaxSum(am[i + 1], n - i - 1) - getMaxSum(am[i + 1], a - (haveA + 1))) * a;
				} else {
					canBe += getMaxSum(am[i + 1], b - haveB) * a + (getMaxSum(am[i + 1], n - i - 1) - getMaxSum(am[i + 1], b - haveB)) * b;
				}
				if (canBe == bestScore) {
					res[i] = 1;
					bestScore -= b * mark[i];
					++haveA;
				} else {
					res[i] = 2;
					bestScore -= a * mark[i];
					++haveB;
				}
			}
		}
		for (int i = 0; i < res.length; ++i) {
			if (i > 0) {
				out.print(' ');
			}
			out.print(res[i]);
		}
		out.println();
	}

	private long getMaxSum(int[] am, long count) {
		int sum = 0;
		for (int i = am.length - 1; i >= 0; --i) {
			long min = Math.min(count, am[i]);
			count -= min;
			sum += min * i;
		}
		return sum;
	}

	public void run() {
		try {
			// String fileName = "";
			// try {
			// in = new Scanner(new FileReader(fileName + ".in"));
			// out = new PrintWriter(fileName + ".out");
			// } catch (Exception e) {
			// }
			solution();
			in.reader.close();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public static void main(String[] args) {
		new Thread(null, new Main(), "", 1 << 28).start();
	}

	private static class Scanner {
		BufferedReader reader;
		StringTokenizer tokenizer;

		public Scanner(Reader reader) {
			this.reader = new BufferedReader(reader);
			this.tokenizer = new StringTokenizer("");
		}

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

		public boolean hasNext() throws IOException {
			while (!tokenizer.hasMoreTokens()) {
				String line = reader.readLine();
				if (line == null) {
					return false;
				}
				tokenizer = new StringTokenizer(line);
			}
			return true;
		}

		public String next() throws IOException {
			hasNext();
			return tokenizer.nextToken();
		}

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

		public String nextLine() throws IOException {
			tokenizer = new StringTokenizer("");
			return reader.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	}
	Scanner in = new Scanner(new InputStreamReader(System.in));
	PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
}


import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Solution81C {

        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
        BufferedReader in;
        PrintWriter out;
        StringTokenizer tok = new StringTokenizer("");

        void init() throws FileNotFoundException{
                if (ONLINE_JUDGE){
                        in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
                }else{
                        in = new BufferedReader(new FileReader("input.txt"));
                        out = new PrintWriter("output.txt");
                }
        }

        String readString() throws IOException{
                while(!tok.hasMoreTokens()){
                        tok = new StringTokenizer(in.readLine());
                }
                return tok.nextToken();
        }

        int readInt() throws IOException{
                return Integer.parseInt(readString());
        }

        long readLong() throws IOException{
                return Long.parseLong(readString());
        }

        double readDouble() throws IOException{
                return Double.parseDouble(readString());
        }

        public static void main(String[] args){
                new Solution81C().run();
        }

        public void run(){
                try{
                        long t1 = System.currentTimeMillis();
                        init();
                        solve();
                        out.close();
                        long t2 = System.currentTimeMillis();
                        System.err.println("Time = "+(t2-t1));
                }catch (Exception e){
                        e.printStackTrace(System.err);
                        System.exit(-1);
                }
        }

        static class Utils {

                private Utils() {}

                public static void mergeSort(int[] a) {
                        mergeSort(a, 0, a.length - 1);
                }

                private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
                        final int MAGIC_VALUE = 50;
                        if (leftIndex < rightIndex) {
                                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                                        insertionSort(a, leftIndex, rightIndex);
                                } else {
                                        int middleIndex = (leftIndex + rightIndex) / 2;
                                        mergeSort(a, leftIndex, middleIndex);
                                        mergeSort(a, middleIndex + 1, rightIndex);
                                        merge(a, leftIndex, middleIndex, rightIndex);
                                }
                        }
                }

                private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
                        int length1 = middleIndex - leftIndex + 1;
                        int length2 = rightIndex - middleIndex;
                        int[] leftArray = new int[length1];
                        int[] rightArray = new int[length2];
                        System.arraycopy(a, leftIndex, leftArray, 0, length1);
                        System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
                        for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                                if (i == length1) {
                                        a[k] = rightArray[j++];
                                } else if (j == length2) {
                                        a[k] = leftArray[i++];
                                } else {
                                        a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                                }
                        }
                }

                private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
                        for (int i = leftIndex + 1; i <= rightIndex; i++) {
                                int current = a[i];
                                int j = i - 1;
                                while (j >= leftIndex && a[j] > current) {
                                        a[j + 1] = a[j];
                                        j--;
                                }
                                a[j + 1] = current;
                        }
                }
        }

        class Ocenka implements Comparable<Ocenka>{

			@Override
			public int compareTo(Ocenka o) {
				if(x>o.x) return 1;
				if(x < o.x) return -1;
				if(ind > o.ind) return 1;
				if(ind < o.x) return -1;
				return 0;
			}
        	public int x,ind,a;

			public Ocenka(int x, int ind) {
				this.x = x;
				this.ind = ind;
			}
        }

        class Comp implements Comparator<Ocenka>{

			@Override
			public int compare(Ocenka o1, Ocenka o2) {
				if(o1.x>o2.x) return 1;
				if(o1.x < o2.x) return -1;
				if(o1.ind > o2.ind) return -1;
				if(o1.ind < o2.x) return 1;
				return 0;
			}

        }

        void solve() throws IOException{
        	int n = readInt();
        	int a = readInt();
        	int b = readInt();
        	Ocenka[] m = new Ocenka[n];
        	for(int i = 0; i < n; i++)
        		m[i] = new Ocenka(readInt(), i);
        	if(a == b){
        		for(int i = 0; i < n; i++){
        			if(i >= a) out.print("2 ");
        			else out.print(1+" ");
        		}
        		return;
        	}
        	Arrays.sort(m);
        	boolean reverse = false;
        	if(a < b){
        		a^=b;
        		b^=a;
        		a^=b;
        		reverse = true;
        	}
        	if(!reverse){
        		Arrays.sort(m);
        		for(int i = 0; i < n; i++){
        			if(i < a)
        				m[i].a = 1;
        			else m[i].a = 2;
        		}
        	}
        	else{
        		Arrays.sort(m, new Comp());
        		for(int i = 0; i < n; i++){
        			if(i < a)
        				m[i].a = 2;
        			else m[i].a = 1;
        		}
        	}
        	for(int i = 0; i < n; i++){
        		for(int j = 0; j < n; j++)
        			if(m[j].ind == i){
        				out.print(m[j].a + " ");
        				break;
        			}
        	}
        }

        static double distance(long x1, long y1, long x2, long y2){
        	return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        }

        static long gcd(long a, long b){
        	while(a != b){
        		if(a < b) a -=b;
        		else b -= a;
        	}
        	return a;
        }

        static long lcm(long a, long b){
        	return a * b /gcd(a, b);
        }
}


import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Solution81C {

        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
        BufferedReader in;
        PrintWriter out;
        StringTokenizer tok = new StringTokenizer("");

        void init() throws FileNotFoundException{
                if (ONLINE_JUDGE){
                        in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
                }else{
                        in = new BufferedReader(new FileReader("input.txt"));
                        out = new PrintWriter("output.txt");
                }
        }

        String readString() throws IOException{
                while(!tok.hasMoreTokens()){
                        tok = new StringTokenizer(in.readLine());
                }
                return tok.nextToken();
        }

        int readInt() throws IOException{
                return Integer.parseInt(readString());
        }

        long readLong() throws IOException{
                return Long.parseLong(readString());
        }

        double readDouble() throws IOException{
                return Double.parseDouble(readString());
        }

        public static void main(String[] args){
                new Solution81C().run();
        }

        public void run(){
                try{
                        long t1 = System.currentTimeMillis();
                        init();
                        solve();
                        out.close();
                        long t2 = System.currentTimeMillis();
                        System.err.println("Time = "+(t2-t1));
                }catch (Exception e){
                        e.printStackTrace(System.err);
                        System.exit(-1);
                }
        }

        static class Utils {

                private Utils() {}

                public static void mergeSort(int[] a) {
                        mergeSort(a, 0, a.length - 1);
                }

                private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
                        final int MAGIC_VALUE = 50;
                        if (leftIndex < rightIndex) {
                                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                                        insertionSort(a, leftIndex, rightIndex);
                                } else {
                                        int middleIndex = (leftIndex + rightIndex) / 2;
                                        mergeSort(a, leftIndex, middleIndex);
                                        mergeSort(a, middleIndex + 1, rightIndex);
                                        merge(a, leftIndex, middleIndex, rightIndex);
                                }
                        }
                }

                private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
                        int length1 = middleIndex - leftIndex + 1;
                        int length2 = rightIndex - middleIndex;
                        int[] leftArray = new int[length1];
                        int[] rightArray = new int[length2];
                        System.arraycopy(a, leftIndex, leftArray, 0, length1);
                        System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
                        for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                                if (i == length1) {
                                        a[k] = rightArray[j++];
                                } else if (j == length2) {
                                        a[k] = leftArray[i++];
                                } else {
                                        a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                                }
                        }
                }

                private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
                        for (int i = leftIndex + 1; i <= rightIndex; i++) {
                                int current = a[i];
                                int j = i - 1;
                                while (j >= leftIndex && a[j] > current) {
                                        a[j + 1] = a[j];
                                        j--;
                                }
                                a[j + 1] = current;
                        }
                }
        }

        class Ocenka implements Comparable<Ocenka>{

			@Override
			public int compareTo(Ocenka o) {
				if(x>o.x) return 1;
				if(x < o.x) return -1;
				if(ind > o.ind) return 1;
				if(ind < o.x) return -1;
				return 0;
			}
        	public int x,ind,a;

			public Ocenka(int x, int ind) {
				this.x = x;
				this.ind = ind;
			}
        }

        class Comp implements Comparator<Ocenka>{

			@Override
			public int compare(Ocenka o1, Ocenka o2) {
				if(o1.x < o2.x) return 1;
				if(o1.x > o2.x) return -1;
				if(o1.ind > o2.ind) return 1;
				if(o1.ind < o2.x) return -1;
				return 0;
			}

        }

        void solve() throws IOException{
        	int n = readInt();
        	int a = readInt();
        	int b = readInt();
        	Ocenka[] m = new Ocenka[n];
        	for(int i = 0; i < n; i++)
        		m[i] = new Ocenka(readInt(), i);
        	if(a == b){
        		for(int i = 0; i < n; i++){
        			if(i >= a) out.print("2 ");
        			else out.print(1+" ");
        		}
        		return;
        	}
        	boolean reverse = false;
        	if(a < b){
        		a^=b;
        		b^=a;
        		a^=b;
        		reverse = true;
        	}
        	int count = 0;
        	if(!reverse){
        		Arrays.sort(m);
        		for(int i = 0; i < n; i++){
        			if(i < a){
        				m[i].a = 1;
        				//count++;
        			}
        			else{
        				m[i].a = 2;
        				//count--;
        			}
        		}
        	}
        	else{
        		Arrays.sort(m, new Comp());
        		for(int i = 0; i < n; i++){
        			if(i < b){
        				m[i].a = 1;
        				count++;
        			}
        			else{
        				m[i].a = 2;
        				count--;
        			}
        		}
        	}
        	for(int i = 0; i < n; i++){
        		for(int j = 0; j < n; j++)
        			if(m[j].ind == i){
        				out.print(m[j].a + " ");
        				break;
        			}
        	}
        }

        static double distance(long x1, long y1, long x2, long y2){
        	return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        }

        static long gcd(long a, long b){
        	while(a != b){
        		if(a < b) a -=b;
        		else b -= a;
        	}
        	return a;
        }

        static long lcm(long a, long b){
        	return a * b /gcd(a, b);
        }
}


import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Solution81C {

        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
        BufferedReader in;
        PrintWriter out;
        StringTokenizer tok = new StringTokenizer("");

        void init() throws FileNotFoundException{
                if (ONLINE_JUDGE){
                        in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
                }else{
                        in = new BufferedReader(new FileReader("input.txt"));
                        out = new PrintWriter("output.txt");
                }
        }

        String readString() throws IOException{
                while(!tok.hasMoreTokens()){
                        tok = new StringTokenizer(in.readLine());
                }
                return tok.nextToken();
        }

        int readInt() throws IOException{
                return Integer.parseInt(readString());
        }

        long readLong() throws IOException{
                return Long.parseLong(readString());
        }

        double readDouble() throws IOException{
                return Double.parseDouble(readString());
        }

        public static void main(String[] args){
                new Solution81C().run();
        }

        public void run(){
                try{
                        long t1 = System.currentTimeMillis();
                        init();
                        solve();
                        out.close();
                        long t2 = System.currentTimeMillis();
                        System.err.println("Time = "+(t2-t1));
                }catch (Exception e){
                        e.printStackTrace(System.err);
                        System.exit(-1);
                }
        }

        static class Utils {

                private Utils() {}

                public static void mergeSort(int[] a) {
                        mergeSort(a, 0, a.length - 1);
                }

                private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
                        final int MAGIC_VALUE = 50;
                        if (leftIndex < rightIndex) {
                                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                                        insertionSort(a, leftIndex, rightIndex);
                                } else {
                                        int middleIndex = (leftIndex + rightIndex) / 2;
                                        mergeSort(a, leftIndex, middleIndex);
                                        mergeSort(a, middleIndex + 1, rightIndex);
                                        merge(a, leftIndex, middleIndex, rightIndex);
                                }
                        }
                }

                private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
                        int length1 = middleIndex - leftIndex + 1;
                        int length2 = rightIndex - middleIndex;
                        int[] leftArray = new int[length1];
                        int[] rightArray = new int[length2];
                        System.arraycopy(a, leftIndex, leftArray, 0, length1);
                        System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
                        for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                                if (i == length1) {
                                        a[k] = rightArray[j++];
                                } else if (j == length2) {
                                        a[k] = leftArray[i++];
                                } else {
                                        a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                                }
                        }
                }

                private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
                        for (int i = leftIndex + 1; i <= rightIndex; i++) {
                                int current = a[i];
                                int j = i - 1;
                                while (j >= leftIndex && a[j] > current) {
                                        a[j + 1] = a[j];
                                        j--;
                                }
                                a[j + 1] = current;
                        }
                }
        }

        class Ocenka implements Comparable<Ocenka>{

			@Override
			public int compareTo(Ocenka o) {
				if(x>o.x) return 1;
				if(x < o.x) return -1;
				if(ind > o.ind) return 1;
				if(ind < o.x) return -1;
				return 0;
			}
        	public int x,ind,a;

			public Ocenka(int x, int ind) {
				this.x = x;
				this.ind = ind;
			}
        }

        class Comp implements Comparator<Ocenka>{

			@Override
			public int compare(Ocenka o1, Ocenka o2) {
				if(o1.x < o2.x) return 1;
				if(o1.x > o2.x) return -1;
				if(o1.ind > o2.ind) return 1;
				if(o1.ind < o2.x) return -1;
				return 0;
			}

        }

        void solve() throws IOException{
        	int n = readInt();
        	int a = readInt();
        	int b = readInt();
        	Ocenka[] m = new Ocenka[n];
        	for(int i = 0; i < n; i++)
        		m[i] = new Ocenka(readInt(), i);
        	if(a == b){
        		for(int i = 0; i < n; i++){
        			if(i >= a) out.print("2 ");
        			else out.print(1+" ");
        		}
        		return;
        	}
        	boolean reverse = false;
        	if(a < b){
        		a^=b;
        		b^=a;
        		a^=b;
        		reverse = true;
        	}
        	int count = 0;
        	if(!reverse){
        		Arrays.sort(m);
        		for(int i = 0; i < n; i++){
        			if(i < a){
        				m[i].a = 1;
        				//count++;
        			}
        			else{
        				m[i].a = 2;
        				//count--;
        			}
        		}
        	}
        	else{
        		Arrays.sort(m, new Comp());
        		for(int i = 0; i < n; i++){
        			if(i < b){
        				m[i].a = 1;
        				count++;
        			}
        			else{
        				m[i].a = 2;
        				count--;
        			}
        		}
        	}
        	int[] res = new int[n];
        	for(int i = 0; i < n; i++){
        		res[m[i].ind] = m[i].a;
        	}
        	for(int i = 0; i < n; i++)
        		out.print(res[i]+" ");
        }

        static double distance(long x1, long y1, long x2, long y2){
        	return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        }

        static long gcd(long a, long b){
        	while(a != b){
        		if(a < b) a -=b;
        		else b -= a;
        	}
        	return a;
        }

        static long lcm(long a, long b){
        	return a * b /gcd(a, b);
        }
}


import java.io.*;
import java.util.*;

/**
 * Yandex Open 2011 Qualification 1, C
 * @author Roman Kosenko <madkite@gmail.com>
 */
public class C081C_AverageScore {
	public static void main(String... args) throws IOException {
		long time = 0;
		if(args.length != 0) {
			System.setIn(new FileInputStream(args[0]));
			time = System.currentTimeMillis();
		} else if(!Boolean.parseBoolean(System.getProperty("ONLINE_JUDGE"))) {
			main("in/C081C.1.txt");
			main("in/C081C.2.txt");
			main("in/C081C.3.txt");
			//main("input.txt");
			return;
		}
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] ss = br.readLine().split(" ");
		int a = Integer.parseInt(ss[0]), b = Integer.parseInt(ss[1]); assert a + b == n;
		if(a == b) {
			for(int i = 0; i < a; i++)
				System.out.print("1 ");
			for(int i = 1; i < b; i++)
				System.out.print("2 ");
			System.out.println("2");
			return;
		}
		ss = br.readLine().split(" "); assert ss.length == n;
		final int t[] = new int[n];
		for(int i = 0; i < n; i++)
			t[i] = Integer.parseInt(ss[i]);

		Integer p[] = new Integer[n];
		for(int i = 0; i < n; i++)
			p[i] = i;
		Arrays.sort(p, new Comparator<Integer>() {
			public int compare(Integer o1, Integer o2) {
				return t[o1] - t[o2];
			}
		});
		int max = Math.max(a, b), result[] = new int[n];
		for(int i = 0; i < max; i++)
			result[p[i]] = a < b ? 2 : 1;
		for(int i = max; i < n; i++)
			result[p[i]] = a < b ? 1 : 2;
		for(int i = 0; i < n; i++) {
			if(i != 0)
				System.out.print(' ');
			System.out.print(result[i]);
		}
		System.out.println();

		if(time != 0)
			System.out.println(System.currentTimeMillis() - time);
	}
}


import java.io.*;
import java.util.*;

/**
 * Yandex Open 2011 Qualification 1, C
 * @author Roman Kosenko <madkite@gmail.com>
 */
public class C081C_AverageScore {
	public static void main(String... args) throws IOException {
		long time = 0;
		if(args.length != 0) {
			System.setIn(new FileInputStream(args[0]));
			time = System.currentTimeMillis();
		} else if(!Boolean.parseBoolean(System.getProperty("ONLINE_JUDGE"))) {
			main("in/C081C.1.txt");
			main("in/C081C.2.txt");
			main("in/C081C.3.txt");
			//main("input.txt");
			return;
		}
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] ss = br.readLine().split(" ");
		final int a = Integer.parseInt(ss[0]), b = Integer.parseInt(ss[1]); assert a + b == n;
		if(a == b) {
			for(int i = 0; i < a; i++)
				System.out.print("1 ");
			for(int i = 1; i < b; i++)
				System.out.print("2 ");
			System.out.println("2");
			return;
		}
		ss = br.readLine().split(" "); assert ss.length == n;
		final int t[] = new int[n];
		for(int i = 0; i < n; i++)
			t[i] = Integer.parseInt(ss[i]);

		Integer p[] = new Integer[n];
		for(int i = 0; i < n; i++)
			p[i] = i;
		Arrays.sort(p, new Comparator<Integer>() {
			public int compare(Integer o1, Integer o2) {
				int result = t[o1] - t[o2];
				if(result != 0)
					return result;
				return b - a;
			}
		});
		int max = Math.max(a, b), result[] = new int[n];
		for(int i = 0; i < max; i++)
			result[p[i]] = a < b ? 2 : 1;
		for(int i = max; i < n; i++)
			result[p[i]] = a < b ? 1 : 2;
		for(int i = 0; i < n; i++) {
			if(i != 0)
				System.out.print(' ');
			System.out.print(result[i]);
		}
		System.out.println();

		if(time != 0)
			System.out.println(System.currentTimeMillis() - time);
	}
}


import java.util.*;

/**
 * Created by IntelliJ IDEA.
 * User: piyushd
 * Date: 3/18/11
 * Time: 9:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class TaskC {
    Integer[] t;

    void run(){
        int n = nextInt(), a = nextInt(), b = nextInt();
        t = new Integer[n];
        for(int i = 0; i < n; i++){
            t[i] = nextInt();
        }

        if(a == b){
            for(int i = 0; i < a; i++)
                System.out.print(1 + " ");
            for(int i = a; i < n; i++)
                System.out.print(2 + " ");
        }else{
            Integer[] nt = t.clone();
            Arrays.sort(nt);

            int[] one = new int[6];
            int[] two = new int[6];

            int[] small = (a > b) ? one : two;
            int[] large = (a > b) ? two : one;
            for(int i = 0; i < Math.max(a, b); i++){
                small[nt[i]]++;
            }
            for(int i = Math.max(a, b); i < n; i++){
                large[nt[i]]++;
            }

            for(int i = 0; i < n; i++)
                if(one[t[i]] > 0){
                    System.out.print(1 + " ");
                    one[t[i]]--;
                }else{
                    System.out.print(2 + " ");
                }
        }
        System.out.println();
    }

    int nextInt(){
        try{
            int c = System.in.read();
            if(c == -1) return c;
            while(c != '-' && (c < '0' || '9' < c)){
                c = System.in.read();
                if(c == -1) return c;
            }
            if(c == '-') return -nextInt();
            int res = 0;
            do{
                res *= 10;
                res += c - '0';
                c = System.in.read();
            }while('0' <= c && c <= '9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }

    long nextLong(){
        try{
            int c = System.in.read();
            if(c == -1) return -1;
            while(c != '-' && (c < '0' || '9' < c)){
                c = System.in.read();
                if(c == -1) return -1;
            }
            if(c == '-') return -nextLong();
            long res = 0;
            do{
                res *= 10;
                res += c-'0';
                c = System.in.read();
            }while('0' <= c && c <= '9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }

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

    String next(){
        try{
            StringBuilder res = new StringBuilder("");
            int c = System.in.read();
            while(Character.isWhitespace(c))
                c = System.in.read();
            do{
                res.append((char)c);
            }while(!Character.isWhitespace(c=System.in.read()));
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }

    String nextLine(){
        try{
            StringBuilder res = new StringBuilder("");
            int c = System.in.read();
            while(c == '\r' || c == '\n')
                c = System.in.read();
            do{
                res.append((char)c);
                c = System.in.read();
            }while(c != '\r' && c != '\n');
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }

    public static void main(String[] args){
        new TaskC().run();
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

/**
 * @author abashkin
 */
public class YaQC implements Runnable {

    private static class Pair implements Comparable<Pair> {
        int a,b;

        boolean first;

        private Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }

        public int compareTo(Pair o) {
            if (a != o.a) return a - o.a;
            return b - o.b;
        }
    }

    public static void main(String[] args) {
        new Thread(new YaQC()).start();
    }

    public void run() {
        try{
            br = new BufferedReader(new InputStreamReader(System.in));
            pw = new PrintWriter(new OutputStreamWriter(System.out));
            solve();
            pw.close();
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    private void solve() throws Exception {
        int n = nextInt();
        Pair a[] = new Pair[n];
        int n1 = nextInt();
        int n2 = nextInt();
        if (n1 == n2) {
            for (int i = 0; i < n1; i++) pw.print("1 ");
            for (int i = 0; i < n2; i++) pw.print("2 ");
            return;
        }
        for (int i = 0; i < n; i++) a[i] = new Pair(nextInt(), i);
        Arrays.sort(a);
        if (n2 - n1 > 0) {

            for (int i = n - 1, j = 0; j < n1; j++, i--) a[i].first = true;
            for (int i = 0; i < n2; i++) a[i].first = false;
        }
        else {
            for (int i = n - 1, j = 0; j < n2; j++, i--) a[i].first = false;
            for (int i = 0; i < n1; i++) a[i].first = true;

        }
        Arrays.sort(a, new Comparator<Pair>() {
            public int compare(Pair o1, Pair o2) {
                return o1.b - o2.b;
            }
        });

        for (int i = 0; i < n; i++) {
            if (a[i].first)
                pw.print("1 ");
            else pw.print("2 ");
        }
    }

    private BufferedReader br;
    private PrintWriter pw;
    private StringTokenizer tok;

    private String next() throws Exception {
        while (tok == null || !tok.hasMoreElements()) tok = new StringTokenizer(br.readLine());
        return tok.nextToken();
    }

    private int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

/**
 * @author abashkin
 */
public class YaQC implements Runnable {

    private static class Pair implements Comparable<Pair> {
        int a,b;

        boolean first;

        private Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }

        public int compareTo(Pair o) {
            if (a != o.a) return a - o.a;
            return b - o.b;
        }
    }

    public static void main(String[] args) {
        new Thread(new YaQC()).start();
    }

    public void run() {
        try{
            br = new BufferedReader(new InputStreamReader(System.in));
            pw = new PrintWriter(new OutputStreamWriter(System.out));
            solve();
            pw.close();
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    private void solve() throws Exception {
        int n = nextInt();
        Pair a[] = new Pair[n];
        int n1 = nextInt();
        int n2 = nextInt();
        if (n1 == n2) {
            for (int i = 0; i < n1; i++) pw.print("1 ");
            for (int i = 0; i < n2; i++) pw.print("2 ");
            return;
        }
        for (int i = 0; i < n; i++) a[i] = new Pair(nextInt(), i);

        if (n2 - n1 > 0) {
            Arrays.sort(a, new Comparator<Pair>() {
                public int compare(Pair o1, Pair o2) {
                    if (o1.a != o2.a) return o1.a - o2.a;
                    return o2.b - o1.b;
                }
            });
            for (int i = n - 1, j = 0; j < n1; j++, i--) a[i].first = true;
            for (int i = 0; i < n2; i++) a[i].first = false;
        }
        else {
            Arrays.sort(a);
            for (int i = n - 1, j = 0; j < n2; j++, i--) a[i].first = false;
            for (int i = 0; i < n1; i++) a[i].first = true;

        }
        Arrays.sort(a, new Comparator<Pair>() {
            public int compare(Pair o1, Pair o2) {
                return o1.b - o2.b;
            }
        });

        for (int i = 0; i < n; i++) {
            if (a[i].first)
                pw.print("1 ");
            else pw.print("2 ");
        }
    }

    private BufferedReader br;
    private PrintWriter pw;
    private StringTokenizer tok;

    private String next() throws Exception {
        while (tok == null || !tok.hasMoreElements()) tok = new StringTokenizer(br.readLine());
        return tok.nextToken();
    }

    private int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

}