Pasha has two hamsters: Arthur and Alexander. Pasha put n apples in front of them. Pasha knows which apples Arthur likes. Similarly, Pasha knows which apples Alexander likes. Pasha doesn't want any conflict between the hamsters (as they may like the same apple), so he decided to distribute the apples between the hamsters on his own. He is going to give some apples to Arthur and some apples to Alexander. It doesn't matter how many apples each hamster gets but it is important that each hamster gets only the apples he likes. It is possible that somebody doesn't get any apples.Help Pasha distribute all the apples between the hamsters. Note that Pasha wants to distribute all the apples, not just some of them.

The first line contains integers n, a, b (1 ≤ n ≤ 100; 1 ≤ a, b ≤ n) — the number of apples Pasha has, the number of apples Arthur likes and the number of apples Alexander likes, correspondingly. The next line contains a distinct integers — the numbers of the apples Arthur likes. The next line contains b distinct integers — the numbers of the apples Alexander likes. Assume that the apples are numbered from 1 to n. The input is such that the answer exists.

Print n characters, each of them equals either 1 or 2. If the i-h character equals 1, then the i-th apple should be given to Arthur, otherwise it should be given to Alexander. If there are multiple correct answers, you are allowed to print any of them.

#include <bits/stdc++.h>
#include<algorithm>
using namespace std;

int main()
{   int n,a,b;
    cin>>n>>a>>b;
    int i,arr[a],brr[b],arr1[n],j;
    for(i=0;i<n;i++)
    {
        arr1[i]=i+1;
    }
    for(i=0;i<a;i++)
    {
        cin>>arr[i];
    }
    for(i=0;i<b;i++)
    {
        cin>>brr[i];
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<a;j++)
        {
            if(arr1[i]==arr[j])
            {
                arr1[i]=0;

                break;
            }
        }

    }
    for(i=0;i<n;i++)
    {
        if(arr1[i]!=0)
        {
            arr1[i]=2;
        }
        else{
            arr1[i]=1;
        }
    }

    for(i=0;i<n;i++)
    {
        cout<<arr1[i]<<' ';
    }

    return 0;

}

#include<bits/stdc++.h>
using namespace std;
const int maxx = 1e2 + 20;
int a[maxx];
int main()
{
    int x, y, n;
	cin >> n >> x >> y;
	while(x--)
	{
		int p;
		cin >> p;
		a[p] = 1;
	}
	for (int i = 1; i <= n; i++)
		cout << 2 - a[i] << ' ';
    return 0;
}

#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
   int n,a,b;
   cin>>n>>a>>b;
   int *c,*d,*e;
   c=(int*)malloc(sizeof(int)*a);
   d=(int*)malloc(sizeof(int)*b);
   e=(int*)malloc(sizeof(int)*n);
   for(int i=0;i<a;i++)
   {
       cin>>c[i];
       e[c[i]-1]=1;
   }
   for(int i=0;i<b;i++)
   {
       cin>>d[i];
   }
   for(int i=0;i<n;i++)
   {
       if(e[i]!=1){e[i]=2;}
   }
   for(int i=0;i<n;i++)
   {
       cout<<e[i]<<" ";
   }
    return 0;

}

#include <iostream>
using namespace std;
int main()
{
    int apple[105],n,i,m,k,x;
    while(cin>>n>>m>>k)
    {
        for(i=1;i<=n;i++)
            apple[i]=0;
          for(i=1;i<=m;i++)
          {
              cin>>x;
              if(apple[x]==0)
              {
                  apple[x]=1;
              }
          }
          for(i=1;i<=k;i++)
          {
              cin>>x;
              if(apple[x]==0)
                  apple[x]=2;
          }
          for(i=1;i<=n-1;i++)
              cout<<apple[i]<<" ";
          cout<<apple[i]<<endl;
    }
  return 0;
}

#include<iostream>
#include<cstdio>
#include<list>
#include<algorithm>
#include<cstring>
#include<string>
#include<stack>
#include<map>
#include<vector>
#include<cmath>
#include<memory.h>
#include<set>
#include<cctype>

#define ll long long
#define LL __int64
#define eps 1e-8

//const ll INF=9999999999999;

#define inf 0xfffffff

using namespace std;

//vector<pair<int,int> > G;
//typedef pair<int,int> P;
//vector<pair<int,int>> ::iterator iter;
//
//map<ll,int>mp;
//map<ll,int>::iterator p;

int main() {
    int n,a,b;
    while(cin>>n>>a>>b) {
        int ans[100  + 10];
        memset(ans,0,sizeof(ans));
        for(int i=0;i<a;i++) {
            int x;
            cin>>x;
            ans[x] = 1;
        }
        for(int i=0;i<b;i++) {
            int x;
            cin>>x;
            if(!ans[x]) ans[x] = 2;
        }
        for(int i=1;i<n;i++)
            cout<<ans[i]<<" ";
        cout<<ans[n]<<endl;
    }
    return 0;
}

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int x[a],y,z[n+1],i;
    for(i=0;i<a;i++)
    cin>>x[i];
     for(i=0;i<b;i++)
     {
         cin>>y;
         z[y]=2;
     }
     for(i=0;i<a;i++)
     {
         z[x[i]]=1;
     }
     for(i=1;i<=n;i++)
     cout<<z[i]<<" ";
    return 0;
}

#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <numeric>
#include <algorithm>

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <limits.h>

using namespace std;

typedef long long ll;

#define mem(a,b) memset(a,b, sizeof a)
#define SZ(x)	(int)x.size()
#define FOREACH(it,x) for(__typeof((x).begin()) it=(x.begin());it!=(x.end());++it)
#define ERR 1e-5
#define PI (2.0*acos(0))
#define ALL(x) x.begin(),x.end()
#define pb push_back
#define rep(i,n,m) for(int i = (int)n,_m=(int)m;i<_m;++i)
#define bj(stat,b) (stat & (1<<b))
#define bc(stat,b) (stat & (~(1<<b)))
#define vi vector<int>
#define vs vector<string>

template <class T> T Abs(T x) {return x<0?-x:x;}

int
main()
{
	int A,N,B;
	while(cin>>N>>A>>B) {
		vi h(N+1);
		fill (ALL(h), 0);
		int x;
		rep(i,0,A) {
			cin>>x;
			if(!h[x]) h[x]=1;
		}
		rep(i,0,B) {
			cin>>x;
			if(!h[x]) h[x]=2;
		}
		cout<<h[1];
		rep(i,2,N+1) {
			cout<<" "<<h[i];
		}
		cout<<endl;
	}
}

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int a,b,n,k;
    vector<int> lub(100);
    cin>>n>>a>>b;
    for (int i=0;i<a;i++)
    {
        cin>>k;
        lub[k-1]=1;
    }
    for (int i=0;i<b;i++)
    {
        cin>>k;
        if (lub[k-1]!=1)
            lub[k-1]=2;
    }
    for (int i=0;i<n;i++)
        cout<<lub[i]<<" ";
    return 0;
}

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <list>
#include <cstring>
#include <iomanip>
#include <climits>
using namespace std;

typedef unsigned int uint;
typedef long long llong;
typedef unsigned long long ullong;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;

#define eps 1e-8
#define inf 1000*1000*1000
#define linf 4LL*1000*1000*1000*1000*1000*1000
#define sqr(x) ((x)*(x))
#define eq(x,y) ((((x)>(y))?(x)-(y):(y)-(x)) <= eps)
#define sz(x) (int((x).size()))
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp(x,y) make_pair((x),(y))
#define dbg(x) cout << #x << " : " << x << "\n"

int main() {
	//freopen(TASK ".in", "r", stdin);
	//freopen(TASK ".out", "w", stdout);
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//freopen("info.txt","r",stdin);
	//freopen("info.txt","w",stdout);
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int n,a,b; cin >> n >> a >> b;
	set<int> aa, bb;
	vi used(n+1,0);
	int t;
	for(int i = 0; i < a; i++)
		cin >> t, aa.insert(t);
	for(int i = 0; i < b; i++)
		cin >> t, bb.insert(t);
	for(int i = 1; i <= n; i++) {
		if( aa.find(i) != aa.end() ) {
			if( !used[i] ) cout << 1 << " ", used[i] == 1;
		} else if( bb.find(i) != bb.end() ) {
			if( !used[i] ) cout << 2 << " ", used[i] == 1;
		} else cout << 1;
	}
	cout << "\n";

	return 0;
}

/*
#include <bits/stdc++.h>
#define fi first
#define se second
#define oo 1000000007
#define maxi(a, b) if (a < b) a = b
#define mixi(a, b) if (a > b) a = b
#define sfo(i, a, b) for(int(i) = (int)(a); (i) <= (int)(b); ++(i))
#define bfo(i, a, b) for(int(i) = (int)(a); (i) >= (int)(b); --(i))
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(nullptr);
    //freopen("task.inp", "r", stdin);
    return 0;
}
*/
#define sfo(i, a, b) for(int(i) = (int)(a); (i) <= (int)(b); ++(i))
#define bfo(i, a, b) for(int(i) = (int)(a); (i) >= (int)(b); --(i))
#include<bits/stdc++.h>
#define __debug(a) for(auto x : a) cout << x << ' '; cout << '\n'
using namespace std;

int d[105];

int main()
{
   //freopen("journey.inp", "r", stdin);
   //freopen("journey.out", "w", stdout);
   ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

   int n, a, b; cin >> n >> a >> b;
   sfo(i, 1, a) {
      int t; cin >> t;
      d[t] = 1;
   }
   sfo(i, 1, b) {
      int t; cin >> t;
      d[t] = 2;
   }

   sfo(i, 1, n) cout << d[i] << ' ';

   return 0;
}

#include<iostream>
using namespace std;
int main()
{
    int n,m,k;
    cin>>n>>m>>k;
    int a[m],b[k],c[105]={0};
    for(int i=0;i<m;i++)
    {
            cin>>a[i];
    }
    for(int i=0;i<k;i++)
    {
            cin>>b[i];
    }

    for(int i=0;i<m;i++)
    {

            c[a[i]]=1;
    }
    for(int i=0;i<k;i++)
    {
            if(c[b[i]]==0)
            c[b[i]]=2;
    }
    for(int i=1;i<=n;i++)
    {
            cout<<c[i]<<" ";
    }
    return 0;
}

#include <iostream>
#include <cstdio>
#include <string>
#include <string.h>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <list>
#include <stack>
#include <set>
#include <cctype>
#include <algorithm>
#include <climits>
#include <queue>
#include <functional>
#include <map>

using namespace std;

int main(){
    int n,a,temp,b,arr[1001]={0};
    scanf("%d%d%d",&n,&a,&b);
    for(int i=0;i<a;i++){scanf("%d",&temp);if(arr[temp]==0)arr[temp]=1;}

    for(int i=0;i<b;i++){scanf("%d",&temp);if(arr[temp]==0)arr[temp]=2;}

    for(int i=1;i<=n;i++){
    printf("%d ",arr[i]);
    }

return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int a1[a];
    int b2[b];
    int sul[n];
    bool t=false;
    int z=0;
    for(int i=0;i<a;i++){
        cin>>a1[i];
    }
    for(int i=0;i<b;i++){
        cin>>b2[i];
    }

    for(int i=1;i<=n;i++){

        for(int j=0;j<a;j++){
            if(i==a1[j]){
                t=true;
       }

     }
 if(t==true){
         sul[z]=1;
            t=false;
            z++;
       }
       else {sul[z]=2; z++;}
    }
    for(int i=0;i<n;i++){
        cout<<sul[i]<<" ";
    }
    return 0;
}

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    int n,a,b;
    while(cin>>n>>a>>b)
    {
        int status[105],temp;
        memset(status,-1,sizeof(status));
        for(int i=0;i<a;i++)
        cin>>temp;
        for(int i=0;i<b;i++)
        {
            cin>>temp;
            status[temp-1]=2;
        }
        if(status[0]==-1)cout<<'1';
        else
        cout<<status[0];
        for(int i=1;i<n;i++)
        {
          if(status[i]==-1)
          cout<<" 1";
          else
        cout<<' '<<status[i];
        }
        cout<<endl;
    }
}

#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main(){
int n,a,b;
cin>>n>>a>>b;
int ar[200]={0};
vector<int>aa,bb;
aa.assign(a,0);
bb.assign(b,0);
for(int i=0;i<a;i++)
	{cin>>aa[i];
ar[aa[i]]=1;
}

for(int i=0;i<b;i++)
{cin>>bb[i];
ar[bb[i]]+=2;

}
for(int i=1;i<=n;i++){
	if(ar[i]==1)
		cout<<1;
	else if(ar[i]==2)
		cout<<2;
	else if(a<b)
		cout<<1;
	else cout<<2;
	if(i!=n)
		cout<<" ";
	else cout<<endl;

}
	return 0;
}

#include<iostream>
#include<string>
using namespace std;

int main()
{
    int n,a,b,i,j;
    cin>>n>>a>>b;
    int ar[a],al[b],ans[n+1];
    for(i=0;i<=n;i++)
    {
        ans[i]=0;
    }
    for(i=0;i<a;i++)
    {
        cin>>ar[i];
        ans[ar[i]]=1;
    }
    for(i=0;i<b;i++)
    {
        cin>>al[i];
        if(ans[al[i]]!=1)
            ans[al[i]]=2;
    }
    for(i=1;i<=n;i++)
    {
        cout<<ans[i]<<" ";
    }
    return 0;
}

