#include <iostream>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <vector>
#define ios ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define DEBUG printf("Passing [%s] in LINE %d\n",__FUNCTION__,__LINE__)
//
using namespace std;
const int N = 2e5 + 10;
const int minN = 400;
string str1[N], str2[N];
string str[minN][minN]; // 定义一个二维数组用来读图
char cha[minN + 10][minN + 10];
int n,m,t = 0;
int a[N],b[N];
int tot,le[1],rt[1],key[1],value[1];
void debug() //splay
{
int i;
for(i=0;i<=tot;i++)
printf("Node[%d] le=%d rt=%d key=%d value=%d\n",i,le[i],rt[i],key[i],value[i]);
}
void print(int a[],int b[],int size) {
// if (n == m) return m;
// return n + print(n + 1,m);
for (int i = 0;i < size; i++) {
cout << a[i] << " ";
}
// for (int i = size;i < m; i ++) {
// cout << b[i] << " ";
// }
for (;size < m;size ++) {
cout << b[size] << " ";
}
}
void solve() {
// int a[100][100];
// cin >> n >> m;
// for (int i = 0;i < n;i ++) {
// for (int j = 0; j < m;j ++) {
// cin >> a[i][j];
// }
// }
// print(a,n,m);
int size;
cin >> n >> m >> size;
for (int i = 0;i < n;i ++) cin >> a[i];
for (int i = 0;i < m;i ++) cin >> b[i];
print(a,b,size);
// printf("%.2f",print(n,m));
// cout << ans << endl;
}
int main(){
// int n, k;
// scanf("%d %d", &n, &k);
// for(int i = 1;i <= n; ++i) cin >> a[i];
// t组测试样例 边长为n的正方形矩阵
// cin >> t;
// while(t--) {
solve();
// }
return 0 ^ 0;
}