#include <iostream>
using namespace std;
int a[110],b[110];
int main()
{
int aa,bb,c;
cin >>aa>>bb>>c;
for(int i=1;i<=aa;i++) cin >>a[i];
for(int i=1;i<=bb;i++) cin >>b[i];
int j =1;
for(;j<=c;j++) cout<<a[j]<<" ";
for(;j<=bb;j++) cout<<b[j]<<" ";
}