#include<stdio.h>//
#define f(k) for(t=0;t<k;t++)//
inline int read()//
{//
    int s=0,f=1;//
    char ch=getchar();//
    while((ch<'0'||ch>'9')&&ch!=EOF)//
	{
        if(ch=='-') f=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9')
	{
        s=s*10+ch-'0';
        ch=getchar();
    }
    return s*f;
}
int n=read(),a=read(),b=read(),t,m,ans[105];
int main()
{
	f(a)
		ans[read()-1]=1;
	f(b)
		ans[read()-1]=2;
	f(n)
		printf("%d ",ans[t]);
	return 0;
}

#include<bits/stdc++.h>
#define itn int
#define tin int
#define tni int
#define nit int
#define nti int;
#define inr int
#define ll long long
using namespace std;
int n,zjy[416],a,b,gy;
int main()
{
	cin>>n>>a>>b;
	while(a--)
	{
		cin>>gy;
		zjy[gy]=1;
	}
	while(b--)
	{
		cin>>gy;
		zjy[gy]=2;
	}
	for(int i=1;i<=n;i++)
	{
		cout<<zjy[i]<<" ";
	}
	return 0;
}
/*
*/

//In the name of God
//-----gmmj

#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>

#define Rep(I,N) for(int I=0;I<N;++I)
#define For(J,R,K) for(int J=R;J<K;++J)
#define DRI(X) int x;scanf("%d",&X);
#define DRII(X1,Y1) int X1,Y1;scanf("%d%d",&X1,&Y1);
#define RI(X2) scanf("%d",&X2);
#define WI(X4) printf("%d",X4);
#define WII(X5,X6) printf("%d %d",X5,X6);
#define SF scanf
#define PF printf
#define Pii pair<int,int>
#define Ff first
#define Ss second
#define Sorts(a,n) Rep(i,n)Rep(j,n-1)if(a[j]>a[j+1])swap(a[j],a[j+1]);
#define Sortn(a,n) Rep(i,n)Rep(j,n-1)if(a[j]<a[j+1])swap(a[j],a[j+1]);
#define Test freopen("a.in","r",stdin);

typedef long long ll;

using namespace std;
ll a[103]={0};
int main(){
	//Test

	ll c,b,d,n;

	cin>>n>>c>>b;
	Rep(i,c){
		cin>>d;
		a[d-1]=1;
	}
	if(!a[n-1]) a[n-1]=2;
	Rep(i,n-1){
		if(a[i])
			cout<<a[i]<<" ";
		else
			cout<<"2"<<" ";
	}
	cout<<a[n-1];

	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int A[101]={0},n,a,b,x,i;
    cin>>n>>a>>b;
    for(i=0;i<a;i++){
        cin>>x;
        A[x-1]=1;
    }
    for(i=0;i<n;i++){
            if(A[i]==0){cout<<2<<" ";}
        else cout<<A[i]<<" ";
    }
    return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
bool used[101];
main(){
    int n,a,b,x,i;
    cin>>n>>a>>b;
    for(i=0;i<=n;i++)
        used[i] = 0;
    for(i=1;i<=a;i++){
        cin>>x;
        used[x] = 1;
    }
    for(i=1;i<=b;i++)
        cin>>x;
    for(i=1;i<=n;i++){
        if(used[i])    cout<<1<<" ";
        if(!used[i]) cout<<2<<" ";
    }
}

#include <iostream>
#include<fstream>
#include <cmath>
#include <algorithm>
#include <set>

#define pb push_back
#define mp make_pair
#define F first
#define S second
using namespace std;
int c[111111],INF=100;
int main()
{

    #ifdef LOCAL
    freopen("A.in", "r", stdin);
    freopen("A.out", "w", stdout);
    #endif

    int n,a,b;
    cin>>n>>a>>b;

    for(int i=1;i<=n;i++)
    c[i]=1;
    int v[n];
    for(int i=1;i<=a;i++)
   	{
   		int x;
   		cin>>x;
   		if(c[x]==1)v[x]=1;
   		c[x]=0;

   	}
   	for(int i=1;i<=b;i++)
   	{
   		int x;
   		cin>>x;
   		if(c[x]==1)v[x]=2;
   		c[x]=0;

   	}

   	for(int i=1;i<=n;i++)
   	cout<<v[i]<<" ";

    return 0;
}

/* 문제

*/

// 2014.

#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <functional>
#include <cstring>
#include <string>
#include <map>
#include <iostream>

#define INF     0x7fffffff
#define MINF    0x80000000
#define test    printf("test\n")
#define A       first
#define B       second

using namespace std;

typedef long long ll;
typedef vector <double> vec_d;
typedef vector <vec_d>  vvec_d;
typedef vector <int>    vec_i;
typedef vector <vec_i>  vvec_i;
typedef pair <int, int> pair_i;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif

    int n, a, b;

    scanf("%d%d%d", &n, &a, &b);

    int arr[101] = { 0 };

    for (int i = 0; i < a; i++)
    {
        int x;
        cin >> x;
        arr[x] = 1;
    }

    for (int i = 0; i < b; i++)
    {
        int x;
        cin >> x;
        arr[x] = 2;
    }

    for (int i = 0; i < n; i++)
    {
        printf("%d ", arr[i + 1]);
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define nl cout<<'\n';
#define int long long
#define ij i=0,j=0;
void print(int a)                  {              cout<<a<<'\t'<<'\n';}
void print(int a,int b)                {          cout<<a<<'\t'<<b<<'\t'<<'\n';}
void print(int a,int b,int  c)             {      cout<<a<<'\t'<<b<<'\t'<<c<<'\n';}
void print(int a,int  b,int  c,int  d)         {   cout<<a<<'\t'<<b<<'\t'<<c<<'\t'<<d<<'\n';}
void print(int a,int  b,int  c,int  d,int  e)      { cout<<a<<'\t'<<b<<'\t'<<c<<'\t'<<d<<'\t'<<e<<'\n';}

/// # day 2
// 3 8 20  - 12

void MAIN()
{
    int n,n1,n2;
    cin>>n>>n1>>n2;
    vector<int> a(n1) , b(n2);

    for(auto &i:a)        cin>>i , i--;
    for(auto &i:b)        cin>>i , i--;

    vector<int> ans(n);
    for(auto &i:a)        ans[i] = 1;
    for(auto &i:b)        ans[i] = 2;

    for(auto i:ans)        cout<<i<<" ";
}

int32_t main()
{
 // ios_base::sync_with_stdio(0) , cin.tie(0),cout.tie(0);  int t;  cin>>t; while(t--)
    MAIN();
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int arr[n];
    memset(arr,0,sizeof(arr));
    for(int i=0;i<a;i++)
    {
        int x;
        cin>>x;
        arr[x-1]=1;
    }
    for(int i=0;i<b;i++)
    {
        int x;
        cin>>x;
        if(arr[x-1]!=1)
        arr[x-1]=2;
    }
    for(int i=0;i<n;i++)
        cout<<arr[i]<<" ";
}

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    vector<int> v1;
    vector<int> v2;
    for(int i=0; i<a; i++)
    {
        int x;
        cin>>x;
        v1.push_back(x);
    }
    for (int i=0; i<b; i++)
       {
           int y;
           cin>>y;
           v2.push_back(y);
       }
    for (int i=1; i<=n; i++)
    {
        if(count(v1.begin(), v1.end(),i))
            cout<<"1 ";
        else cout<<"2 ";
    }
}

#include <vector>
#include <iostream>
#include <math.h>
#include <iomanip>
#include <algorithm>
#include <stack>
#include <queue>
#include <fstream>
#include <string>

using namespace std;

#define PI 3.14159265358979323846
#define exp 2.71828182845904523536

void main(){
	int n, a, b;
	cin >> n >> a >> b;
	vector<int> v(n);
	for (int i = 0; i < a; i++){
		int q;
		cin >> q;
		q--;
		v[q] = 1;
	}
	for (int i = 0; i < b; i++){
		int q;
		cin >> q;
		q--;
		v[q] = 2;
	}
	for (int i = 0; i < n; i++)
		cout << v[i] << ' ';

}

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
int n,i,b,a,c,k,x[105];
main()
{
      cin>>a>>b>>c;
      for(i=1; i<=b; i++)
      {
               cin>>k;
            if(x[k]==0) x[k]=1;
               }
             for(i=1; i<=c; i++)
              { cin>>k;
              if(x[k]==0) x[k]=2;
               }
               for(i=1; i<=a; i++) cout<<x[i]<<" ";

               }

#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,a,b;
    cin >> n >> a >> b;
    vector <int> ans(n,0);
    for(int i=0,x;i<a;i++){
        cin >> x;
        ans[x-1]=1;
    }
    for(int i=0,x;i<b;i++){
        cin >> x;
        ans[x-1]=2;
    }
    for(int i=0;i<n;i++){
    	cout << ans[i] << " ";
    }
    cout << endl;
    return 0;
}

#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include <iterator>
#define sz(c) int((c).size())

using namespace std;
typedef long long ll;
int MAX = -2e9, MIN = 2e9;

int pav[101], art[101], found[101];

int main(){
	int n, a, b;
	cin >> n >> a >> b;
	for (int i = 0; i < a; i++){
		cin >> pav[i];
		found[pav[i] - 1] = 1;
	}

	for (int i = 0; i < b; i++){
		cin >> art[i];
		if (found[art[i] - 1] != 1)
			found[art[i] - 1] = 2;
	}

	for (int i = 0; i < n; i++)
		cout << found[i] << " ";

	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstdlib>
#include <cassert>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <iomanip>
#include <set>
#include <deque>
#include <fstream>

using namespace std;

#define forn(i,n) for (int i = int(0); i < int(n); i++)
#define forb(i,n) for (int i = int(n-1); i >= int(0); i--)
#define for1(i,n) for (int i = int(1); i <= int(n); i++)
#define fore(i,a,n) for (int i = int(a); i < int(n); i++)

#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define sz size()
#define sqr(x) ((x)*(x))
#define cube(x) ((x)*(x)*(x))
#define all(x) x.begin(), x.end()

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

const int base = 1e9;
const int maxn = 1e6;
const int logn = 20;
const int inf = (1<<31)-1;
const int alpha = 26;
const int my_hash = 29;
const long long l_inf = 4e18;
const long long mod = 1e9+7;
const double pi = acos(-1.0);
const double eps = 1e-9;

int main() {
	ios_base::sync_with_stdio();
	/*freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);*/
	int n, a, b;
	cin >> n >> a >> b;
	vector<char> used(n,2);
	forn(i,a) {
		int x;
		cin >> x;
		used[x-1] = 1;
	}
	forn(i,n)
		printf("%d ", used[i]);
}

#include <iostream>
#include <vector>

using namespace std;

int main()
{
	vector<int> apples;
	int n, a, b;
	cin >> n >> a >> b;

	apples.resize(n, 1);

	for(int i = 0; i < a; i++)
	{
		int j;
		cin >> j;
		j--;

		// apples[j] = 1;
	}

	for(int i = 0; i < b; i++)
	{
		int j;
		cin >> j;
		j--;

		apples[j] = 2;
	}

	for(int i = 0; i < n; i++)
	{
		if(i != 0) cout << " ";
		cout << apples[i];
	}
	cout << endl;

	return 0;
}

#include<iostream>
#include<vector>

using namespace std;
int main(){
	int n, a, b;
	cin>>n>>a>>b;
	vector<int> apples(n+1);
	int number;

	for(int i=0;i<a;i++){
		cin>>number;
		apples[number] = 1;
	}

	for(int i=0;i<b;i++){
		cin>>number;
		if( apples[number] != 1 )
			apples[number] = 2;
	}

	for(int i=1;i<=n;i++)
		cout<<apples[i]<<" ";
	return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pp pop_back
#define fr first
#define se second
#define r_0 return 0
#define TIME ios_base::sync_with_stdio(0)
#define loves(s) freopen( s, "r", stdin )
#define cookies(s) freopen( s, "w", stdout )

const ll O = 1e6;

using namespace std;

    ll n, m, x, y, k, l = 1e9, cnt;
    ll a[1001], b[1001];
    ll used[1001];

int main(){
    TIME;
    cin >> n >> x >> y;
    for ( int i = 1; i <= x; i ++ ){
        cin >> a[i];
        used [a[i]] = 1;
    }
    for ( int i = 1; i <= y; i ++ ){
        cin >> b[i];
        if ( used [b[i]] != 1 ){
            used [b[i]] = 2;
        }
    }
    for ( int i = 1; i <= 1001; i ++ ){
        if ( used[i] != 0 ){
            cout << used[i] << " ";
        }
    }
}

#include <bits/stdc++.h>

using namespace std;

set < int > on;
set < int > tw;

int main()
{
    int t ,  n , m , temp;
    cin >> t >> n >> m;
    while(n--)
    {
        cin >> temp;
        on.insert(temp);
    }
    while(m--)
    {
        cin >> temp;
        tw.insert(temp);
    }
    for(int i = 1 ; i <= t ; ++i)
    {
        if(on.find(i) != on.end() && tw.find(i) != tw.end()) cout << "1 " ;
        else if(on.find(i) != on.end()) cout << "1 ";
        else if(tw.find(i) != tw.end()) cout << "2 ";
    }
    return 0;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    int n, a, b, x;

    cin >> n >> a >> b;

    map < int, int > mp;

    for(int i = 0; i < a; i++) cin >> x, mp[x] = 1;

    for(int i = 0; i < b; i++) cin >> x, mp[x] = 2;

    for(int i = 1; i <= n; i++) cout << mp[i] << ' ';

    cout << endl;

    return 0;
}

		//A code
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ll long long
#define vec vector < ll >
#define pb push_back
#define po pop_back
#define f(i,x,n) for(ll i=x;i<n;i++)
#define rf(i,x,n) for(ll i = x; i >= n; i--)
#define all(c) c.begin(),c.end()
using pii = pair<int,int>;
const int MOD = 1e9+7, N = 2e3 + 10;
int main()
{ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	ll n,a,b; cin>>n>>a>>b; ll ar[n]={0};
	f(i,0,a){
		ll y; cin>>y;
		ar[y-1]=1;
	}
	f(i,0,b){
		ll y; cin>>y;

	}
	f(i,0,n){
		if(ar[i]==1) cout<<1<<" ";
		else cout<<2<<" ";
	}
}

#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
    int n,a,b,i,j,val,arr[110];

    scanf("%d %d %d",&n,&a,&b);

    for(i=1; i<=a; i++)
    {
        scanf("%d",&val);
        arr[val]=1;
    }
    for(i=1; i<=b; i++)
    {
        scanf("%d",&val);
        arr[val]=2;
    }

    for(i=1; i<=n; i++)
    {
        if(i>1)
        printf(" ");
        printf("%d",arr[i]);
    }
    puts("");

    return 0;
}

#include<iostream>
#include<string>
using namespace std;
void main(){

	int n , app[102] , a2 , b2;
	int a , b;
	cin >> n >> a >> b;
	for(int i = 0; i < n; i++) app[i] = 0;
	if(a > n || b > n) return;
	for(int i = 0; i < a; i++){
		cin >> a2;
		app[a2 - 1] = 1;
	}
	for(int i = 0; i < b; i++){
		cin >> b2;
		if(app[b2 - 1] != 1) app[b2 - 1] = 2;
	}
	for(int i = 0; i < n ; i++){
		if(app[i] == 0) cout << 1 << endl;
		else cout << app[i] << endl;
	}

}

// In the name of Allah //
#include <bits/stdc++.h>
using namespace std;

int arr[200];
int main()
{
    int n, a, b, c;
    cin >> n >> a >> b;
    for(int i = 0; i < a; i++) {
        cin >> c;
        arr[c] = 1;
    }
    for(int i = 0; i < b; i++) {
        cin >> c;
        arr[c] = 2;
    }
    for(int i = 1; i <= n; i++)
        cout << arr[i] << ' ';
    return 0;
}

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <stack>
#include <cstring>

using namespace std;

int main()
{
    int n,a,b,x,y;
    cin>>n>>a>>b;
    int c[n+1];
    for(int i=1;i<=a;i++){
        cin>>x;
        c[x]=1;
    }
    for(int i=1;i<=b;i++){
        cin>>y;
        c[y]=2;
    }
    for(int i=1;i<=n;i++)
        cout<<c[i]<<" ";

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll c;
int s[105];
int main()
{
	int a,b,t,n;
	cin>>n>>a>>b;
	for(int i = 1 ; i <= a ; ++i)
	{
		cin>>t;
		s[t] = 1;
	}
	for(int i = 1 ; i <= b ; ++i)
	{
		cin>>t;
		if(s[t]!=1)
		{
			s[t]=2;
		}
	}
	for(int i = 1 ; i<= n ; ++i)
	{
		cout<<s[i]<<" ";
	}

}

#include<bits/stdc++.h>
#include<set>
#include<stdio.h>
using namespace std;
int main()
{
    int n, a, b, l;
    cin >> n >> a >> b;
    int arr[n+1] {};
    for(int i = 0; i < a; i++)
    {
        cin >> l;
        arr[l] = 1;
    }
    for(int i = 0; i < b; i++)
    {
        cin >> l;
        arr[l] = 2;
    }
    for(int i = 1; i < n+1; i++)
    {
        cout << arr[i] << " ";
    }

}

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=200;
int n,sa,sb,a[maxn],b[maxn];
bool vis[maxn*maxn];
int main()
{
    while(scanf("%d%d%d",&n,&sa,&sb)!=EOF)
    {
        memset(vis,0,sizeof(vis));
        for(int i=0;i<sa;i++)
        {
            scanf("%d",&a[i]);
            vis[a[i]]=1;
        }
        for(int i=0;i<sb;i++)
            scanf("%d",&b[i]);
        for(int i=1;i<=n;i++)
        {
            if(vis[i])
                printf("1 ");
            else
                printf("2 ");
        }
        printf("\n");
    }
    return 0;
}

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
	int n,a,b;
	scanf("%d%d%d",&n,&a,&b);
	int x,y,ans[n+1];
	for(int i=0;i<a;i++){
		scanf("%d",&x);
		ans[x]=1;
	}
	for(int i=0;i<b;i++){
		scanf("%d",&y);
		ans[y]=2;
	}
	for(int i=1;i<=n;i++)
		printf("%d ",ans[i]);
	return 0;
}

/**
*   Bismillahir Rahmanir Rahim.
*   Imtiaz_rafi
*   PCIU
**/
#include<bits/stdc++.h>
using namespace std;
#define speed ios::sync_with_stdio(0);cin.tie(0);
#define ll long long
#define loop(a) for(ll i=0;i<a;i++)
#define max 900000000
int main()
{
    speed;
    vector<ll>v;
    ll t,a,b,i,j,k;
    cin>>t>>a>>b;
    ll c[a],d[b];
    for(i=0;i<a;i++)
    {
        cin>>c[i];
    }
    for(j=0;j<b;j++)
    {
        cin>>d[j];
    }
    for(k=1;k<=t;k++)
    {
        i=0;
        j=0;
        while(i<a)
        {
            if(c[i]==k)
                j=1;
            i++;
        }
        if(j==1)
            cout<<"1 ";
        else
            cout<<"2 ";

    }
}

#include<bits/stdc++.h>
using namespace std;
int s[105];
int main(){
    int n,a,b,x;
    cin>>n>>a>>b;
    for(int i=0;i<a;++i){
        cin>>x;
        s[x]=1;
    }
    for(int i=0;i<b;++i){
        cin>>x;
        s[x]=2;
    }
    for(int i=1;i<=n;++i){
        if(!s[i]) cout<<s[i]+1<<" ";
        else cout<<s[i]<<" ";
    }
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,a,b,i;
	cin>>n>>a>>b;
	bool a1[n],a2[n];
	memset(a1,0,sizeof(a1));
	memset(a2,0,sizeof(a2));
	for (i=0;i<a;i++)
	{
		int t;
		cin>>t;
		a1[t-1]=true;
	}
	for (i=0;i<b;i++)
	{
		int t;
		cin>>t;
		a2[t-1]=true;
	}
	for (i=0;i<n;i++)
	{
		if (a1[i])
			cout<<1<<' ';
		else
			cout<<2<<' ';
	}
	return 0;
}

#include <cstdio>
using namespace std;

int main(){
    int n,a,b,x,idx[105]={};
    scanf("%d%d%d",&n,&a,&b);
    while(a--){
        scanf("%d",&x);
        idx[x]=1;
    }
    while(b--){
        scanf("%d",&x);
        idx[x]=2;
    }
    for(int i=1;i<=n;i++) printf("%d%c",idx[i],i<n?' ':'\n');
}

#include <iostream>
#include<bits/stdc++.h>
using namespace std;

int main() {
int n,a,b;
cin>>n>>a>>b;
int x[a];
int y[b];
int arr[n+1];
memset(arr,0,sizeof(arr));
for(int i=0;i<a;i++){
	cin>>x[i];
	arr[x[i]]=-1;
}
for(int i=0;i<b;i++){
	cin>>y[i];
	arr[y[i]]++;
}
int flag=0,tip=0;
for(int i=1;i<n+1;i++){
	if(arr[i]>0){
		cout<<"2"<<" ";
	}
	else if(arr[i]==-1){
		cout<<"1"<<" ";
		flag=1;
	}
	else	if(arr[i]==0 && flag==0){
		cout<<"1"<<" ";
		tip=1;
	}
	else if((arr[i]==0 && flag==1 ) || (arr[i]==0 && tip==1)){
		cout<<"2"<<" ";
	}

}
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int arr[10000]={0} , napp , alx ,arth,sz,tem;
	 cin>>napp>>alx>>arth;
	 while(alx--)
	 {
		 cin>>tem;
		 arr[tem-1]=1;
	 }
	 while(arth--)
		 cin>>tem;
	 for(int i=0;i<napp;i++)
		 cout<<(!arr[i])+1<<' ';
	 //system("pause");
	return 0;
}

#include <iostream>
#include <string>
#include <map>
using namespace std;
int a[100 + 10];
int b[100 + 10];
int mark[100 + 10];
int main()
{
	int n,at,bt;
	cin>>n>>at>>bt;
	for(int i=1;i<=at;i++)
	{
		cin>>a[i];
		mark[a[i]]=1;
	}
	for(int i=1;i<=bt;i++)
	{
		cin>>b[i];
		mark[b[i]]=2;
	}
	for(int i=1;i<=n;i++)
	{
		if(mark[i]==1)
			cout<<1<<" ";
		if(mark[i]==2)
			cout<<2<<" ";
	}
	return 0;
}

#include<iostream>
#include<cstdio>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<climits>
#include<cmath>
#include<vector>
#include <bitset>
#include<algorithm>
#include <queue>
using namespace std;
int n, a, b, i, x, y;
int apple[105];
int main()
{
	cin >> n >> a >> b;
	memset(apple, 0, sizeof(apple));
	for (i = 1; i <= a; i++)
	{
		cin >> x;
		apple[x] = 1;
	}
	for (i = 1; i <= b; i++)
	{
		cin >> y;
		if (apple[y] == 0)
		{
			apple[y] = 2;
		}
	}
	for (i = 1; i < n; i++)
	{
		cout << apple[i] << " ";
	}
	cout << apple[i] << endl;

}

#include<bits/stdc++.h>

using namespace std;

int main(){
    int n, x, b, tmp;
    cin >> n >> x >> b;
    int a[n+1];
    for(int i=0; i<x; i++){
        cin >> tmp;
        a[tmp]=1;
    }
    for(int i=0; i<b; i++){
        cin >> tmp;
        a[tmp]=2;
    }
    for(int i=1; i<=n; i++) cout << a[i] << " ";
    return 0;
}

#include <iostream>
#include <string>
#include <conio.h>
using namespace std;
int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int r[100];
    int m[2][100];
   for(int j=0;j<a;j++)
   {
         cin>>m[0][j];
        r[(m[0][j])-1]=-1;
   }
   for(int j=0;j<b;j++)
         cin>>m[1][j];
    for(int j=0;j<n;j++)
    {
           if(r[j]==-1)
              cout<<"1 ";
            else
               cout<<"2 ";
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int long long n,a,b,no;
    set<int long long>sa;
    cin>>n>>a>>b;
    for(int i=0;i<a;i++)
    {
        cin>>no;
        sa.insert(no);
    }
    for(int i=0;i<b;i++)
    cin>>no;
    for(int i=1;i<=n;i++)
    if(sa.find(i)==sa.end())
    cout<<2<<" ";
    else
    cout<<1<<" ";
}

#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>
#include <cstdio>
#include <cstddef>
using namespace std;
/* In name of Allah */
int s[100];
 int main()
{
    int n,a,b;
    cin >> n>>a>>b;
    int y;
    for ( int i = 1; i <= a; i++)
    {
        cin >>y;
        s[y]= 1;
    }
    for ( int i = 1; i <= b; i++)
    {
        cin >> y;
        if ( s[y] != 1)
            s[y] = 2;
    }
    for ( int i = 1; i <=n; i++)
    {

        cout <<s[i] << " ";
    }
}

#include<iostream>
#include<vector>
using namespace std;

int main(){
    int n,a,b,temp;
    cin>>n>>a>>b;
    vector<int> n1[a],n2[b],res[n];
    for(int i=0;i<a;i++){
        cin>>temp;
        n1->push_back(temp);
    }
    for(int i=0;i<b;i++){
        cin>>temp;
        n2->push_back(temp);
    }
    for(int i=0;i<n;i++){
        int temp1=0;
        for(int j=0;j<a;j++){
            if(i+1==n1->at(j))
                temp1=1;
        }
        if(temp1==1)
            cout<<1<<" ";
        else
            cout<<2<<" ";
    }
    return 0;

}

#include <iostream>
using namespace std;
int main()
{
	int n, a, b;
	cin >> n >> a >> b; bool ar[100001] = { false }; bool br[100001] = { false };
	for (int i = 1; i <= a; i++)
	{
		int q; cin >> q; ar[q] = true;
	}

	for (int i = 1; i <= b; i++)
	{
		int q; cin >> q; br[q] = true;
	}
	for (int i = 1; i <= n; i++)
	{
		if (ar[i] == 1) cout << 1<<" ";
		if (ar[i] != 1 && br[i] == 1) cout << 2<<" ";
	}

}

#include<iostream>
#include<algorithm>
#include<string.h>
#include<set>
#include<vector>
#include<ctime>
#include<stdio.h>
#include<cstdio>
#include <map>
#include <string>

using namespace std;

#define PI 3.14159265358979
#define _abs(a) ((a>0)?a:-(a))
#define _min(a,b) ((a<b)?(a):(b))
#define _max(a,b) ((a<b)?(b):(a))

long long int _gcd(long long int a,long long int b)
{
	if(b==0)return a;
	_gcd(b,a%b);
}

long long int _pow(long long int a,long long int n)
{
	if(n==0)return 1;
	if(n%2==1)return _pow(a,n-1)*a;
	long long int tmp=_pow(a,n/2);
	return tmp*tmp;
}

pair<int,int>arr[300001];
int main()
{
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);

int n,a,b,c[100]={0},o;

cin>>n>>a>>b;

for(int i=0;i<a;++i)
cin>>o,c[o-1]=1;

for(int i=0;i<b;++i)
cin>>o;

for(int i=0;i<n;++i)
if(c[i]==0)
cout<<"2 ";
else cout<<"1 ";

}

#include <cstdio>

using namespace std;

const int N=105;

int a[N];

int main()
{
    //freopen("input", "r", stdin);
    //freopen("output", "w", stdout);
    int n, m, k, i, x;
    scanf("%d%d%d", &n, &m, &k);
    for(i=1;i<=m;i++)
    {
        scanf("%d", &x);
        a[x]=1;
    }
    for(i=1;i<=k;i++)
    {
        scanf("%d", &x);
        a[x]=2;
    }
    for(i=1;i<=n;i++) printf("%d ", a[i]);
    printf("\n");
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
  	int ans[101];
  	memset(ans,0,sizeof(ans));
  	int a=0,b=0,n=0,x=0;
  	cin>>n>>a>>b;
  	while(a--)
  	{
  		cin>>x;
  		ans[x]=1;
	  }
	while(b--)
	{
		cin>>x;
		ans[x]=2;
	 }
	int i=1;
	while(i<=n)
	{
		cout<<ans[i]<<" ";
		i++;
	}
	return 0;
}

#include <stdio.h>
#define MAX 100

int main()
{
    int n, a, b;
    int result[MAX];

    scanf("%d %d %d", &n, &a, &b);
    int p;
    while (a--)
    {
        scanf("%d", &p);
        result[p-1] = 1;
    }
    while (b--)
    {
        scanf("%d", &p);
        result[p-1] = 2;
    }

    for (int i = 0; i<n; i++)
    {
        (i == (n-1)) ? printf("%d", result[i]) : printf("%d ", result[i]);
    }
    return 0;
}

#include<bits/stdc++.h>

using namespace std ;

int main()
{
	int n , a , b ;
	cin>>n>>a>>b ;

	int c[a] , d[b] ;
	int i , j ;
	for(i=0;i<=a-1;i++)
	{
		cin>>c[i] ;
	}
	for(i=0;i<=b-1;i++)
	{
		cin>>d[i] ;
	}
	for(i=1;i<=n;i++)
	{
		for(j=0;j<=a-1;j++)
		{
			if(i==c[j])
			{
				cout<<"1 " ;
				goto label ;
			}
		}
		for(j=0;j<=b-1;j++)
		{
			if(i==d[j])
			{
				cout<<"2 " ;
			}
		}
		label : continue ;
	}
}

#include <iostream>
#include <stdio.h>
using namespace std;
bool used[101];
main(){
    int n,a,b,x,i;
    cin>>n>>a>>b;
    for(i=0;i<=n;i++)
        used[i] = 0;
    for(i=1;i<=a;i++){
        cin>>x;
        used[x] = 1;
    }
    for(i=1;i<=b;i++)
        cin>>x;
    for(i=1;i<=n;i++){
        if(used[i])    cout<<1<<" ";
        if(!used[i]) cout<<2<<" ";
    }
}

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<limits.h>
#include<stdlib.h>
#include <iostream>
#include<algorithm>
#define len 110
using namespace std;
int c[len];
int main()
{
    int n,a,b,x;
    scanf("%d%d%d",&n,&a,&b);
    for(int i=1;i<=n;++i)
    {
        c[i]=2;
    }
    while(a--)
    {
        scanf("%d",&x);
        c[x]=1;
    }
    while(b--)
    {
        scanf("%d",&x);
    }
    for(int i=1;i<=n;++i)
        printf("%d ",c[i]);
    return 0;
}

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string.h>
#include <bitset>
#include <set>
#include <map>
#include <cstdio>
#include <sstream>

using namespace std;
#define REP(i,n)  for(int i=0;i<(int)(n);++i)
#define FOR(i,b,n)  for(int i=b;i<(n);++i)
#define ALL(c) (c).begin(),(c).end()
#define SS size()
#define SZ(c) (int)(c.size())
#define CLR(a,v) memset((a),(v), sizeof a)
#define ZERO(a) memset((a),0, sizeof a)
#define PB push_back

typedef vector<int> vi;
typedef set<int> si;
typedef int8_t byte;

typedef long long ll;
typedef pair<int,int> pii;
#define MP make_pair
#define ST first
#define ND second
#define BIT(i) bitset<31>((i)).to_string().c_str()

typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<vi> vvi;

template <typename T> void PrintContainer(T& a, int n = -1) {
  if (n==-1) n=a.size();
  cout << "{";
  int i = 0;
  for(auto it : a) {
    cout << (it) << ", ";
    if (++i==n) break;
  }
  cout << "}\n";}

int main() {
	int n, a, b; cin >> n >> a >> b;
	si A, B;
	int k;
	REP(i,a) {
		cin >> k;
		A.insert(k);
	}
	REP(i,b) {
		cin >> k;
		B.insert(k);
	}
	REP(i,n) if (A.count(i+1)) cout << "1 "; else cout <<	"2 ";
	cout << endl;

}

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int no, ar, al, lar, lal, i;
	cin>>no>>ar>>al;
	int b[no+1];
	map <int, int> a;
	for(i=0; i<no; i++)
	{
		a[i]=0;
	}
	for(i=0; i<ar; i++)
	{
		cin>>lar;
		b[lar]=1;
		a[lar]++;
	}
	for(i=0; i<al; i++)
	{
		cin>>lal;
		if(a[lal]==1)
		{
		}
		else
		{
			b[lal]=2;
		}
	}
	for(i=1; i<=no; i++)
	{
		cout<<b[i]<<" ";
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,a,b,c;
	cin>>n>>a>>b;
	int j[200];
	for(int i=0;i<a;i++) cin>>c,j[c]=1;
	for(int i=0;i<b;i++) cin>>c,j[c]=2;
	for(int i=1;i<=n;i++) cout<<j[i]<<' ';
	return 0;
}

#include <iostream>
#include <cstring>
#include <queue>
#include <stdio.h>
#include <cmath>
#include <sstream>
#include <cstdio>
#include <algorithm>
#include <cstdio>
#include <set>
#include <cstdlib>
#include <vector>
#include <cctype>
#include <utility>
#include <map>
#include <string>
using namespace std;
int conversion(string p)
{
    int o;
    o=atoi(p.c_str());
    return o;
}
string toString(int h)
{
    stringstream ss;
    ss<<h;
    return ss.str();
}
long long gcd(long long a,long long b)
{
    return (b==0 ? a : gcd(b,a%b));
}
bool dif(int a,int b,int c)
{
    if(a!=b & a!=c & b!=c)
    {
        return true;
    }
    else
    {
        return false;
    }
}
int lcm(int a,int b)
{
    return (a*(b/gcd(a,b)));
}
bool ev(vector<int> f,int num)
{
    for(int i=0; i<f.size(); i++)
    {
        if(f[i]==num)
        {
            return true;
        }
    }
    return false;
}
#define MAXN 100
vector<int> V(MAXN);
bool vis[MAXN];
int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    for(int i=0; i<a; ++i)
    {
        int num1;
        cin>>num1;
        vis[num1-1]=true;
        V[num1-1]=1;
    }
    for(int i=0; i<b; ++i)
    {
        int num2;
        cin>>num2;
        if(!vis[num2-1])
        {
            vis[num2-1]=true;
            V[num2-1]=2;
        }
    }
    for(int i=0; i<n; i++)
    {
        cout<<V[i]<<" ";
    }

}

