#include <bits/stdc++.h>
#define oo 1000000007
#define maxN 100005
#define debug(a) cout << #a << " = " << a << endl
#define fdebug(a, x, y) { cout << #a << " : "; fto(_, x, y) cout << a[_] << ' '; cout << endl; }
#define fto(i, x, y) for(int i = (x); i != (y) + (((x) < (y) ? 1 : -1)); i += ((x) < (y)) ? 1 : -1)
#define ftoa(i, x, y, a) for(int i = (x); i != (((x) < (y)) ? (((y)-(x))/a+1)*a+(x) : (x)-(((x)-(y))/a+1)*a); i += ((x) < (y)) ? (a) : -(a))
#define mp make_pair
#define pb push_back
#define pf push_front
#define ll long long
#define lb lower_bound
#define ub upper_bound
#define ull unsigned long long
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<ii>
#define FF first
#define SS second
#define mt make_tuple
#define eb emplace_back
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("template.inp", "r", stdin);
freopen("template.out", "w", stdout);
#endif // ONLINE_JUDGE
int n, m, k;
scanf("%d%d%d", &n, &m, &k);
ftoa (i, n, m, k) cout << i << " ";
puts("");
ftoa (i, m, n, k) cout << i << " ";
#ifndef ONLINE_JUDGE
cout << endl;
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CgojZGVmaW5lIG9vIDEwMDAwMDAwMDcKI2RlZmluZSBtYXhOIDEwMDAwNQojZGVmaW5lIGRlYnVnKGEpIGNvdXQgPDwgI2EgPDwgIiA9ICIgPDwgYSA8PCBlbmRsCiNkZWZpbmUgZmRlYnVnKGEsIHgsIHkpICB7IGNvdXQgPDwgI2EgPDwgIiA6ICI7IGZ0byhfLCB4LCB5KSBjb3V0IDw8IGFbX10gPDwgJyAnOyBjb3V0IDw8IGVuZGw7IH0KI2RlZmluZSBmdG8oaSwgeCwgeSkgZm9yKGludCBpID0gKHgpOyBpICE9ICh5KSArICgoKHgpIDwgKHkpID8gMSA6IC0xKSk7IGkgKz0gKCh4KSA8ICh5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