#include <iostream>
using namespace std;
const int N = 110;
int a[N], b[N];
int n, m, s;
void copy(int a[], int b[], int s)
{
for (int i = 0; b[i] != NULL; i++)
{
if (i < s) cout << a[i] << " ";
else cout << b[i] << " ";
}
}
int main()
{
cin >> n >> m >> s;
for(int i = 0; i < n; i ++ )
cin >> a[i];
for(int i = 0; i < m; i ++ )
cin >> b[i];
copy(a, b, s);
}