#include <iostream>
#include <cstdio>
#include <iomanip>
#include <string>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
//#include <cassert>
#include <cstring>
#include <sstream>
#include <ctime>
#include <stdexcept>
#include <limits>
#include <bitset>
#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

#define assert(x) if (!(x)) cout << "ASSERT FAILED ON {"#x"}! Line: " << __LINE__ << "\n" << flush, exit(1);
#define assertwt(x) if (!(x)) {cout << "ASSERT FAILED ON {"#x"}! Line: " << __LINE__ << "\n" << flush; while(1);}

#define input_file(s) assert(freopen(s, "r", stdin))
#define output_file(s) assert(freopen(s, "w", stdout))
#define stderr_file(s) assert(freopen(s, "w", stderr))

#ifdef MY
#define FLU cout << flush
#else
#define FLU 42
#endif

#define ALL(a) (a).begin(), (a).end()
#define FORAB(i, a, b) for (int i = a; i < b; ++i)
#define DBG(x) z_dbg << #x" = " << x << "\n", FLU
#ifdef MY
#define CHECKPOINT z_dbg << "At line " << __LINE__ << ", clock: " << clock() << "\n", FLU
#else
#define CHECKPOINT 42
#endif

typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ipair;

const double PI = 3.14159265358979323846;
const double EPS = 1e-9;

const int INF = 2e9;
const ll LINF = 1e18;

template<class T>
const T sqr(const T &x) { return x * x; }

template<class T>
const T &min(const T &a, const T &b, const T &c) { return min(min(a, b), c); }

template<class T>
const T &max(const T &a, const T &b, const T &c) { return max(max(a, b), c); }

struct DbgStream {
    template <class T>
    DbgStream &operator<<(const T &x) {
        #ifdef MY
        cout << x;
        #endif
        return *this;
    }
} z_dbg;

#define cerrr cerr
#define cerr z_dbg

// !GLOB

int n, a, b, q1[500], q2[500], ans[500];

int main() {
    #ifdef MY
    input_file("input.txt");
    //output_file("output.txt");
    //stderr_file("stderr.txt");
    #else
    #define TASK_FILE_NAME "protocol"
    //input_file(TASK_FILE_NAME".in");
    //output_file(TASK_FILE_NAME".out");
    //input_file("input.txt");
    //output_file("output.txt");
    #endif

    ios_base::sync_with_stdio(0);

    // !MAIN

    cin >> n >> a >> b;

    for (int i = 0; i < a; ++i) {
        cin >> q1[i];
        --q1[i];
        ans[q1[i]] = 1;
    }

    for (int i = 0; i < b; ++i) {
        cin >> q2[i];
        --q2[i];
        ans[q2[i]] = 2;
    }

    for (int i = 0; i < n; ++i) {
        cout << ans[i] << " ";
    }
    cout << "\n";

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,a,b,qwq[101],x[101],tmp;
int main()
{
	scanf("%d%d%d",&n,&a,&b);
	for(int i=1;i<=a;i++)//存下 Arthur 的
		scanf("%d",&x[i]);
	while(b--)//Alexander
        scanf("%d",&tmp),qwq[tmp]=2;//先给 Alexander
    for(int i=1;i<=a;i++)//Arthur
    	qwq[x[i]]=1;//再优先把 Arthur 喜欢的苹果的编号存进来
    for(int i=1;i<=n;i++)//输出答案
		printf("%d ",qwq[i]);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int n,a,b;
int A[110];
int B[110];

int cal()
{
    int arr[110]={0};
    for(int i=1;i<=b;i++)
    {
        arr[B[i]]=2;
    }
    for(int i=1;i<=a;i++)
    {
        arr[A[i]]=1;
    }
    for(int i=1;i<=n;i++)
    {
        cout<<arr[i]<<" ";
    }

    cout<<endl;
    return 0;
}

int main()
{
    cin>>n>>a>>b;
    for(int i=1;i<=a;i++)
    {
        cin>>A[i];
    }
    for(int i=1;i<=b;i++)
    {
        cin>>B[i];
    }

    cal();

    return 0;
}

#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int main(){
    int n, a, b;
    cin >> n >> a >> b;
    int dat[101], temp;
    memset(dat, 0, sizeof(dat));
    for(int i=0; i<a; i++){
        cin >> temp;
        dat[temp] = 1;
    }
    for(int i=1; i<=n; i++){
        if(dat[i] == 0) cout << 2 << " ";
        else cout << 1 << " ";
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int main()
{
    int n,m,k,j,a,b,i,t;
    int f[105];
    scanf("%d%d%d",&n,&a,&b);
    for(i=0;i<a;i++){
        scanf("%d",&k);
        f[k]=1;
    }
    for(i=0;i<b;i++){
        scanf("%d",&t);
        if(f[t]!=1) f[t]=2;
        else continue;
    }
    for(i=1;i<=n;i++) printf("%d ",f[i]);
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int qwq[101],n,a,b,x;
int main()
{
    scanf("%d%d%d",&n,&a,&b);
    while(a--)
        scanf("%d",&x),qwq[x]=1;
    while(b--)//Alexander
        scanf("%d",&x),qwq[x]=2;
    for(int i=1;i<=n;i++)
        printf("%d ",qwq[i]);
    return 0;
}

#include <iostream>
using namespace std;
int arr[100];
int main(){
    int n,a,b;
    cin >> n >> a >> b;
    for(int i = 0; i < a; i++){
        int c;
        cin >> c;
        arr[c-1] = 1;
    }
    for(int i = 0; i < b; i++){
        int c;
        cin >> c;
        arr[c-1] = 2;
    }
    for(int i = 0; i < n; i++){
        cout << arr[i] << " ";
    }
}

/* Winners never quit && Quitters never win */
#include <iostream>
#include <map>
using namespace std;
int s, s1, s2, a;
map <int, int>m;
int main() {
	cin >> s >> s1 >> s2;
	for (int i = 0;i < s1;i++) {
		cin >> a;
		m[a] = 1;
	}
	for (int i = 0;i < s2;i++) {
		cin >> a;
		m[a] = 2;
	}
	for (int i = 1;i <= s;i++) {
		cout << m[i] << " ";
	}
	return 0;
}

#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<iostream>
#include<map>
#include<string>
#include<queue>

using namespace std;

#define rep(i,n) for(int i=0; i<(int)n; i++)
#define st first
#define nd second
#define mp make_pair
#define pb push_back

typedef vector<int> vi;
typedef pair<int,int> pi;
typedef vector<pi> vpii;
typedef set<int> SI;
typedef long long LL;

#ifdef DEBUG
const bool debug = true;
#else
const bool debug = false;
#endif
int n,m,k,l;
const int inf = 1000 * 1000 * 1000 ;
const int MAKSN = 1000 * 1000 + 13; // UZUPElnic
const LL MOD = 123456789LL;

int hamst[MAKSN];

int a,b;
void readIn()
{
	scanf("%d%d%d",&n,&a,&b);

	rep(i,a)
	{
		scanf("%d",&k);
		hamst[k] = 1;
	}

	rep(i,b)
	{
		scanf("%d",&k);
		hamst[k] = 2;
	}

	for(int i=1; i<=n; i++)
	{
		printf("%d ",hamst[i]);
	}

	printf("\n");
}

void solve()
{

}

int main()
{
	readIn();
	solve();
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define mxN 200005
#define inf 1000000000000000000
using namespace std;
typedef pair <int,int> pii;
typedef pair <int,pii> piii;
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};
const ll mod = 1000000007;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int n,a,b; cin >> n >> a >> b;
    int arr[n+1] = {};
    for (int i = 0; i < a; i++) {
        int x; cin >> x;
        arr[x]++;
    }
    for (int i = 0; i < b; i++) {
        int x; cin >> x;
        if (arr[x] == 0) arr[x] += 2;
    }
    for (int i = 1; i <= n; i++) {
        cout << arr[i] << " ";
    }
}

#include <iostream>

using namespace std;

int main()
{
    int p,a,j;
    cin>>p>>a>>j;
    int aa[105],ja[105],pa[105];

    for (int i = 0; i <=p; ++i)
    {
        pa[i]=0;/* code */
    }

    for (int i = 0; i < a; ++i)
    {
        cin>>aa[i];
        pa[aa[i]]=1;
        /* code */
    }

    for (int i = 0; i < j; ++i)
    {
        cin>>ja[i];
        if (pa[ja[i]]!=1)
        {
            pa[ja[i]]=2;
            /* code */
        }
        /* code */
    }

    for (int i = 1; i <= p; ++i)
    {
        cout<<pa[i]<<" ";
        /* code */
    }
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <queue>

typedef unsigned int uint;
typedef long long ll;

using namespace std;

int main()
{
	FILE* ci;
	FILE* co;

#ifdef _DEBUG
	freopen_s( &ci, "input.txt", "r", stdin );
	freopen_s( &co, "output.txt", "w", stdout );
//#else
//	freopen_s( &ci, "knight1.in", "r", stdin );
//	freopen_s( &co, "knight1.out", "w", stdout );
#endif

	int n, a, b;

	cin >> n >> a >> b;

	vector< int> vec;
	vec.resize(n);

	int x;

	for (int i = 0; i < a; i++)
	{
		cin >> x;

		vec[x - 1] = 1;
	}

	for (int i = 0; i < b; i++)
	{
		cin >> x;

		vec[x - 1] = 2;
	}

	for (int i = 0; i < n; i++)
	{
		cout << vec[i] << " ";
	}

	return 0;
}

#include<iostream>
using namespace std;
int m[102];
int main(){
int n,a,b;
cin>>n>>a>>b;
int c;
for(int i=0;i<a;i++){
cin>>c;
m[c]=1;
}
for(int i=0;i<b;i++){
cin>>c;
if(m[c]!=1)
m[c]=2;
}
for(int i=0;i<=n;i++)if(m[i]!=0)cout<<m[i]<<" ";

return 0;
}

#include <algorithm>
#include <iostream>
#include <fstream>
#include <cmath>

using namespace std;

int c[10005];

int main(){
	int n, a, b;
	cin >> n >> a >> b;
	for(int i = 1;i <= a;++ i){
		int x;
		cin >> x;
		c[x] = 1;
	}
	for(int i = 1;i <= b;++ i){
		int x;
		cin >> x;
		c[x] = 2;
	}
	for(int i = 1;i <= n;++ i)
		cout << c[i] << " ";
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int n,a,b,k;
	cin>>n>>a>>b;
	int x[n+1]={0};
	while(a--)
	{
		cin>>k;
		x[k]=1;
	}
	while(b--)
	cin>>k;
	for(int i=1;i<=n;i++)
	cout<<(!x[i])+1<<" ";
return 0;
}

#include<algorithm>
#include<stdio.h>
#include<iostream>
#include<string>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<stack>
#include<queue>
#include<list>
#include<deque>
#include<bitset>
#include<map>
#include<utility>
#include<time.h>
//Template V1
#define nl printf("\n")
#define i_ scanf
#define o_ printf
#define in(x) scanf("%d",&x)
#define out(x) printf("%d",x)
#define inll(x) scanf("%I64d",&x)
#define outll(x) printf("%I64d",x)
#define inc(x) scanf("%c",&x)
#define outc(x) printf(x)
#define ins(x) scanf("%s",&x)
#define outs(x) printf("%s",x)
#define loop(var,x,y) for(int var=x;var<y;var++)
#define rloop(var,x,y) for(int var=x-1;var>=y;var--)
#define cins(x) cin>>x
#define couts(x) cout<<x
#define reset(x,y) memset(x,y,sizeof(x));
#define stop fflush(stdin);getchar()
#define PB push_back
#define MP make_pair
#define st first
#define nd second
#define ALL(x) x.begin(),x.end()
#define GOD using
#define BLESS namespace
#define YOU std;

GOD BLESS YOU

typedef long long Int;
typedef vector<int> vi;
typedef vector<vi> vii;

//CODEJAM
inline void OPEN(const string &s) {
freopen((s + ".in").c_str(), "r", stdin);
freopen((s + ".out").c_str(), "w", stdout);
}

int main(){
int n;in(n);
int art;in(art);
int alex;in(alex);
int ans[110]={0};
loop(i,0,art){int temp;in(temp);if(ans[temp]==0)ans[temp]=1;}
loop(i,0,alex){int temp;in(temp);if(ans[temp]==0)ans[temp]=2;}
loop(i,1,n+1){
            if(ans[i]==0)o_("1 ");
            else
            o_("%d ",ans[i]);
}

}

/*
IN THE NAME OF GOD
*/

#include <bits/stdc++.h>
using namespace std;
#define mpr make_pair
#define pb push_back
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define bit __builtin_popcountll
#define MOD 1000000007
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef unsigned long long ull;

int n , a , b , al , ar , arth[101] , alx[101];

int main()
{
    scanf("%d%d%d",&n,&a,&b);

    for(int i = 0; i < a; i++)
    {
        scanf("%d",&ar);
        arth[ar]++;
    }

    for(int i = 0; i < b; i++)
    {
        scanf("%d",&al);
        alx[al]++;
    }

    for(int i = 1; i <= n; i++)
    {
        if(arth[i] && alx[i])
            printf("1 ");
        else if(arth[i])
            printf("1 ");
        else if(alx[i])
            printf("2 ");
    }

    printf("\n");

return 0;
}

#include <bits/stdc++.h>
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
using namespace std;
vector<int>v,f;
int n,m,k,a,j,fl,i,g;
main(){
	cin>>n>>m>>k;
	int a[n];
	for(i=0;i<m;i++){
		cin>>g;
		v.pb(g);
	}
	for(i=0;i<k;i++){
		cin>>g;
		f.pb(g);
	}
	sort(v.begin(),v.end());
	sort(f.begin(),f.end());
	for(i=1;i<=n;i++){
		for(j=0;j<v.size();j++){
			if(i==v[j]){
				fl=1;
				break;
			}
		}
		if(fl==1)a[i]=1;
		else a[i]=2;
		fl=0;

	}
	for(i=1;i<=n;i++){
		cout<<a[i]<<" ";
	}

}

#include<bits/stdc++.h>
using namespace std;

long long int ar[1000];
long long ans[1000][1000];
string asl[1000000];
string st[100];

int main(){
   // freopen("a.in","r",stdin);
    long long n, m,i,j,a,b,c,d,e,f,g,l,h,maxx;
   string s,t,o;
   char ch,ch1;
    double p,y,x,u;
    while(cin>>n>>a>>b){
        memset(ar,0,sizeof(ar));
            for(i=0;i<a;i++){
                cin>>c;
                ar[c]=1;
            }
            for(i=0;i<b;i++){
                cin>>c;
                if(ar[c]==0)
                    ar[c]=2;
            }
            for(i=1;i<=n;i++){
                cout<<ar[i]<<" ";
            }
            cout<<endl;
    }

}

#include <bits/stdc++.h>

#define ld long double
#define ll long long
#define ull unsigned long long
#define F first
#define S second
#define endl '\n'
#define pii pair <ll, ll>
#define pb push_back
#define mp make_pair
#define pi 3.14159265358979323846264
#define y1 abacaba
#define fn "abc"
#define sz(a) (int)(a).size()
#define all(a) (a).begin(), (a).end()
#define Need_For_Speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

const long long MXN = 1e5 + 1;
const long long MOD = 1e9 + 7;

ll n, x, y, a[100001], b[100001];

int main () {

    Need_For_Speed

    cin >> n >> x >> y;
    for (int i = 1; i <= x; i++) {
        cin >> a[i];
    }
    for (int i = 1; i <= y; i++) {
        cin >> b[i];
    }
    for (int i = 1; i <= n; i++) {
        bool ok = 0;
        for (int j = 1; j <= x; j++) {
            if (a[j] == i) {
                cout << 1 << ' ';
                ok = 1;
                break;
            }
        }
        if (ok == 0) {
            cout << 2 << ' ';
        }
    }

    return 0;
 }

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#include <string>

#define loop(i,n) for(int i = 0 ; i < n ; ++ i)
typedef long long ll;
using namespace std;

int main ()
{
	int n, a ,b;
	cin >> n >> a >> b;

	vector<int> a1(a);
	vector<int> a2(b);
	loop(i,a)
		cin >> a1[i];
	loop(i,b)
		cin >> a2[i];

	for (int i=1;i<=n;i++)
	{
		if (find(a1.begin(),a1.end(), i) != a1.end())
			cout << 1 << " ";
		else
			cout << 2 << " ";
	}
}

#include <bits/stdc++.h>
using namespace std;
bool find(int arr[], int n, int x) {
    if (binary_search(arr, arr + n, x)) {
        return true;
    }
    else {
        return false;
    }
}
int main() {
    int p, q, r;
    cin>>p>>q>>r;
    int a[q], b[r];
    for (int i = 0; i < q; i++) {
        cin>>a[i];
    }
    for (int i = 0; i < r; i++) {
        cin>>b[i];
    }
    int c[p + 1] = {0};
    for (int i = 1; i <= p; i++) {
        if (find(a, q, i)) {
            c[i] = 1;
        }
        else {
            c[i] = 2;
        }
    }
    for (int i = 1; i <= p; i++) {
        cout<<c[i]<<" ";
    }
	return 0;
}

/*
---------------------
By : SK
---------------------
*/
#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <sstream>
#include <fstream>
#include <string>
#include <memory>
#include <utility>
#include <ctype.h>
#include <cstdlib>
#include <cassert>
#include <cstring>
using namespace std;
#define MIN(a,b)  (((a)<(b)) ? a : b)
#define MAX(a,b)   (((a)>(b)) ? a : b)
#define SUM(a,b,c)  (a+b+c)
#define MUl(a,b) a*b
#define Div(a,b) a/b
#define LO(i,n)   for(i=0;i<(int)n;i++)
#define LO3(i,a,b)      for(int i=(a);i<=(b);i++)
#define LOS(i,s)    for (int i=0;i<(int)s.size();i++)
#define LO1(i,s)    for (int i=0;i<s.size();i++)
#define LOV(i,v)   for (int i=0;i<v.size();i++)
#define wh(a)   while (a--)
#define EN(n)      cin>>n;
#define EN2(n,m)     cin>>n>>m;
#define EN3(n,m,k)      cin>>n>>m>>k;
#define cout(a,b,c)       cout<<a<<" "<<b<<" "<<c;
#define cout(a,b)   cout<<a<<" "<<b<<endl;
#define cout(a)  cout<<a<<endl;
#define pb push_back
#define c(a,b)  a%=b;
#define d(a,b)  b%=a;
#define GCD(a,b)
#define SORT(v)  sort(v.begin(),v.end())
#define RSORT(v) sort(v.rbegin(),v.rend())
#define SZ(X) (int)(X).size()
#define I  int
#define F  float
#define D  double
#define S  string
#define C  char
#define RETURN  return 0;
#define up ceil
#define down floor
#define N  1000
#define RE(s) freopen(s, "r", stdin)
#define WR(s) freopen(s, "w", stdout)
#define MOD(x,y) fmod(x,y)
#define SUM(v) accumulate(v.begin(),v.end(),0);
typedef long long ll;
typedef vector<ll> integr;
typedef vector<char> character;
typedef vector <string> strings;
//-------------------------------------
int n,a,b;

int main()
{
    //ios::sync_with_stdio(0);
    /* freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
      #ifndef ONLINE_JUDGE
          freopen("test.in", "rt", stdin);
      #endif

      cout.setf(ios::fixed);
      cout.precision(10);
      */

    cin>>n>>a>>b;
  string v="",vv="";
    char a1,b1;
    for (int i=0; i<a; i++)
    {
        cin>>a1;
        v+=a1;
    }
    for (int i=0; i<b; i++)
    {
        cin>>b1;
        vv+=b1;
    }
//    SORT(v);
//    SORT(vv);
   // cout<<v<<" "<<vv<<endl;
  integr res;
   for (int i=0;i<v.size();i++)
   {

       for (int j=0;j<vv.size();j++)
       {
           if (v[i]==vv[j]){ vv.erase(j,1);}
       }
   }
for (int i=0;i<v.size();i++){res.push_back(1);}
for (int i=0;i<vv.size();i++){res.push_back(2);}
n-=(a+b);
if (n>0)
{
    for (int i=0;i<n;i++)
    {
        if (i%2==0)res.push_back(1);
        else res.push_back(2);
    }

}
for (int i=0;i<res.size();i++){cout<<res[i]<<" ";}
    RETURN
}

#include<iostream>

using namespace std;

int n,a,b,t,x[100],y[100],z[100];

int main()
{
    cin>>n>>a>>b;
    for(int i=0;i<a;i++)
    cin>>x[i];
    for(int i =0;i<b;i++)
    cin>>y[i];
    for(int i=0;i<a;i++)
    cout<<"1  ";
    t=n-a;
    for(int i =0;i<a;i++)
    for(int j=0;j<b;j++)
    if(y[j]!=x[i] && t>0)
    {
                       t--;
                      cout<<"2  ";}
        return 0;
}

#include <stdio.h>
#include <string.h>
#include <stack>
#include <deque>
#include <stdlib.h>
#include <math.h>
#include <queue>
#include <limits.h>
#include <time.h>
#include <utility>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
#include <list>
#include <iostream>
using namespace std;
#define rookloop() for(int li=0;li<4;li++)
#define knightloop() for(int li=0;li<8;li++)
#define kingloop() for(int li=0;li<8;li++)
//int dx[]={1,-1,0,0},dy[]={0,0,1,-1}; // for left right up down move
//int dx[]={1,1,1,-1,-1,-1,0,0},dy[]={0,1,-1,0,1,-1,1,-1}; // for king move
//int dx[]={1,1,-1,-1,-2,-2,2,2},dy[]={2,-2,-2,2,1,-1,1,-1}; // for knight move
#define scI(a) scanf("%d",&a)
#define scL(a) scanf("%lld",&a)
#define scD(a) scanf("%lf",&a)
typedef long long L;
typedef unsigned long long uL;
//this function is for Prime Numbers.R__PrimeList vector contains prime numbes upto R__MaximumForPrime.R__PrimeDetectArr is used
//for a number is prime or not.if a number is prime than R__PrimeDetectArr array contains in that position 'P'.
/*int R__MaximumForPrime=2000000;char R__PrimeDetectArr[100000000+1];vector <int> R__PrimeList;
void R__Sieve(){R__PrimeDetectArr[2]='P';R__PrimeList.push_back(2);for(L r_ip01=3;r_ip01<=R__MaximumForPrime;r_ip01=r_ip01+2){if(R__PrimeDetectArr[r_ip01]==0){R__PrimeDetectArr[r_ip01]='P';R__PrimeList.push_back(r_ip01);for(L r_jp01=r_ip01*r_ip01;r_jp01<=R__MaximumForPrime;r_jp01=r_jp01+r_ip01) R__PrimeDetectArr[r_jp01]='1';}}}*/
//Euler Toitent Phi Function; suppose A=12;how many number 1 to A that gcd(A,number)=1;the answer give us R__Phi
//for the function must call R__Sieve();then call R__Euler_Toitent_Phi1();
/*vector <int> R__Phi;
void R__Euler_Toitent_Phi1(){for(int r_ip01=0;r_ip01<=R__MaximumForPrime;r_ip01++) R__Phi.push_back(r_ip01);R__Phi[1]=1;for(int r_ip01=0;r_ip01<R__PrimeList.size();r_ip01++){for(int r_jp01=R__PrimeList[r_ip01];r_jp01<=R__MaximumForPrime;r_jp01=r_jp01+R__PrimeList[r_ip01])R__Phi[r_jp01]=R__Phi[r_jp01]-R__Phi[r_jp01]/R__PrimeList[r_ip01];}}*/
//Extend Euclid - ax+by=gcd(a,b)=d;parameter pass a,b,d,x,y;so you get result in x,y,d variable;
void R__Extend_Euclid(L a,L b,L &d,L &x,L &y){if(!b) {x=1,y=0,d=a;}else R__Extend_Euclid(b,a%b,d,y,x),y-=(a/b)*x;}
template <class R> string R__MonthName(R name){string mon[15];mon[1]="January";mon[2]="February";mon[3]="March";mon[4]="April";mon[5]="May";mon[6]="June";mon[7]="July";mon[8]="August";mon[9]="September";mon[10]="October";mon[11]="November";mon[12]="December";return mon[name];}
template <class R> R R__MonthDay(R num){R month[13];month[1]=31;month[2]=28;month[3]=31;month[4]=30;month[5]=31;month[6]=30;month[7]=31;month[8]=31;month[9]=30;month[10]=31;month[11]=30;month[12]=31;return month[num];}
template <class R> R R__GCD(R a,R b){if(a==0&&b==0) return 0;if(a==0) return 1;if(b==0) return a;else return R__GCD(b,a%b);}
template <class R> R R__LCM(R a,R b){return (a*b)/R__GCD(a,b);}
template <class R> R R__POW( R a, R b){if(b==0) return 1; R x=a;for(R i=2;i<=b;i++) a=a*x;return a;}
template <class R> R R__Josephus(R n,R k){R ans=1;for(R i=2;i<=n;i++)ans=(ans+k-1)%i+1;return ans;}
template <class R> R R__BigMod(R a,R b,R c){if(a==0) return 0;if(b==0) return 1;if(b%2==0){R x=R__BigMod(a,b/2,c)%c;return (x*x)%c;}else return  ((a%c)*R__BigMod(a,b-1,c)%c)%c;}
template <class R> R R__Factorial(R a){R b=1;for(R i=1;i<=a;i++)b=b*i;return b;}
template <class R> R R__BinarySearch(R a[],R l,R h,R n){while(l<=h){R m=(l+h)/2;if(n<a[m])h=m-1;else if(n>a[m])l=m+1;else return m;} return -1;}
//In R__InverseMod two arguments a and b must be coprime
template <class R> R R__InverseMod(R a,R b){if(b==1) return 1;R b0=b,x0=0,x1=1;while(a>1){R temp = x0;x0=x1-(a/b)*x0;x1=temp;temp=b;b=a%b;a=temp;}if(x1<0) x1=x1+b0;return x1;}
template <class R> R R__Euler_Toitent_Phi2(R a){R result = a;for(R i=2;i*i<=a;i++){if(a%i==0) result=result-result/i;while(a%i==0) a=a/i;}if(a>1) result=result-result/a;return result;}
int main()
{
    //time_t t1=clock();
    //freopen("input.txt","r",stdin);//freopen("output.txt","w",stdout);
    int a,b,x,res[100+10],n,y;
    while(cin>>n>>a>>b)
    {
        for(int i=1;i<=a;i++)
        {
            cin>>x;
            res[x]=1;
        }
        for(int i=1;i<=b;i++)
        {
            cin>>y;
            if(res[y]!=1)res[y]=2;
        }
        for(int i=1;i<=n;i++)
        {
            cout<<res[i];
            if(i!=n)cout<<" ";
        }
        cout<<"\n";

    }

    //time_t t2=clock();
    //cout<<(t2-t1);
    return 0;
}

// test3.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <string>

using namespace std;

int main()
{
    //char test[100100];
	int i,len;
	bool flag=false;
	string str;
	cin>>str;
	len=str.length();
	//for(i=0;i<len;i++)
      // test[i]=str.substr(i,1);
	if(len%2==0)
	{
		for(i=0;i<len/2;i++)
        {
			if(str.substr(i,1)==str.substr(len-i-1,1)){
			  flag=1;
			}
			else{
				flag=0;
				break;
			}
		}
	}
	else{
	  for(i=0;i<len/2;i++)
        {
			if(str.substr(i,1)==str.substr(len-i-1,1)){
			  if(str.substr((len-1)/2,1)=="A"||str.substr((len-1)/2,1)=="H"||str.substr((len-1)/2,1)=="I"||str.substr((len-1)/2,1)=="M"||str.substr((len-1)/2,1)=="O"||str.substr((len-1)/2,1)=="T"||str.substr((len-1)/2,1)=="U"||str.substr((len-1)/2,1)=="V"||str.substr((len-1)/2,1)=="W"||str.substr((len-1)/2,1)=="X"||str.substr((len-1)/2,1)=="Y")
			  {
				  flag=1;
			  }
			  else
			  {
				  flag=0;
				  break;
			  }
			}
			else{
				flag=0;
				break;
			}
		}
	}

	if(flag==1){
		cout<<"YES";
        return 0;
	}
	else{
		cout<<"NO";
	    return 0;
	}
}

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <math.h>
#include <cmath>
#include <sstream>
#include <queue>
#include <string>

#define MAXN 1000000+99
#define ll long long
using namespace std;
ll int arr[MAXN];

int main()
{

	ll int n,a,b,m,d;
	cin >> n >>a>> b;
	for (int i = 0; i < n; i++)
		 arr[i]=i;
	for (int i = 0; i < a; i++)
	{
		cin >> m;
		arr[m - 1] = 1;
	}
	for (int i = 0; i < b; i++)
	{
		cin >> d;
		if (arr[d - 1] != 1)
		arr[d - 1] = 2;
	}
	for (int i = 0; i < n; i++)
		cout << arr[i] << " ";
	return 0;

}

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b;
cin>>n>>a>>b;
int ans[n];
int one[a];
int two[b];
for(int i=0;i<a;i++){
    cin>>one[i];
}
for(int i=0;i<b;i++){
    cin>>two[i];
}
for(int i=0;i<n;i++){
    ans[i]=2;
}
for(int i=0;i<a;i++){
    ans[i]=1;
}
for(int i=0;i<n;i++){
    cout<<ans[i]<<" ";
}

}

#include <iostream>
#include<vector>
using namespace std;
int main()
{
    int n,m,k;cin>>k>>n>>m;vector<int>v(k);int a;
    for(int i=0;i<n;i++){cin>>a;if(v[a-1]==0)cout<<1<<" ",v[a-1]=1;}
    for(int i=0;i<m;i++){cin>>a;if(v[a-1]==0)cout<<2<<" ",v[a-1]=1;}
    return 0;
}

/**
 *    author:  datastorm
 *    created: 2020-04-09-22.12.07
**/
#include <bits/stdc++.h>
using namespace std;
int main()
{
    // two magical lines to speed up IO
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[a],z[b],i,j,r[n];
    std::fill_n(r, n, 1);
    for(i=0;i<a;i++)
        cin>>y[i];
    for(i=0;i<b;i++)
        cin>>z[i];
    for(i=0;i<b;i++)
    {
        r[z[i]]=2;
    }
    for(i=0;i<n;i++)
        cout<<r[i]<<" ";
}

#include <iostream>

int main(){
	int n, a, b;
	bool A = false;

	std::cin >> n >> a >> b;
	int art[a];
	int alex[b];

	for(int i = 0; i < a; i++){
		std::cin >> art[i];
	}

	for(int i = 0; i < b; i++){
		std::cin >> alex[i];
	}

	for (int i = 1; i <= n; i++){
		A = false;
		for (int j = 0; j < a; j++){
			if(i == art[j] && i <= a){
				A = true;
			}
		}
		if(A){
			std::cout << 1 << " ";
		}else{
			std::cout << 2 << " ";
		}
	}

	std::cout << std::endl;

	return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define double long double
#define int long long
#define vec vector
#define pb push_back
#define unset unordered_set
#define ii pair<int, int>
#define X first
#define Y second
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define FORE(i, a, b) for(int i = (a); i <= (b); i++)
#define FORD(i, a, b) for(int i = (a); i >= (b); i--)
#define INPUT_FILE false
#define IF_FILE if(INPUT_FILE)
template <typename T,typename U>
std::pair<T,U> operator+(const std::pair<T,U> & l,const std::pair<T,U> & r) {
  return {l.first+r.first,l.second+r.second};
}
typedef void (*callback_function)(void); // type for conciseness
const long long INF64 = 1e18;
const int INF32 = 1e9;

bool visited[102];

#undef int
int main() {
#define int long long
	ios_base::sync_with_stdio(false);
	cin.tie();
  IF_FILE {
    freopen("??.in", "r", stdin);
    cerr << "Remember to switch INPUT_FILE off before submitting!"
      << endl << endl;
    freopen("??.out", "w", stdout);
  }
  auto beginProgram = chrono::steady_clock::now();

  {// Code goes here
    int n, a, b;
    cin >> n >> a >> b;
    int aa[a], bb[b];
    FOR(i, 0, a) {
      cin >> aa[i];
      if (!visited[aa[i]]) {
        visited[aa[i]] = true;
        cout << 1 << ' ';
      }
    }
    FOR(i, 0, b) {
      cin >> bb[i];
      if (!visited[bb[i]]) {
        visited[bb[i]] = true;
        cout << 2 << ' ';

      }
    }
    cout << endl;
  }

  IF_FILE {
    auto endProgram = chrono::steady_clock::now();
    cerr << "Elapsed time (ms): "
          << chrono::duration_cast<chrono::milliseconds>
              (endProgram - beginProgram).count() << endl;
    system("gnome-open ??.in");
    system("gnome-open ??.correct");
    system("gnome-open ??.out");
    fstream myAns("??.out");
    fstream correctAns("??.correct");
    string myLine, correctLine;
    int lineIndex = 1;
    bool moreMyAns, moreCorrectAns;
    moreMyAns = (bool)getline(myAns, myLine);
    moreCorrectAns = (bool)getline(correctAns, correctLine);
    while (moreMyAns && moreCorrectAns) {
      cerr << lineIndex++ << "\t"
        << (myLine == correctLine ? "ok" : "WRONG") << endl;
      moreMyAns = (bool)getline(myAns, myLine);
      moreCorrectAns = (bool)getline(correctAns, correctLine);
    }
    if (moreMyAns) {
      cerr << "ERROR: My answer is too long! Excessive lines:" << endl;
      do {
        cerr << lineIndex++ << "\t"<< myLine << endl;
      } while (getline(myAns, myLine));
    } else if (moreCorrectAns) {
      cerr << "ERROR: My answer is too short! Missing lines:" << endl;
      do {
        cerr << lineIndex++ << "\t" << correctLine << endl;
      } while (getline(correctAns, correctLine));
    }
    myAns.flush();
    myAns.close();
    correctAns.flush();
    correctAns.close();
  }
  return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int a1[a];
    int b2[b];
    int sul[n];
    bool t=false;
    for(int i=0;i<a;i++){
        cin>>a1[i];
    }
    for(int i=0;i<b;i++){
        cin>>b2[i];
    }

    for(int i=1;i<=n;i++){

        for(int j=0;j<a;j++){
            if(i==a1[j]){
                t=true;
       }

     }
 if(t==true){
         cout<<1;
            t=false;
       }
       else cout<<2;
    }
    return 0;
}

/*Bismillahir Rahmanir Rahim*/
#include<bits/stdc++.h>
using namespace std;
#define sf scanf
#define pf printf

#define sf1(a)			scanf("%d",&a);
#define sf2(a,b)		scanf("%d%d",&a,&b);

#define lli				long long int

#define fin             freopen("input.txt","r",stdin);
#define fout            freopen("output.txt","w",stdout);

int main()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	int n,a,b,x;
	cin >> n >> a >> b;
	bool ar[n];
	for(int i=0;i<a;i++){
		cin >> x;
		ar[x-1]=true;
	}
	for(int i=0;i<b;i++) cin >> x;
	for(int i=0;i<n;i++) {
		(ar[i]==1)?cout << 1 << " " : cout << 2 << " ";
	}

	return 0;
}

#include<bits/stdc++.h>
//#include<ext/pb_ds/priority_queue.hpp>
#define f first
#define s second
using namespace std;
//using namespace __gnu_pbds;
typedef std::pair<int,int> par;
int A[105],B[105];
int main(){
    int n,a,b;
    scanf("%d%d%d",&n,&a,&b);
    int tmp;
    for(int i=0;i<a;i++)
        scanf("%d",&A[i]);
    for(int i=0;i<b;i++)
        scanf("%d",&tmp),B[tmp]=1;
    int x=0;
    for(int i=0;i<a;i++){
        if(B[n-A[i]]){
            for(int j=0;j<A[i];j++){
                printf("1 ");
                }
            for(int j=0;j<n-A[i];j++){
                printf("2 ");
                }
            return 0;
            }
        }
    return 0;
    }

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>
#define LL long long
using namespace std;
const int maxn=111;
int a[maxn],b[maxn];
int x,y;
int n;
int vis[maxn];
int main()
{
    freopen("G:\\in.txt","r",stdin);
    int cnt=0;
    while(cin>>n>>x>>y)
    {
        memset(vis,0,sizeof(vis));
        cnt=0;
        for(int i=0;i<x;i++)
            cin>>a[i];
        for(int i=0;i<y;i++)
            cin>>b[i];
           vis[a[0]]=1;
           printf("%d",1);
           for(int i=1;i<x;i++)
           {
               printf(" %d",1);
               vis[a[i]]=1;
               cnt++;
           }
           for(int i=0;i<y;i++)
           {
               if(!vis[b[i]])
               {
                    printf(" %d",2);
                    cnt++;
               }

           }
           if(cnt<n)
           {
               for(int i=1;i<n-cnt;i++)
                printf(" 2");
           }
           printf("\n");
    }
    return 0;
}

#include <iostream>

using namespace std;

int a[105], b[105], final[105], x, y, i, j, k, l, counter = 0, n;

int main()
{
	cin >> n >> x >> y;

	for (i = 0; i<x; i++)
	{
		cin >> a[i];
	}

	for (i = 0; i<y; i++)
	{
		cin >> b[i];
	}

	for (i = 0; i<n; i++)
	{
		final[i] = 2;
	}

	for (i = 0; i<x; i++)
	{
		final[a[i - 1]] = 1;
	}

	for (i = 0; i<n; i++)
	{
		cout << final[i] << " ";
	}

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,a,b,i,j,arr[100],ar[100],ap[100];
    cin>>n>>a>>b;
    for(int i=0;i<a;i++)
        cin>>arr[i];
    for(int i=0;i<b;i++)
        cin>>ar[i];
    for(int i=0;i<a;i++){
        ap[arr[i]]=1;
    }
    for(i=0;i<n;i++){
        if(ap[i]==1){

        }
        else
            ap[i]=2;
    }
    for(i=0;i<n;i++)
        cout<<ap[i]<<"\n";

}

#include<bits/stdc++.h>
using namespace std;
int main()
{     int n,a,b;
      cin>>n>>a>>b;
      int aa[a],bb[b];
     for(int i=0;i<a;i++)
        cin>>aa[i];
     for(int i=0;i<b;i++)
        cin>>bb[i];
      for(int i=0;i<a;i++)
	     cout<<1<<" ";
	    if(a!=n)
	        {   for(int i=0;i<n-a;i++)
	              cout<<2<<" ";
			}

}

#include <iostream>

using namespace std;

int main()
{
    int app,ar,al;
    cin>>app>>ar>>al;
    int *arp;arp=new int[ar];int *appa;appa=new int[app];
    int *alp=new int[al];
    int arf=0,alf=0;
    for(int i=0;i<ar;i++){
      cin>>arp[i];
    }
      for(int i=0;i<al;i++){
      cin>>alp[i];
    }int j=1;
    for(int i=0;i<app;i++){
      appa[i]=j++;
    }

    for(int i=0;i<app;i++){
      for(int j=0;j<ar;j++){
        if(appa[i]==arp[j]){appa[i]=121;arf++;cout<<"1 ";}
      }
    }
        for(int i=1;i<app;i++){
      for(int j=0;j<al;j++){
        if(appa[i]==alp[j]){alf++;cout<<"2 ";}
      }
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int s[110];
    int i,n,k,x,y;
    memset(s,0,sizeof(s));
    scanf("%d%d%d",&n,&k,&x);
    for(i=1;i<=n;i++)
    {
        s[i]=1;
    }
    for(i=0;i<k;i++)
    {
        scanf("%d",&y);
        if(s[y]==1)
        {
            s[y]=0;
            printf("1");
            if(i<k-1)
            {
                printf(" ");
            }
        }
    }
    printf(" ");
    for(i=0;i<x;i++)
    {
        scanf("%d",&y);
        if(s[y]==1)
        {
            s[y]=0;
            printf("2");
            if(i<x-1)
            {
                printf(" ");
            }
        }
    }
    printf("\n");
    return 0;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    string s,t;
    cin>>s;
    int n=s.length();
    t=s;
    for(int i=0;i<n;i++)
        t+=s[n-i-1];
    cout<<t;
    return 0;
}

#include <iostream>

using namespace std;

int main(){
    int n, a, b;
    cin >> n >> a >> b;
    int arr[a], arr2[b], arr3[n];
    for(int i = 0; i < a; i++ ){
        cin >> arr[i];
    }
    for(int i = 0; i<b; i++){
        cin >> arr2[i];
    }
    //vashlebi
    for(int i = 0; i<n; i++){
         arr3[i] = i+1;
    }

    int udidesi;
    if(a>=b){
        udidesi = a;
    }
    else {
        udidesi = b;
    }

    int result[n];
    for(int i = 0; i<n; i++){
        for(int j = 0; j<udidesi; j++){
            if(j<=a && arr3[i]==arr[j]){
                result[i]=1;
                break;
            }
            if(j<=b && arr3[i]==arr2[j]){
                result[i]=2;
                break;
            }
        }
    }

    //result
    for(int i = 0; i<n; i++){
        cout << result[i];
    }
}

#include<bits/stdc++.h>
using namespace std;

int main(){
   int n,a,b,i,j;
   cin>>n>>a>>b;
   int arr[a],arra[b],array[n];
   for(i=0;i<a;i++)
   {
       cin>>arr[i];
   }
   for(i=0;i<b;i++)
   {
       cin>>arra[i];
   }
    for(i=0;i<a;i++)
    {
        for(j=0;j<b;j++)
        {
            if(arr[i]==arra[j])
            {
                array[arr[i]-1]=1;
            }
            else
            {
                array[arr[i]-1]=1;
            }
        }
    }
    for(i=0;i<n;i++)
    {
        if(array[i]!=1)
        {
            array[i]=2;
        }
    }
    for(i=0;i<n;i++)
    {
        cout<<array[i]<<" ";
    }
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    int n,i,k1,k2,x;
    int a[100];
    cin >> n >> k1 >> k2;
    for(i=1;i<=k1;++i)
    {
        cin >>x;
        a[x]=1;
    }
    for(i=1;i<=k2;++i)
    {
        cin>>x;
        if (a[x]!=1)
        {
            a[x]=2;
        }
    }
   for(i=1;i<=n;++i)
    {
        cout<<a[i] << ' ';
    }

    return 0;
}

#include <iostream>
#include <math.h>
#include <algorithm>
#include <unordered_map>
#include <cctype>
#include <vector>
#include <climits>

using namespace std;

int main() {
	int n, a, b, x;
	cin >> n >> a >> b;
	int res[n];
	for(int i = 0; i < a; i++) {
		cin >> x;
		res[x] = 1;
	}
	for(int i = 0; i < b; i++) {
		cin >> x;
		res[x] = 2;
	}
	for(int i = 0; i < n; i++)
		cout << res[i] << " ";
}

#include <bits/stdc++.h>
#define ll long long
#define E "\n"
#define F first
#define S second
#define P push_back
using namespace std;
int main()
{
    int n,a,b,h;
    bool c=0;
    scanf("%d%d%d",&n,&a,&b);
    int ar[a+1];
    for(int i=1;i<=a;scanf("%d",&ar[i++]));
    sort(ar+1,ar+a+1);
    for(int i=1,j=1;i<=n;i++)
    {
        if(ar[j]==i)
        {
            printf("1");
            j++;
        }
        else
            printf("2");
        printf(i==n?E:" ");
        if(j>a && i!=n)
        {
            c=1;
            for(int k=j;k<=n;k++)
            {
                printf("2");
                printf(k==n?E:" ");
                i++;
            }
        }
        if(c==1)
            break;
    }
	return 0;
}

#include <iostream>
using namespace std;

int main() {
    int n,a,b;
    cin >> n >> a >> b;
    int c[n+1];
    for(int x=1; x<=n; x++) c[x]=0;
    for(int x=0; x<a; x++) {
        int t; cin >> t;
        if(!c[t]) {
            cout << 1 << " ";
            c[t]=1;
        }
    }
    for(int x=0; x<b; x++) {
        int t; cin >> t;
        if(!c[t]) {
            cout << 2 << " ";
            c[t]=1;
        }
    }
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int ar[101];
    vector<int>ans;
    int n,b,a;
    cin>>n>>a>>b;
    set<int>s1;
    set<int>s2;
    while(a--)
    {
        int tmp;
        cin>>tmp;
        s1.insert(tmp);
    }
    while(b--)
    {
        int tmp;
        cin>>tmp;
        s2.insert(tmp);
    }
    for(int i=1; i<=n; i++)
        ar[i]=i;
    for(int i=1; i<=n; i++)
    {
        if(s1.find(ar[i])!=s1.end())
        {
            ans.push_back(1);
            s2.erase(ar[i]);
        }
    }
    for(int i=1;i<=n;i++)
    {
        if(s2.find(ar[i])!=s2.end())
        {
           ans.push_back(2);
        }
    }
    for(auto e:ans)
        cout<<e<<" ";
    int tmp=n-ans.size();
    while(tmp--)
    {
        cout<<2<<" ";
    }
    return 0;
}

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n,a,b,i,k;
	cin>>n>>a>>b;
	int p[n+1]={0};
	for(i=0;i<a;i++)
	{
		cin>>k;
		p[k]+=1;
	}
	for(i=0;i<b;i++)
	{
		cin>>k;
		p[k]+=1;
	}
	for(i=1;i<=n;i++)
	{
	   if((p[i]==1)||(p[i]==2))
		 cout<<"1"<<" ";
		else
		cout<<"2"<<" ";
	}
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,a,b,c;
	cin>>n>>a>>b;
	bool j[200];
	for(int i=0;i<a;i++) cin>>c,j[c]=1;
	for(int i=0;i<b;i++) cin>>c;
	for(int i=1;i<=n;i++) cout<<(j[i]?1:2)<<' ';
	return 0;
}

#include<iostream>
using namespace std;

int main()
{
    int n,a,b,ar[100],br[100],i,j,k;
    cin>>n>>a>>b;
    for(i=0;i<a;i++)
    {
        cin>>ar[i];
    }
    for(i=0;i<b;i++)
    {
        cin>>br[i];
    }
    for(j=1;j<=n;j++)
    {for(i=0,k=0;i<n,k<n;i++,k++) {if(ar[i]==j){cout<<1<<" ";break;}
       if(br[k]==j){cout<<2<<" ";break;}

    }
}
}

#include <iostream>
#include<vector>
using namespace std;
int main()
{
    int n,m,k;cin>>k>>n>>m;vector<int>v(k);int a;
    for(int i=0;i<n;i++){cin>>a;if(v[a-1]==0)cout<<1<<" ",v[a-1]=1;}
    for(int i=0;i<m;i++){cin>>a;if(v[a-1]==0)cout<<2<<" ",v[a-1]=1;}
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define LL long long

int main()
{
    LL n,a,b,k,i;
    while(cin>>n>>a>>b)
    {
        for(i=0;i<a;i++) cin>>k;
        for(i=0;i<b;i++) cin>>k;
        for(i=0;i<n;i++) cout<<1<<" "; puts("");
    }
    return 0;
}

#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll=long long;
int main() {
    ios::sync_with_stdio(0), cin.tie(0);

    int n, a, b;
    cin>>n>>a>>b;
    int x;
    for(int i=0;i<a+b;++i) cin>>x;
    for(int i=0;i<min(a, n);++i) cout<<"1 ";
    for(int i=0;i<n-min(a, n);++i) cout<<"2 ";

    return 0;
}

//Author��CY
//School: CUST

#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<vector>
#include<cmath>
#include<stdlib.h>
#include<iomanip>
#include<list>
#include<deque>
#include<map>
#include <stdio.h>
#include <deque>
#define inf 1<<30
using namespace std;
int num[150];
int main()
{
    int n,a,b;
    int i,j,k;
    cin>>n>>a>>b;
    memset(num,0,sizeof(num));
    for(i=1;i<=a;i++)
    {
        int temp;
        cin>>temp;
        num[temp]=1;
    }
    for(i=1;i<=b;i++)
    {
        int temp;
        cin>>temp;
        if(num[temp]==0)
        {
            num[temp]=2;
        }
    }
    for(int i=1;i<n;i++)
    {
        if(num[i]==1)
        {
            cout<<1<<" ";
        }
        else

        {
            cout<<2<<" ";
        }
    }
    if(num[i]==1)
    {
        cout<<1<<endl;
    }
    else
    {
        cout<<2<<endl;
    }
    return 0;
}

#include <queue>
#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <algorithm>
#include <bitset>
#include <cstdlib>
#include <list>
#include <stack>
#include <deque>
#include <cmath>
#include <string>
#include <string.h>
#include <iomanip>
#include <sstream>
#include <set>
using namespace std;
#define rep(i,n)        for(int i = 0;  i < n ; ++i)
#define REP(i,a,b)      for(int i = a ; i <= b; ++i)
#define s(n)            scanf("%d",&n)
#define rev(i,n)        for(int i = n ; i >= 0 ; --i)
#define REV(i,a,b)      for(int i = a ; i >= b ; --i)
#define INF             1000000000
#define pp              pair<int,int>
#define pb(a)           push_back(a)
#define ll              long long
#define vi              vector<int>
#define mii             map<int,int>
#define msi             map<string,int>
#define vii             vector<vector<int> >
#define vpp             vector<pair<int,int> >
#define MOD             1000000007
#define pdd             pair<double,double>
#define SIZE            92

int main()
{
     nan ;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pi atan(1.0)*4
#define pb push_back
#define in(x) insert(x)
#define fl(x,y) for(ll i=x;i<y;i++)
#define vi vector<long long>
#define vs  vector<string>
#define vp(vi,x) cin>>x; vi.pb(x);
string en="\n";
string hlo="hello";
string Y="YES\n";
string Ys="Yes\n";
string N="NO\n";
string No="No\n";
#define E end()
#define B begin()
#define sz size()
#define EM empty()
#define fi first
#define se second
#define clr clear()
#define sqr(a) (a*a)
#define mk make_pair
#define mem(a,b) memset(a,b,sizeof(a))
#define all(cont) cont.begin(),cont.end()
bool isprm(ll a){for(ll i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
/*bool palin(string a){for(int i=0;i<a.sz;i++){if(a.at(i)!=a.at(a.sz-i-1))return 0;} return 1;}
bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}
int toInt(string s){int sm;stringstream ss(s);ss>>sm;return sm;}
LL bpow(LL a,LL b){if(b==0)return 1;LL r=bpow(a,b/2);if(b%2)return r*r*a;else return r*r;}
LL binpow(LL a,LL b){LL r=1;while(b>0){if(b&1)r=r*a;a=a*a;b>>=1;}return r;}
LL binpow(LL a,LL b,LL m){a%=m;LL r=1;while(b>0){if(b&1) r=r*a%m;a=a*a%m; b>>=1;}return r;}
template<typename T>inline T gcd(T a,T b){if(a<0)return gcd(-a,b);if(b<0)return gcd(a,-b);return (b==0)?a:gcd(b,a%b);}
template<typename T>inline T lcm(T a,T b) {if(a<0)return lcm(-a,b);if(b<0)return lcm(a,-b);return a*(b/gcd(a,b));}
*/
//bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}

int main()
{
    ll a,b,c,d,e,x,t,n,m,p,q,r,y,yy,sum=0,ct=0,flag=0;
    string s,s1,s2,s3,s4;
    char ch;
    deque<char>d1,d2,d3;
    vector<ll>v1,v2,v3;
    map<ll,ll>mp;
    map<ll,ll>::iterator it;
    set<char>st1,st2;
    //set<ll>::iterator iter = st.begin();
    vector<pair<ll,ll> >v;
    double x1,y1,x2,y2,x3,y3,x4,y4;
    cin>>m>>a>>b; sum=0; ll mx=0,mn,cp=0;
    for(ll i=0;i<a;i++)
    {
       cin>>x; v1.pb(x);
    }
    for(ll i=0;i<b;i++)
    {
       cin>>x; v2.pb(x);
    }
    for(ll i=0;i<m;i++)
    {
       if(i<a) cout<<1<<" ";
       else cout<<2<<" ";
    }
    cout<<endl;
}

#include <iostream>
using namespace std;

int main() {
	int n,a,b;
	cin>>n>>a>>b;
	int c[n],d[a],e[b];
	for(int i=0;i<a;i++)
	{
		cin>>d[i];
		c[d[i]-1]=1;
	}
	for(int i=0;i<b;i++)
	{
		cin>>e[i];
		if(c[e[i]-1]!=1)
		c[e[i]-1]=2;
	}
	for(int i=0;i<n;i++)
	{
		cout<<c[i]<<" ";
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n , a , b , arr[101];
      scanf ("%d%d%d",&n, &a ,&b);
         int alex[b] , au[a];
        for (int i=1;i<=a;i++) {
            cin >> au[i];
            arr[au[i]] = 1;
            }
        for (int i=a;i<=n;i++) {
            cin >> alex[i];
              if (arr[alex[i]]==1)
            arr[alex[i]] = 1;
            else
                arr[alex[i]] = 2;
             }

            for (int i=1;i<=n;i++) {
                cout << arr[i] << " ";
            }
         return 0;
 }

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here

	int n,i,j,a,b;
	cin>>n>>a>>b;
	int p[n+1]={0};
	int x[a],y[b];
	for(i=0;i<a;i++)
	cin>>x[i];
	for(i=0;i<b;i++)
	cin>>y[i];

	for(i=0;i<a;i++)
	{
	    if(p[x[i]]==0)
	    {
	        p[x[i]]=1;

	    }
	}
	for(i=0;i<b;i++)
	{
	    if(p[y[i]]==0)
	    {
	        p[y[i]]=2;

	    }
	}
	sort(p,p+n+1);

	for(i=1;i<n+1;i++)
	cout<<p[i];

	return 0;
}

/*
---------------------
By : SK
---------------------
*/
#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <sstream>
#include <fstream>
#include <string>
#include <memory>
#include <utility>
#include <ctype.h>
#include <cstdlib>
#include <cassert>
#include <cstring>
using namespace std;
#define MIN(a,b)  (((a)<(b)) ? a : b)
#define MAX(a,b)   (((a)>(b)) ? a : b)
#define SUM(a,b,c)  (a+b+c)
#define MUl(a,b) a*b
#define Div(a,b) a/b
#define LO(i,n)   for(i=0;i<(int)n;i++)
#define LO3(i,a,b)      for(int i=(a);i<=(b);i++)
#define LOS(i,s)    for (int i=0;i<(int)s.size();i++)
#define LO1(i,s)    for (int i=0;i<s.size();i++)
#define LOV(i,v)   for (int i=0;i<v.size();i++)
#define wh(a)   while (a--)
#define EN(n)      cin>>n;
#define EN2(n,m)     cin>>n>>m;
#define EN3(n,m,k)      cin>>n>>m>>k;
#define cout(a,b,c)       cout<<a<<" "<<b<<" "<<c;
#define cout(a,b)   cout<<a<<" "<<b<<endl;
#define cout(a)  cout<<a<<endl;
#define pb push_back
#define c(a,b)  a%=b;
#define d(a,b)  b%=a;
#define GCD(a,b)
#define SORT(v)  sort(v.begin(),v.end())
#define RSORT(v) sort(v.rbegin(),v.rend())
#define SZ(X) (int)(X).size()
#define I  int
#define F  float
#define D  double
#define S  string
#define C  char
#define RETURN  return 0;
#define up ceil
#define down floor
#define N  1000
#define RE(s) freopen(s, "r", stdin)
#define WR(s) freopen(s, "w", stdout)
#define MOD(x,y) fmod(x,y)
#define SUM(v) accumulate(v.begin(),v.end(),0);
typedef long long ll;
typedef vector<ll> integr;
typedef vector<char> character;
typedef vector <string> strings;
//-------------------------------------
int n,a,b;

int main()
{
    //ios::sync_with_stdio(0);
    /* freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
      #ifndef ONLINE_JUDGE
          freopen("test.in", "rt", stdin);
      #endif

      cout.setf(ios::fixed);
      cout.precision(10);
      */

    cin>>n>>a>>b;
  string v="",vv="";
    char a1,b1;
    for (int i=0; i<a; i++)
    {
        cin>>a1;
        v+=a1;
    }
    for (int i=0; i<b; i++)
    {
        cin>>b1;
        vv+=b1;
    }
//    SORT(v);
//    SORT(vv);
   // cout<<v<<" "<<vv<<endl;
    string res="";
   for (int i=0;i<v.size();i++)
   {

       for (int j=0;j<vv.size();j++)
       {
           if (v[i]==vv[j]){ vv.erase(j,1);}
       }
//       if (ok==1){res+='1'; res+=' ';}
       //res+='1'; res+=' ';
   }
for (int i=0;i<v.size();i++){res+='1'; res+=' ';}
for (int i=0;i<vv.size();i++){res+='2'; res+=' ';}
    cout<<res<<endl;

    RETURN
}

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>

#define ll long long
#define ld long double
#define endl "\n"
#define fi first
#define se second
#define y1 sadjfskldf
#define p_b push_back
#define sqr(asdf) ((asdf) * (asdf))
#define all(psdp) psdp.begin(), psdp.end()
using namespace std;
using namespace __gnu_pbds;

const ll N = 1e5 + 200;
const ll MOD = 1e9 + 7;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

ll n,d,a[N],ans,p[N],x,m,m1;

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin>>n>>m>>m1;
    while(m--)
    {
        cin>>x;
        p[x] = 1;
    }
    cin>>m1;
    while(m1--)
    {
        cin>>x;
        p[x] = 2;
    }
    for(int i = 1; i <= n; i++) cout<<p[i]<<" ";
    return 0;

}

#include<bits/stdc++.h>

using namespace std;

typedef long long int lld;
typedef long double lf;
typedef vector<lld> vll;

#define all(v) ( v.begin() ),( v.end() )
#define pb push_back
//#define pop pop_back()

#define mp make_pair
#define fr(b , e) for(int i=b ; i<e ; i++)
const int M = 1e5+5;

bool isodd(lld x){ return x%2; }
int arr[M];
int n ,a ,b ,tmp;
vector<int>v;
int main()
{
    scanf("%d%d%d" , &n ,&a ,&b);
    fr(0 , a+b){
        scanf("%d" , &tmp);
        if(i < a)
            v.pb(1);
        else{
            if(arr[tmp] == 0)
                v.pb(2);
        }
        arr[tmp]++;
    }

    fr(0 ,v.size()){
        if(i) cout<<" ";
        cout<<v[i];
    }

    return 0;
}

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int a1[a],b1[b];
    int arr[n+1];
    memset(arr,0,sizeof(arr));
    for(int i=0;i<a;i++)
    {
    cin>>a1[i];
    arr[a1[i]]=1;
    }
    for(int j=0;j<b;j++)
    {
    cin>>b1[j];
    if(arr[b1[j]]==0)
    arr[b1[j]]=2;
    }
    for(int i=1;i<=n;i++)
    cout<<arr[i];
    return 0;
}

#include <iostream>
#include<algorithm>
using namespace std;

int main()
{int n,m1,m2,c;
cin>>n>>m1>>m2;
int x[n],v1[m1],v2[m2];
for(int i=0;i<n;i++)
    x[i]=i+1;

for(int i=0;i<m1;i++){
        cin>>v1[i];
for(int j=0;j<n;j++)if(v1[i]==x[j])x[j]=1; continue;}

for(int i=0;i<m2;i++) cin>>v2[i];
for(int i=0;i<n;i++)
{
    for(int j=0;j<m2;j++)
    {
        if(x[i]==v2[j]) x[i]=2;
    }
}
for(int i=0;i<n;i++)cout<<x[i];
return 0;
}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <functional>   // std::bit_xor
#include <algorithm>    // std::accumulate
#include <iterator>
using namespace std;
int main()
{
	int n,a,b,y,i,temp;
	scanf("%d%d%d",&n,&a,&b);
	int x[n];
	for(i=0;i<a;i++)
	{
		scanf("%d",&y);
		temp=y-1;
		x[temp]=1;
	}
	for(i=0;i<b;i++)
	{
		scanf("%d",&y);
		temp=y-1;
		if(x[temp]==1)
		continue;
		x[temp]=2;
	}
	for(i=0;i<n;i++)
	printf("%d ",x[i]);

	return 0;
}

//bismillahir rahmanir rahim
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,a,b,r,s,c1,c2;
    map<int,int>m;
    cin>>n>>a>>b;
    c1=c2=0;
    for(int i=1;i<=n;i++)
        m[i]++;
    for(int i=0;i<a;i++)
    {
        cin>>r;
        m[r]--;
        c1++;
    }
    for(int i=0;i<b;i++)
    {
        cin>>s;
    if(m[s]>0){
        m[s]--;
        c2++;
    }
    }
    for(int i=0;i<c1;i++)
        cout<<1<<" ";
    for(int i=0;i<c2;i++)
        cout<<2<<" ";
}

#include<bits/stdc++.h>
using namespace std;
long long n,q,w,j,i,y,u,o,fl;
vector<long long>v,v2,x;
main(){
	cin>>n>>q>>w;
	long long a[q],b[w];
	for(i=0;i<q;i++){
		cin>>a[i];
		v.push_back(a[i]);
	}
	for(j=0;j<w;j++){
		cin>>b[j];
		v2.push_back(b[j]);
	}
	sort(v.begin(),v.end());
	sort(v2.begin(),v2.end());
	for(i=1;i<=n;i++){
		x.push_back(i);
	}
	for(i=0;i<x.size();i++){
		for(j=0;j<v.size();j++){
			if(v[j]==x[i]){
				cout<<1<<" ",x[i]=0;break;
			}
		}
	}
	for(i=0;i<x.size();i++){
		for(j=0;j<v2.size();j++){
			if(v2[j]==x[i]){
				cout<<2<<" ",x[i]=0;break;
			}
		}
	}
}

#include<bits/stdc++.h>

using namespace std ;

int main()
{
	int n , a , b ;
	cin>>n>>a>>b ;

	int c[a] , d[b] ;
	int i , j ;
	for(i=0;i<=a-1;i++)
	{
		cin>>c[i] ;
	}
	for(i=0;i<=b-1;i++)
	{
		cin>>d[i] ;
	}
	for(i=0;i<=a-1;i++)
	{
		cout<<"1 " ;
	}
	j = a+b-n ;
	j = b-j;
	for(i=1;i<=j;i++)
	{
		cout<<"2 " ;
	}
}

#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
	int n,a,b;
	int s[110];
	int i=0;
	cin >> n >> a >> b;
	while(a--)
	{
		scanf("%d",&s[i]);
		s[i] = 1;
		i++;
	}
	while(b--)
	{
		scanf("%d",&s[i]);
		s[i] = 2;
		i++;
	}
	for(i = 0;i<n;i++)
	{
		cout << s[i] << " ";
	}

	return 0;
}

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main() {

	int n, a, b;
	int aa[101], bb[101];

	cin >> n >> a >> b;

	for (int i = 0; i < a; i++) {
		cin >> aa[i];
	}

	for (int i = 0; i < b; i++) {
		cin >> bb[i];
	}

	sort(aa, aa + a);
	sort(bb, bb + b);

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (aa[i] == i + 1) {
				cout << "1 ";
				break;
			}
			if (bb[i] != aa[j]) {
				cout << "2 ";
				break;
			}
		}
	}

	cout << endl;

	// remember to comment this out before submission
	//system("pause");
	return 0;
}

#include<stdio.h>
int main(void)
{
    int n,a,b,fava[101],favb[101],arthur=0,l;
    scanf("%d%d%d",&n,&a,&b);
    for(int i=1;i<=a;i++) scanf("%d",&fava[i]);
    for(int j=1;j<=b;j++) scanf("%d",&favb[j]);
    for(l=1;l<=n;l++)
        {
            if(fava[l]==1) arthur=1;
        }
    if(arthur==1) printf("1");
    else printf("2");
    for(int k=2;k<=n;k++)
    {
        arthur=0;
        for(l=1;l<=n;l++)
        {
            if(fava[l]==k) arthur=1;
        }
        if(arthur==1) printf(" 1");
        else printf(" 2");
    }
}

#include<iostream>
#include<math.h>
#include<algorithm>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<cstdio>
#include<queue>
#include<sstream>
#include<ctime>
#include<ctype.h>//isalpha
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long long int lli;
#define mp make_pair
#define pb push_back
//const int N = 4000009;
//const int mod = 1000000007;
int digit[111];
int main()
{
    //ios_base::sync_with_stdio(false);
    int n,a,b;
    scanf("%d %d %d",&n,&a,&b);
    vector<int> a1,b1;
    for(int i=1;i<=a;i++){
        int c;
        scanf("%d",&c);
        digit[c]++;
        a1.pb(1);
    }
    for(int i=1;i<=b;i++){
        int c;
        scanf("%d",&c);
        if(digit[c]==0){
            digit[c]++;
            b1.pb(2);
        }
    }
    for(int i=1;i<=n;i++){
        if(digit[i]==0){
            b1.pb(2);
        }
    }
    for(int i=0;i<a1.size();i++){
        printf("%d ",a1[i]);
    }
    for(int i=0;i<b1.size();i++){
        printf("%d ",b1[i]);
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int n, a, b;
int x[105], y[105];

int main() {
	scanf("%d%d%d", &n, &a, &b);
	for (int i = 0; i < a; i++) {
		int temp; scanf("%d", &temp);
		x[temp] = 1;
	}
	for (int i = 0; i < b; i++) {
		int temp; scanf("%d", &temp);
		y[temp] = 1;
	}
	for (int i = 1; i < n; i++) {
		if (x[i]) printf("1 ");
		else printf("2 ");
	}
	return 0;
}

#include <iostream>

using namespace std;
int v[110],n,a,b,i,x;
int main()
{
    cin>>n>>a>>b;
    for(i=0;i<a;++i)
        cin>>x,v[x]=1;
    for(i=0;i<b;++i)
        cin>>x,v[x]=2;
    for(i=1;i<=n;++i)
        cout<<v[i];
    return 0;
}

#include<iostream>
#include<string>
using namespace std;

int main()
{
	int s[109];
	int n;
	cin >> n;
	int a, b;
	cin >> a >> b;

	for (int i = 0; i < a; i++)
	{
		int t1;
		cin >> t1;
		s[t1-1] = 1;
	}
	for (int i = 0; i < b; i++)
	{
		int t3;
		cin >> t3;
	}
	for (int i = a; i < n; i++)
	{

		s[i ] = 2;
	}

	for (int i = 0; i < n; i++)
	{
		cout << s[i] << " ";
	}

	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define ll long long

void file_operatio() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

void solve(int testcase) {
	int n, a, b; cin >> n >> a >> b;
	int arr[n];
	for (int i = 0; i < a + b; ++i)
	{
		cin >> arr[i];
	}
	int counta = 0, countb = 0;
	for (int i = 0; i < n; ++i)
	{
		for (int j = 0; j < a + b; ++j)
		{
			if (i + 1 == arr[j]) {
				if (i + 1 <= a && counta < a) {
					counta++;
					cout << "1 ";
				}
				else {
					countb++;
					cout << "2 ";
				}
				break;
			}
		}
	}
	cout << endl;
}
int main(int argc, char const * argv[])
{
	file_operatio();
	solve(1);

	return 0;
}

#include <iostream>
using namespace std;

int main() {
    int n,a,b,count=0;
    cin>>n;
    cin>>a;
    cin>>b;
    int z[a],x[b];
    for(int i=0;i<a;i++)
    {
        cin>>z[i];
    }
    for(int j=0;j<b;j++)
    {
        cin>>x[j];
    }
        for(int i=0;i<a;i++)
        {
               for(int j=0;j<b;j++)
               {
                   if(z[i]==x[j])
                   {
                       x[j]=0;
                   }
               }
        }
           for(int j=0;j<b;j++)
           {
               if(x[j]!=0)
               {
                   count++;
               }
           }

    for(int i=0;i<a;i++)
    {
        cout<<"1"<<" ";
    }
    for(int i=0;i<count;i++)
    {
        cout<<"2"<<" ";
    }

	return 0;
}

#include <iostream>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
    int n, a, b;
    int apple[110];

    for(int i = 0; i < 110; i++) apple[i] = 0;
    cin >> n >> a >> b;

    for(int i = 0; i < a; i++)
    {
        int x;
        cin >> x;
        cout << 1 << " ";
        apple[x] = 1;
    }

    for(int i = 0; i < b; i++)
    {
        int x;
        cin >> x;
        if(! apple[x]) cout << 2 << " ";
    }
    cout << endl;
    return 0;
}

#include <bits/stdc++.h>
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
using namespace std;
int n,m,k,a,i;
main(){
	cin>>n>>m>>k;
	for(i=0;i<m+k;i++){
		cin>>a;
	}
	for(i=0;i<m;i++)
		cout<<1<<" ";
	for(i=0;i<n-m;i++){
		cout<<2<<" ";
	}

}

#include <iostream>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <string.h>
#include <deque>
#include <time.h>
#include <stack>
#include <stdio.h>

#define f(i,j)		for(long long i=0; i<j ; i++)
#define ff(i,j,k)	for(long long i=j; i<k ; i++)
#define fff(i,j)	for(long long i=j; i>=0 ; i--)

using namespace std;
int main(){
	long long n,a,b,num;
	int arr[102];
	cin>>n>>a>>b;
	f(i,a){
		cin>>num;
		arr[num]=1;
	}
	f(i,b)
		cin>>num;
	ff(i,1,n+1){
		if(arr[i]==1)
			cout<<"1 ";
		else
			cout<<"2 ";
	}
	return 0;
}

#include<iostream>
#include<string>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int c=1;
    int k=s.length();
    for(int i=0;i<s.length();i++)
    {
            if(s[i]=='A' ||s[i]=='H' ||s[i]=='I' ||s[i]=='M' ||s[i]=='O' ||s[i]=='T' ||s[i]=='U' ||s[i]=='V' ||s[i]=='W' ||s[i]=='X' ||s[i]=='Y' )
            {
                         c=1;
            }
            else
            {
                c=0;
                break;
            }
    }
    int i=0,d=0;
    while(i!=k/2)
    {
    if(s[i]==s[k-i])
    {d=0;}
    else
    {d=1;break;
    }
    i++;
    }

    if(c==0 || d==1)
    cout<<"NO";
    else
    cout<<"YES";
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int n,a,b,i,j,flag;
	cin>>n>>a>>b;
	int p[a],q[b];
	for(i=0;i<a;i++)
	{
		cin>>p[i];
		cout<<"1"<<" ";
	}
	for(i=0;i<b;i++)
	{
		cin>>q[i];
		flag=1;
		for(j=0;j<a;j++)
		{
			if(q[i]==p[j])
			{
				flag=0;
				break;
			}
		}
		if(flag)
		cout<<"2"<<" ";
	}
}

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<set>
#include<time.h>
#include<bitset>
#include<list>
using namespace std;
int t[110];
int q[110];
int main(){
    int n,a,b,x;
    cin>>n>>a>>b;
    for (int i=1;i<=a;i++)
    cin>>x,q[x]=1;
    for (int i=1;i<=b;i++)
    cin>>x,t[x]=2;
    for (int i=1;i<=n;i++)
   { if (q[i]==1) t[i]=1;
    cout<<t[i];}
    return 0;
}

// no compile challenge :D
#include <bits/stdc++.h>
using namespace std;

#define testin() freopen("in.txt", "r", stdin)
#define testout() freopen("out.txt", "w", stdout)
#define logger(x) cerr << " ~~> " << #x << " = " << (x) << endl
#define loop(i, j, n) for(int (i)=(j); (i)<(n); (i)++)
#define finish(x) {cout << (x) << endl; exit(0);}
#define yy second
#define xx first
#define endl "\n"
typedef long long ll;
typedef pair<int, int> pii;

const int mxn = 100;
bool which[mxn];

int main()
{
    int n, a, b, x;
    cin >> n >> a >> b;
    loop(i, 0, a)
    {
        cin >> x;
        which[x] = true;
    }
    loop(i, 0, b)
        cin >> x;
    loop(i, 0, n)
        cout << which[i]+1 << ' ';
}

#include <iostream>

using namespace std;

int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int a1[a];
    int b2[b];
    int sul[n];
    bool t=false;
    int z=0;
    for(int i=0;i<a;i++){
        cin>>a1[i];
    }
    for(int i=0;i<b;i++){
        cin>>b2[i];
    }

    for(int i=1;i<=n;i++){

        for(int j=0;j<a;j++){
            if(i==a1[j]){
                t=true;
       }

     }
 if(t==true){
         sul[z]=1;
            t=false;
            z++;
       }
       else {sul[z]=2; z++;}
    }
    for(int i=0;i<n;i++){
        cout<<sul[i];
    }
    return 0;
}

#include<iostream>
#include<vector>
using namespace std;
int main(){
	int apple, a, b;
	cin>>apple>>a>>b;
	int*a1 = new int[apple];
	int size = a + b, d;
	for (int i = 0; i<size; i++){
		cin>>d;
		if ((i + 1) <= a)
			a1[d - 1] = 1;
		else if ((i + 1)>a)
			a1[d - 1] = 2;
	}
	for (int i = 0; i<apple; i++)
		cout<<a1[i];
	cout << endl;
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{

  long long int n,i,a,b,arr[1000],brr[10000],j,sum=0,temp=0;

  cin>>n>>a>>b;
  for(i=0;i<a;i++)
   { cin>>arr[i];
      cout<<1<<" ";}

   for(j=0;j<b;j++)
   { cin>>brr[j]; }
    if(a<b)
  { for(i=0;i<(n-a);i++)
     cout<<2<<" ";}

      return 0;
}

#include<iostream>
using namespace std;
void main()
{
	int n,a,b,i;
	bool flag[101]={0};
	int s[101],t[101];
	cin>>n>>a>>b;
	for(i=1;i<=a;i++)
	{
		cin>>s[i];
	    flag[s[i]]=1;
	}
	for(i=1;i<=b;i++)
	{
		cin>>t[i];
		flag[t[i]]=0;
	}
	for(i=1;i<=n;i++)
	{
		if(flag[i])
			cout<<1;
		else
			cout<<2;
	}
}

#include <bits/stdc++.h>
using namespace std;
int arr[100];
int main ()
{
	int n,a,b;
	cin>>n>>a>>b;
	for (int i = 0; i < n; ++i)
	{
		int c;
		cin>>c;
		arr[c-1] = 1;
	}
	for (int i = 0; i < b; ++i)
	{
		int c;
		cin>>c;
		arr[c-1] = 2;
	}
	for (int i = 0; i < n; ++i)
	{
		cout<<arr[i]<<" ";
	}
}

#include <iostream>

using namespace std;

int main()
{
    int n,arthur,alex,a[100],b[100],i,j;
    cin>>n>>arthur>>alex;
    for(i=0; i<arthur; i++)
    {
        cin>>a[i];
    }
    for(j=0; j<alex; j++)
    {

        cin>>b[j];
        for(i=0; i<arthur; i++)
        {
            if(b[j]==a[i])
            {
                b[j]=0;
            }
        }
    }

    for(i=1; i<=n; i++)
    {
        for(j=0; j<arthur; j++)
        {
            if(a[j]==i)
            {
                cout<<"1 ";

            }
            if(b[j]==i)
            {
                cout<<"2 ";

            }
        }

    }

    return 0;
}

#include <bits/stdc++.h>
#define endl        '\n'
#define ll          long long int
using namespace std;
//calculate x ^ y
const long long int mod = 1000000007;
ll power(int x, int y){
    ll res = 1;
    while (y > 0){
        if (y & 1)
            res = ((res%mod)*(x%mod))%mod;
        y = y>>1;x = ((x%mod)*(x%mod))%mod;
    }
    return res;
}

int main() {
    ios::sync_with_stdio(false);
        int n,a,b;cin>>n>>a>>b;
        int a1[a];int b1[b];
        int max=INT_MIN;
        bool ans[n+1];memset(ans,false,sizeof(ans));
        for(int i=0; i<a; i++){
            cin>>a1[i];
            if(ans[i+1]==false)
                ans[i+1]=true;
        }
        for(int i=0; i<n; i++){
            if(ans[i+1]==true)
                cout<<1<<" ";
            else
                cout<<2<<" ";
        }
        cout<<endl;

}

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a,b,i;
    cin>>n;
    int x[n],y[a],z[b];
    for(i=0;i<a;i++){
        cin>>y[i];
        x[y[i]-1]=1;
    }
    for(i=0;i<b;i++){
        cin>>z[i];
        x[z[i]-1]=2;
    }
    for(i=0;i<n;i++)
    cout<<x[i]<<" ";

}

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <math.h>
#include <cmath>
#include <sstream>
#include <queue>
#include <string>

#define MAXN 1000000+99
#define ll long long
using namespace std;
ll int arr[MAXN];

int main()
{

	ll int n,a,b,m,d;
	cin >> n >>a>> b;

	for (int i = 0; i < a; i++)
	{
		cin >> m;
		arr[m ] = 1;
	}
	for (int i = 0; i < b; i++)
	{
		cin >> d;
		if (arr[d] == 0)
		arr[d] = 2;
	}
	for (int i = 0; i < n; i++)
		cout << arr[i] << " ";
	return 0;

}

#include "iostream"

using namespace std;

int n,a,b;
int *Arthur_like, *Alexander_like;

bool isArthur_like(int apple);
bool isAlexander_like(int apple);

int main() {
    // Input data
    cin >> n >> a >> b;
    Arthur_like = new int[a];
    for(int i=0; i<a; i++) {
        cin >> Arthur_like[i];
    }
    Alexander_like = new int[b];
    for(int i=0; i<b; i++) {
        cin >> Alexander_like[i];
    }
    // Solve the case
    int* answer = new int[n+1];
    for(int i=1; i<n+1; i++) {
           if(isArthur_like(i)) {
            answer[i] = 1;
           } else {
            answer[i] = 2;
           }
    }
    // Print the answer
    for(int i=1; i<n+1; i++) {
        cout << answer[i];
    }
    return 0;
}

bool isArthur_like(int apple) {
    int like = false;
    for(int i=0; i<a && !like; i++) {
        like = Arthur_like[i] == apple;
    }
    return like;
}

bool isAlexander_like(int apple) {
    int like = false;
    for(int i=0; i<b && !like; i++) {
        like = Alexander_like[i] == apple;
    }
    return like;
}

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,a,b,i,j=0,e=1,f=0;
    cin>>n>>a>>b;
    int c[a];
    int d[b];
    for(i=0; i<a; i++)
        cin>>c[i];
    for(i=0; i<b; i++)
        cin>>d[i];
    for(i=1; i<=n; i++)
    {
        e=1;
        for(j=0; j<a; j++)
        {
            if(c[j]==i)
            {
                if(f!=0)
                    cout<<' ';
                cout<<1;
                e=0;
                f=1;
                break;
            }
        }
        if(e!=0)
        {
            if(f!=0)
                cout<<' ';

            cout<<2;
        }
    }

}

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{

   int n,a[101],t1,t2,i,na,nb;

   cin>>n>>na>>nb;
   for (i=1;i<=na;i++) a[i]=0;

   for (i=1;i<=na;i++) {cin>>t1; a[t1]=1;}
   for (i=1;i<=nb;i++) {cin>>t1; if (a[t1]!=1) a[t1]=2;}

   for (i=1;i<=n;i++) cout<<a[i]<<" ";

  //system("PAUSE");
  // return EXIT_SUCCESS;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int main()
{
    int n,m,k,j,i,t,a,b;
    int x[105],y[105];
    scanf("%d%d%d",&n,&a,&b);
    for(i=0;i<a;i++)
    scanf("%d",&x[i]);
    for(j=0;j<b;j++)
    scanf("%d",&y[j]);
    k=0;
    for(i=0;i<a;i++) printf("1 ");
    for(i=0;i<b;i++){
        t=0;
        for(j=0;j<a;j++){
            if(x[j]!=y[i]) t++;
        }
        if(t==a) printf("2 ");
    }
    //for(i=0;i<n-k;i++) printf("1 ");
    //for(i=0;i<k;i++) printf("2 ");
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here

	int n,i,j,a,b;
	cin>>n>>a>>b;
	int p[n+1]={0};
	int x[a],y[b];
	for(i=0;i<a;i++)
	cin>>x[i];
	for(i=0;i<b;i++)
	cin>>y[i];

	for(i=0;i<a;i++)
	{
	    if(p[x[i]]==0)
	    {
	        p[x[i]]=1;

	    }
	}
	for(i=0;i<b;i++)
	{
	    if(p[y[i]]==0)
	    {
	        p[y[i]]=2;

	    }
	}
	sort(p,p+n+1);

	for(i=1;i<n+1;i++)
	cout<<p[i]<<" ";

	return 0;
}

#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<ctime>
#include<utility>
#include<vector>
using namespace std;
#define y0 qgoiqoeinfoiqwef
#define y1 vmpoqmeppjofaqoi
#define yn qoigmnioqonfopiq
#define ff first
#define ss second
bool a[111];
int b[111],n,x,y;
int main()
{
    cin>>n>>x>>y;
    int tmp;
    for(int i=1;i<=x;i++){cin>>tmp;a[tmp]=1;}
    for(int i=1;i<=y;i++){cin>>tmp;b[tmp]=1;}
    sort(a,a+x+1);sort(b,b+y+1);
    for(int i=1;i<=n;i++)if(a[i])cout<<"1 ";else cout<<"2 ";
//  system("pause");
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
    map <int, int> ck;
    int n, a, b, r;
    cin >> n >> a >> b;
    for (int i = 0; i < a; i++) {
        cin >> r;
        ck[r]++;
        cout << 1 << " ";
    }
    for (int i = 0; i < b; i++) {
        cin >> r;
        if(!ck[r]){
            cout << 2 << " ";
        }
    }
    return 0;
}

#include <stdio.h>
int taken[105];
int n, a, b, t;

int main () {
    scanf ("%d %d %d",&n,&a,&b);
    for(;a;a--) {
        scanf("%d",&t);
        taken[t] = 1;
    }
    for(;b;b--) {
        scanf("%d",&t);
        printf("t1: %d\n",taken[t]);
        if(!taken[t]) {
            taken[t] = 2;
        }
        printf("t2: %d\n",taken[t]);
    }
    for(int i = 1;i<=n;i++) {
        printf("%d ",taken[i]);
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n, a, b;
    cin >> n >> a >> b;
    vector<int> arr(n);
    for (int i=0;i<a;i++) {
        int t;
        cin >> t;
        arr[t-1] = 1;
    }
    for (int i=0;i<b;i++) {
        int t;
        cin >> t;
        arr[t-1] = 2;
    }
    for (int i=0;i<n;i++) cout << arr[i];
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define E "\n"
#define F first
#define S second
#define P push_back
using namespace std;
int main()
{
    int n,a,b,h;
    scanf("%d%d%d",&n,&a,&b);
    int ar[a+1];
    for(int i=1;i<=a;scanf("%d",&ar[i++]));
    sort(ar+1,ar+a+1);
    for(int i=1,j=1;i<=n;i++)
    {
        if(ar[j]==i)
        {
            printf("1");
            j++;
        }
        else
            printf("2");
        printf(i==n?E:" ");
        if(j>a)
        {
            for(int k=j;k<=n;k++)
            {
                printf("2");
                printf(k==n?E:" ");
                i++;
            }
        }
    }
	return 0;
}

#include<bits/stdc++.h>
#define lli long long int
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
    lli n,a,b,c,d,i;
	cin>>n>>a>>b;
	lli x[n]={0};
	for(i=0;i<a;i++)
	{
	    cin>>c;
	    x[c]=1;
	    cout<<1<<" ";
	}
	for(i=0;i<b;i++)
	{
	    cin>>d;
	    if(x[d]!=1)
	    cout<<2<<" ";
	}
	cout<<endl;
	return 0;
}

#include <bits/stdc++.h>
#define debug(x) { cout << #x << " = " << x << endl; }

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  int n, l, r, x;
  cin >> n >> l >> r;
  int t[n] = {0};
  for(int i = 0; i < l; i++) {
    cin >> x;
    t[i] = 1;
  }
  for(int i = 0; i < r; i++) {
    cin >> x;
    if(t[x - 1] == 0) t[x - 1] = 2;
  }
  for(int i = 0; i < n; i++) cout << t[i] << " ";
}

#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define fr first
#define sc second
#define VAQT ios_base::sync_with_stdio(0);

using namespace std;

const long long Z=1e8+7;
const long long O=1e8+8;
const long long H=1e8+9;
const long long I=1e8+5;
const long long R=1e8+6;

ll cnt,ans,rem,rev,q,n,m,l;
ll a,b,c,d,e,y,z,t1,t2,t3,x,p,f,h;
string s,s1,g,g1;
deque< ll >v,v1;
set< ll >st;
map< ll , ll >mp;

void zohir()
{
    for( int i=0; i < s.size(); i ++ )
    {
        if( s[ i ] == 'A' )
            ans++;
    }
}
int main ()
{

    ///AUTHOR :: Zohir Ashurov

    cin >> n >> a >> b;
    for( int i=0; i<a; i ++ )
    {
        cin >> c;
        mp[c] ++ ;
        if (mp[c] == 1)
            v.pb(1) ;
    }
    for (ll i = 0 ; i < b ; i ++ )
    {
        cin >> c ;
        mp[c] ++ ;
        if (mp[c] == 1)
            v.pb(2) ;
    }
    for (auto i : v)
    {
        cout << i << " " ;
    }
}

/*
    ..Hold on Stan..
    H1s3nb3rg's Here !!
*/
#include <bits/stdc++.h>
using namespace std;
#define FAST_IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
#define GET_SET_BITS(a) (__builtin_popcount(a))
#define GET_SET_BITSLL(a) ( __builtin_popcountll(a))
#define GET_TRAIL_ZERO(a) (__builtin_ctz(a))
#define GET_LEAD_ZERO(a) (__builtin_clz(a))
#define GET_PARITY(a) (__builtin_parity(a))
#define ff first
#define ss second
#define pp pair
#define ULRED 1000000007
#define MS(x,y) (x-y>0?x-y:y-x)
#define MX(x,y) x>y?x:y
#define MN(x,y) x>y?y:x
#define MXPTR2(a,b,x,y) (x>y?a:b)
#define MXPTR3(a,b,c,x,y,z) (x>y?(x>z?a:c):(y>z?b:c))
#define MX3(a,b,c) (a>b?(a>c?a:c):(b>c?b:c))
#define AEQ(a,b,c) (a==b?1:(a==c?3:(c==b?2:-1)))
#define ENDL "\n"
#define ALL(a) a.begin(),a.end()
typedef vector<ll> vll;
typedef vector<char> vcc;
typedef long double ld;
typedef pair<int,int> pi;
typedef vector<int> vi;
typedef vector<pi> vpi;
typedef vector<vector<ll>> v2ll;
typedef vector<vector<char>> v2cc;
#define MP(a,b) make_pair(a,b)
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define trav(a,x) for (auto& a: x)
const int MOD = 1e9+7;
#define pb push_back
#define sz(x) (int)x.size()
const ld PI = acos((ld)-1);

/*------------------------------------------------------------------*/

int main(){
    FAST_IO;
    ll n,a,b;
    cin>>n>>a>>b;
    vll occ(n+1,0);
    vi ans;
    for(ll i=0;i<a;i++){
        ll t;
        cin>>t;
        if(occ[t]==0){
            occ[t]++;
            ans.pb(1);
        }
    }
    for(ll i=0;i<b;i++){
        ll t;
        cin>>t;
        if(occ[t]==0){
            occ[t]++;
            ans.pb(2);
        }
    }
    trav(a,ans)
        cout<<a<<" ";
    cout<<ENDL;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

typedef long long int lld;
typedef long double lf;
typedef vector<lld> vll;

#define all(v) ( v.begin() ),( v.end() )
#define pb push_back
//#define pop pop_back()

#define mp make_pair
#define fr(b , e) for(int i=b ; i<e ; i++)
const int M = 1e5+5;

bool isodd(lld x){ return x%2; }
int arr[M];
int n ,a ,b ,tmp;
vector<int>v;
int main()
{
    scanf("%d%d%d" , &n ,&a ,&b);
    fr(0 , a+b){
        scanf("%d" , &tmp);
        if(i < a){
            v.pb(1);
            arr[tmp]++;
        }
        else{
            if(arr[tmp] == 0)
                v.pb(2);
        }

    }
    fr(0 ,v.size()){
        if(i) cout<<" ";
        cout<<v[i];
    }

    return 0;
}

#include <iostream>
#include <string>
#include <conio.h>
using namespace std;
int main()
{
    int n,a,b;
    cin>>n>>a>>b;
    int r[100];
    int *m=new int [a];
   for(int j=0;j<a;j++)
   {
         cin>>m[j];
        r[(m[j])-1]=-1;
   }
    for(int j=0;j<n;j++)
    {
           if(r[j]==-1)
              cout<<"1 ";
            else
               cout<<"2 ";
    }

    return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> u(n);
    int a, b;
    cin >> a >> b;
    for(int i = 0; i < a; i++)
    {
        int k;
        cin >> k;
        k--;
        u[k] = 1;
    }
    for(int i = 0; i < b; i++)
    {
        int k;
        cin >> k;
        if(u[k] == 0)
        {
            u[k] = 2;
        }
    }
    for(int i = 0; i < n; i++)
    {
        cout << u[i] << " ";
    }
}