#include<stdio.h>
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
#define carpe_diem ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define endl '\n'
#define S second
#define F first
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define M 1000000007

int main()
{
    carpe_diem
    int n,m,k; cin>>n>>m>>k;
    vector<int> ans;
    for(int i=0; i<k; i++) ans.pb(1);
    int t=n;
    while(t<n+m)
    {
        ans.pb(t);
        if(t+1<n+m)
        {
            for(int i=0; i<k-1; i++) ans.pb(t+1);
        }
        t+=n-1;
    }
    cout<<ans.size()<<endl;
    for(int i=0; i<ans.size(); i++) cout<<ans[i]<<" ";
}


#include<stdio.h>
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
#define carpe_diem ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define endl '\n'
#define S second
#define F first
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define M 1000000007

int main()
{
    carpe_diem
    int n,m,k; cin>>n>>m>>k;
    vector<int> ans;
    for(int i=0; i<k; i++) ans.pb(1);
    int t=n;
    while(t<=n+m)
    {
        ans.pb(t);
        if(t+1<n+m)
        {
            for(int i=0; i<k-1; i++) ans.pb(t+1);
        }
        t+=n;
        if(k==1) t--;
        // cout<<t<<endl;
    }
    // if(t==n+m+1 && k==1){ans.pb(n+m);}
    cout<<ans.size()<<endl;
    for(int i=0; i<ans.size(); i++) cout<<ans[i]<<" ";
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m, k;
int main() {
	scanf("%d%d%d", &n, &m, &k);
	if (k == 1) {
		printf("%d\n", (n + m + 1) / (n - 1));
		for (int d = 1, i = 1; i <= (n + m + 1) / (n - 1); i++, d += n - 1)printf(i == 1 ? "%d" : " %d", d);
		printf("\n");
		return 0;
	}
	int d = n + m;
	int ans = 1;
	bool f = false;
	for (int i = 1; i <= d; ) {
		if (!f) {
			ans += (k - 1);
			i += n - 1;
			f = true;
		}
		else {
			ans += 1;
			i++;
			f = false;
		}
	}
	printf("%d\n", ans);
	d = 1;
	printf("1");
	f = false;
	for (int i = 2; i <= ans; ) {
		if (!f) {
			for (int j = 1; j <= k - 1&&i<=ans; j++) {
				printf(" %d", d);
				i++;
			}
			f = true;
			d += n - 1;
		}
		else {
			printf(" %d", d);
			d++;
			i++;
			f = false;
		}
	}
	printf("\n");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m, k;
int main() {
	scanf("%d%d%d", &n, &m, &k);
	if (k == 1) {
		int ans = 0;
		for (int i = 1; i < n + m + 1; i += (n - 1)) ans++;
		printf("%d\n", ans);
		for (int d = 1, i = 1; i <= ans; i++, d += (n - 1))printf(i == 1 ? "%d" : " %d", d);
		printf("\n");
		return 0;
	}
	int d = n + m;
	int ans = 1;
	bool f = false;
	for (int i = 1; i <= d; ) {
		if (!f) {
			ans += (k - 1);
			i += n - 1;
			f = true;
		}
		else {
			ans += 1;
			i++;
			f = false;
		}
	}
	printf("%d\n", ans);
	d = 1;
	printf("1");
	f = false;
	for (int i = 2; i <= ans; ) {
		if (!f) {
			for (int j = 1; j <= k - 1&&i<=ans; j++) {
				printf(" %d", d);
				i++;
			}
			f = true;
			d += n - 1;
		}
		else {
			printf(" %d", d);
			d++;
			i++;
			f = false;
		}
	}
	printf("\n");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m, k;
int main() {
	scanf("%d%d%d", &n, &m, &k);
	if (k == 1) {
		int ans = (n + m + 1) / (n - 1);
		if (ans == 1)
			ans++;
		printf("%d\n", ans);
		for (int d = 1, i = 1; i <= ans; i++, d += n - 1)printf(i == 1 ? "%d" : " %d", d);
		printf("\n");
		return 0;
	}
	int d = n + m;
	int ans = 1;
	bool f = false;
	for (int i = 1; i <= d; ) {
		if (!f) {
			ans += (k - 1);
			i += n - 1;
			f = true;
		}
		else {
			ans += 1;
			i++;
			f = false;
		}
	}
	printf("%d\n", ans);
	d = 1;
	printf("1");
	f = false;
	for (int i = 2; i <= ans; ) {
		if (!f) {
			for (int j = 1; j <= k - 1&&i<=ans; j++) {
				printf(" %d", d);
				i++;
			}
			f = true;
			d += n - 1;
		}
		else {
			printf(" %d", d);
			d++;
			i++;
			f = false;
		}
	}
	printf("\n");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m, k;
int main() {
	scanf("%d%d%d", &n, &m, &k);
	if (k == 1) {
		int ans = 0;
		for (int i = 1; i <= n + m + 1; i += (n - 1)) ans++;
		printf("%d\n", ans);
		for (int d = 1, i = 1; i <= ans; i++, d += (n - 1))printf(i == 1 ? "%d" : " %d", d);
		printf("\n");
		return 0;
	}
	int d = n + m;
	int ans = 1;
	bool f = false;
	for (int i = 1; i <= d; ) {
		if (!f) {
			ans += (k - 1);
			i += n - 1;
			f = true;
		}
		else {
			ans += 1;
			i++;
			f = false;
		}
	}
	printf("%d\n", ans);
	d = 1;
	printf("1");
	f = false;
	for (int i = 2; i <= ans; ) {
		if (!f) {
			for (int j = 1; j <= k - 1&&i<=ans; j++) {
				printf(" %d", d);
				i++;
			}
			f = true;
			d += n - 1;
		}
		else {
			printf(" %d", d);
			d++;
			i++;
			f = false;
		}
	}
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ll long long int
#define f(i,n) for(int i=0;i<n;i++)
#define HI for(int i=0;i<n;i++)cin>>a[i]
#define pb(x) push_back(x)
#define mk(x,y) make_pair(x,y)
#define fast     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ln "\n"
#define vi vector<int>
const int M=5e6+5;//5e8+5;
const ll mod=1e9+7;
const ll inf = 9e18;
const double pi = 3.14159265358979323846;
ll t,n,m,x,sum,k,p,u=0;
string s,z,ans="";
ll raised(ll x, ll v) {
	if (v == 0)
		return 1 % mod;

	if (v % 2 == 1)
		return (x * raised(x, v - 1)) % mod;

	ll r = raised(x, v / 2);

	return (r * r) % mod;
}

int main() {
    cin>>n>>m>>k;

        if(n==m||(k==1&&n-m==1))  cout<<2*k+1<<ln;
        else cout<<2*k<<ln;
        f(i,k)cout<<"1 ";
        cout<<n<<" ";
        f(i,k-1)cout<<n+1<<" ";
        if(n==m) cout<<n+m-1;
        else if(k==1&&n-m==1)cout<<n+m;
}


#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ll long long int
#define f(i,n) for(int i=0;i<n;i++)
#define HI for(int i=0;i<n;i++)cin>>a[i]
#define pb(x) push_back(x)
#define mk(x,y) make_pair(x,y)
#define fast     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ln "\n"
#define vi vector<int>
const int M=5e6+5;//5e8+5;
const ll mod=1e9+7;
const ll inf = 9e18;
const double pi = 3.14159265358979323846;
ll t,n,m,x,sum,k,p,u=0;
string s,z,ans="";
ll raised(ll x, ll v) {
	if (v == 0)
		return 1 % mod;

	if (v % 2 == 1)
		return (x * raised(x, v - 1)) % mod;

	ll r = raised(x, v / 2);

	return (r * r) % mod;
}

int main() {
    cin>>n>>m>>k;
    if(n==2&&m==2&&k==1)cout<<"4\n1 2 3 4";
    else
{
        if(n==m||(k==1&&n-m==1))  cout<<2*k+1<<ln;
        else cout<<2*k<<ln;
        f(i,k)cout<<"1 ";
        cout<<n<<" ";
        f(i,k-1)cout<<n+1<<" ";
        if(n==m) cout<<n+m-1;
        else if(k==1&&n-m==1)cout<<n+m;
}
}


#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ll long long int
#define f(i,n) for(int i=0;i<n;i++)
#define HI for(int i=0;i<n;i++)cin>>a[i]
#define pb(x) push_back(x)
#define mk(x,y) make_pair(x,y)
#define fast     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ln "\n"
#define vi vector<int>
const int M=5e6+5;//5e8+5;
const ll mod=1e9+7;
const ll inf = 9e18;
const double pi = 3.14159265358979323846;
ll t,n,m,x,sum,k,p,u=0;
string s,z,ans="";
ll raised(ll x, ll v) {
	if (v == 0)
		return 1 % mod;

	if (v % 2 == 1)
		return (x * raised(x, v - 1)) % mod;

	ll r = raised(x, v / 2);

	return (r * r) % mod;
}

int main() {
    cin>>n>>m>>k;

        if(n>m)  cout<<2*k<<ln;
        else cout<<2*k+1<<ln;
        f(i,k)cout<<"1 ";
        cout<<n<<" ";
        f(i,k-1)cout<<n+1<<" ";
        if(n==m) cout<<n+m-1;
}


#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ll long long int
#define f(i,n) for(int i=0;i<n;i++)
#define HI for(int i=0;i<n;i++)cin>>a[i]
#define pb(x) push_back(x)
#define mk(x,y) make_pair(x,y)
#define fast     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ln "\n"
#define vi vector<int>
const int M=5e6+5;//5e8+5;
const ll mod=1e9+7;
const ll inf = 9e18;
const double pi = 3.14159265358979323846;
ll t,n,m,x,sum,k,p,u=0;
string s,z,ans="";
ll raised(ll x, ll v) {
	if (v == 0)
		return 1 % mod;

	if (v % 2 == 1)
		return (x * raised(x, v - 1)) % mod;

	ll r = raised(x, v / 2);

	return (r * r) % mod;
}

int main() {
    cin>>n>>m>>k;

{        if(n==2&&m==2&&k==1)u=1;
        if(n==m||(k==1&&n-m==1))  cout<<2*k+1+u<<ln;
        else cout<<2*k+u<<ln;
        f(i,k)cout<<"1 ";
        cout<<n<<" ";
        f(i,k-1)cout<<n+1<<" ";
        if(n==m)
        {
          if(k==1)  cout<<n+m-1<<" ";
          if(n==2)cout<<n+m;
        }
        else if(k==1&&n-m==1)cout<<n+m;
}
}


#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ll long long int
#define f(i,n) for(int i=0;i<n;i++)
#define HI for(int i=0;i<n;i++)cin>>a[i]
#define pb(x) push_back(x)
#define mk(x,y) make_pair(x,y)
#define fast     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ln "\n"
#define vi vector<int>
const int M=5e6+5;//5e8+5;
const ll mod=1e9+7;
const ll inf = 9e18;
const double pi = 3.14159265358979323846;
ll t,n,m,x,sum,k,p,u=0;
string s,z,ans="";
ll raised(ll x, ll v) {
	if (v == 0)
		return 1 % mod;

	if (v % 2 == 1)
		return (x * raised(x, v - 1)) % mod;

	ll r = raised(x, v / 2);

	return (r * r) % mod;
}

int main() {
    cin>>n>>m>>k;

{        if(n==2&&m==2&&k==1)u=1;
        if(n==m||(k==1&&n-m==1))  cout<<2*k+1+u<<ln;
        else cout<<2*k+u<<ln;
        f(i,k)cout<<"1 ";
        cout<<n<<" ";
        f(i,k-1)cout<<n+1<<" ";
        if(n==m)
        {
          if(k==1&&n>2)  cout<<n+m-1<<" ";
         else if(n==2&&k>1)cout<<n+m<<" ";
         else if(k==1&&n==2)cout<<n+m-1<<" "<<n+m<<" ";
         else cout<<n+m;

        }
        else if(k==1&&n-m==1)cout<<n+m;
}
}


#include "bits/stdc++.h"

#define endl '\n'
using ll = long long;
using namespace std;

void prn(int pos) {
    cout << pos << " ";
}

void solve(int n, int m, int k) {
    int cnt = (m < n ? 2 * k : 2 * k + 1);
    cout << cnt << endl;

    for (int i = 0; i < k; i++)
        prn(1);
    prn(n);
    for (int i = 0; i < k-1; i++)
        prn(n+1);
    if (m == n)
        prn(n+2);
}

int main(){
    std::ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m >> k;
    solve(n, m, k);
    return 0;
}


#include "bits/stdc++.h"

#define endl '\n'
using ll = long long;
using namespace std;

void solve(int n, int m, int k) {
    vector<int> ret;
    if (k > 1) {
        for (int i = 0; i < k; i++)
            ret.push_back(1);
        ret.push_back(n);
        for (int i = 0; i < k-1; i++)
            ret.push_back(n+1);

        if (m == n) {
            ret.push_back(n+2);
        }

    } else {

        int last = 1;
        while (last < n + m + 1) {
            ret.push_back(last);
            last = last + n - 1;
        }

    }

    cout << ret.size() << endl;
    for (auto i : ret)
        cout << i << " ";
}

int main(){
    std::ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m >> k;
    solve(n, m, k);
    return 0;
}


#include "bits/stdc++.h"

#define endl '\n'
using ll = long long;
using namespace std;

void prn(int pos) {
    cout << pos << " ";
}

void solve(int n, int m, int k) {
    int cnt = ((k > 1 && m < n) ? 2 * k : 2 * k + 1);
    cout << cnt << endl;

    for (int i = 0; i < k; i++)
        prn(1);
    prn(n);
    for (int i = 0; i < max(1, k-1); i++)
        prn(n+1);
    if (m == n)
        prn(n+2);
}

int main(){
    std::ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m >> k;
    solve(n, m, k);
    return 0;
}


#include "bits/stdc++.h"

#define endl '\n'
using ll = long long;
using namespace std;

void prn(int pos) {
    cout << pos << " ";
}

void solve(int n, int m, int k) {
    int cnt = ((k > 1 && m < n) ? 2 * k : 2 * k + 1);
    cout << cnt << endl;

    for (int i = 0; i < k; i++)
        prn(1);
    prn(n);
    for (int i = 0; i < k-1; i++)
        prn(n+1);
    if (m < n && k == 1)
        prn(n+1);
    if (m == n)
        prn(n+2);
}

int main(){
    std::ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m >> k;
    solve(n, m, k);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    ll n,m,k;
    cin>>n>>m>>k;
    if(n==m)
    {
        cout<<2*k+1<<endl;
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        cout<<2*n-1<<" ";
    }
    else
    {
        if(n!=m+1)
            cout<<2*k<<endl;
        else if(k==1)
        {
            cout<<2*k+1<<endl;
        }
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        if((n==m+1)&&(k==1))
            cout<<n+1<<" ";
    }
    cout<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    ll n,m,k;
    cin>>n>>m>>k;
    if(n==m)
    {
        cout<<2*k+1<<endl;
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        cout<<2*n-1<<" ";
    }
    else
    {
        if(n!=m+1)
            cout<<2*k<<endl;
        else if(k==1)
        {
            cout<<2*k+1<<endl;
        }
        else
        {
            cout<<2*k<<endl;
        }
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        if((n==m+1)&&(k==1))
            cout<<n+1<<" ";
    }
    cout<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main()
{
    ll n,m,k;
    cin>>n>>m>>k;
    vector <ll> ans;
    for(ll i=0;i<k;i++)
    {
        ans.push_back(1);
    }
    ans.push_back(n);
    ll x=k-1;
    for(ll i=0;i<k-1;i++)
    {
        ans.push_back(n+1);
    }
    if(n==m)
    {
        if(k==1)
            ans.push_back(2*n-1);
        else if(n>2)
        {
            ans.push_back(2*n);
        }
        if(n<=2)
            ans.push_back(2*n);
    }
    else if(n==m+1)
    {
        if(k==1)
            ans.push_back(n+1);
    }
    cout<<ans.size()<<endl;
    for(ll i=0;i<ans.size();i++)
    {
        cout<<ans[i]<<" ";
    }
    cout<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main()
{
    ll n,m,k;
    cin>>n>>m>>k;
    vector <ll> ans;
    for(ll i=0;i<k;i++)
    {
        ans.push_back(1);
    }
    ans.push_back(n);
    ll x=k-1;
    for(ll i=0;i<k-1;i++)
    {
        ans.push_back(n+1);
    }
    if(n==m)
    {
        if(k==1)
            ans.push_back(2*n-1);
        else
        {
            ans.push_back(2*n);
        }
        if(n<=2)
            ans.push_back(2*n);
    }
    else if(n==m+1)
    {
        if(k==1)
            ans.push_back(n+1);
    }
    cout<<ans.size()<<endl;
    for(ll i=0;i<ans.size();i++)
    {
        cout<<ans[i]<<" ";
    }
    cout<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    ll n,m,k;
    cin>>n>>m>>k;
    if(n==m)
    {
        if(k!=1)
            cout<<2*k+1<<endl;
        else
            cout<<2*k+2<<endl;
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        cout<<2*n-1<<" ";
        if(k==1)
            cout<<2*n;
    }
    else
    {
        if(n!=m+1)
            cout<<2*k<<endl;
        else if(k==1)
        {
            cout<<2*k+1<<endl;
        }
        else
        {
            cout<<2*k<<endl;
        }
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        if((n==m+1)&&(k==1))
            cout<<n+1<<" ";
    }
    cout<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    ll n,m,k;
    cin>>n>>m>>k;
    if(n==m)
    {
        cout<<2*k+1<<endl;
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
        cout<<2*n-1<<" ";
    }
    else
    {
        cout<<2*k<<endl;
        for(ll i=0;i<k;i++)
        {
            cout<<1<<" ";
        }
        cout<<n<<" ";
        for(ll i=0;i<k-1;i++)
        {
            cout<<n+1<<" ";
        }
    }
    cout<<endl;
}


#include <bits/stdc++.h>

#define FAST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define DECIMAL(n)  std::cout << std::fixed;std::cout << std::setprecision(n);
#define hell 1000000007
#define PI 3.14159265358979323844
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define endl "\n"
#define maxc(v) max_element(all(v))
#define minc(v) min_element(all(v))
#define GCD(m,n) __gcd(m,n)
#define LCM(m,n) m*(n/GCD(m,n))
#define inputarr(a,n) for(int i=0;i<n;++i) cin>>a[i]
#define initarr(a,n,x) for (int i=0;i<n;++i) a[i]=x
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define sz(a) (int)a.size()
#define sl(a) (int)a.length()
#define invect(data,n,commands) for(int i = 0;i<n;i++){int tmp;cin>>tmp;data.pb(tmp);commands}
#define inset(data,n,commands) for(int i = 0;i<n;i++){int tmp;cin>>tmp;data.insert(tmp);commands}
#define display(x) trav(a,x) cout<<a<<" ";cout<<endl

#define ll long long
#define ld long double
#define pii std::pair<int, int>
#define pll std::pair<ll, ll>
#define vi vector<int>
#define vvi vector<vi >
#define vii vector<pii >

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}

pii operator+(pii a, pii b)
{
    return {a.fi+b.fi,a.se+b.se};
}
pll operator+(pll a, pll b)
{
    return {a.fi+b.fi,a.se+b.se};
}
std::ostream& operator<<(std::ostream& out,pii a)
{
    out<<a.fi<<" "<<a.se<<endl;
    return out;
}
std::ostream& operator<<(std::ostream& out,pll a)
{
    out<<a.fi<<" "<<a.se<<endl;
    return out;
}
std::istream& operator>>(std::istream& in,pii &a)
{
    in>>a.fi>>a.se;
    return in;
}
std::istream& operator>>(std::istream& in,pll &a)
{
    in>>a.fi>>a.se;
    return in;
}

ll bpow(ll x, ll v) {
  if (v == 0)
    return 1 % hell;

  if (v % 2 == 1)
    return (x * bpow(x, v - 1)) % hell;

  ll r = bpow(x, v / 2);

  return (r * r) % hell;
}

using namespace std;

void solve()
{
  int n,m,k,cur=0,day;
  cin>>n>>m>>k;
  vi ans;
  queue <int> q,q2;
  for (int i = 0; i < k; ++i)
  {
    q.push(1);
    ans.pb(1);
  }
  cur=k;
  day=0;
  while(day<=2*(n+m))
  { day++;
    //trace(cur,day,1);
    while(day==q2.front())
    {
      q.push(day);
      cur++;
      q2.pop();
    }
    //trace(cur,day,2);
    if(cur<k)
    {
      while(cur<k)
      {
        cur++;
        q.push(day);
        ans.pb(day);
      }
    }
    //trace(cur,day,3);
    while(day==q.front()+n-1)
    {
      q.pop();
      cur--;
      q2.push(day+m+1);
    }
    if(cur<1)
    {
      ans.pb(day);
      q.push(day);
      cur++;
    }
    //trace(cur,day,4);

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

}

int main()
{
   FAST
   #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
#endif
int t=1;
//cin>>t;
while(t--)
    solve();
}


#include <bits/stdc++.h>

#define FAST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define DECIMAL(n)  std::cout << std::fixed;std::cout << std::setprecision(n);
#define hell 1000000007
#define PI 3.14159265358979323844
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define endl "\n"
#define maxc(v) max_element(all(v))
#define minc(v) min_element(all(v))
#define GCD(m,n) __gcd(m,n)
#define LCM(m,n) m*(n/GCD(m,n))
#define inputarr(a,n) for(int i=0;i<n;++i) cin>>a[i]
#define initarr(a,n,x) for (int i=0;i<n;++i) a[i]=x
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define sz(a) (int)a.size()
#define sl(a) (int)a.length()
#define invect(data,n,commands) for(int i = 0;i<n;i++){int tmp;cin>>tmp;data.pb(tmp);commands}
#define inset(data,n,commands) for(int i = 0;i<n;i++){int tmp;cin>>tmp;data.insert(tmp);commands}
#define display(x) trav(a,x) cout<<a<<" ";cout<<endl

#define ll long long
#define ld long double
#define pii std::pair<int, int>
#define pll std::pair<ll, ll>
#define vi vector<int>
#define vvi vector<vi >
#define vii vector<pii >

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}

pii operator+(pii a, pii b)
{
    return {a.fi+b.fi,a.se+b.se};
}
pll operator+(pll a, pll b)
{
    return {a.fi+b.fi,a.se+b.se};
}
std::ostream& operator<<(std::ostream& out,pii a)
{
    out<<a.fi<<" "<<a.se<<endl;
    return out;
}
std::ostream& operator<<(std::ostream& out,pll a)
{
    out<<a.fi<<" "<<a.se<<endl;
    return out;
}
std::istream& operator>>(std::istream& in,pii &a)
{
    in>>a.fi>>a.se;
    return in;
}
std::istream& operator>>(std::istream& in,pll &a)
{
    in>>a.fi>>a.se;
    return in;
}

ll bpow(ll x, ll v) {
  if (v == 0)
    return 1 % hell;

  if (v % 2 == 1)
    return (x * bpow(x, v - 1)) % hell;

  ll r = bpow(x, v / 2);

  return (r * r) % hell;
}

using namespace std;

void solve()
{
  int n,m,k,cur=0,day;
  cin>>n>>m>>k;
  vi ans;
  queue <int> q,q2;
  for (int i = 0; i < k; ++i)
  {
    q.push(1);
    ans.pb(1);
  }
  cur=k;
  day=0;
  while(day<=2*(n+m))
  { day++;
    //trace(cur,day,1);
    while(!q2.empty()&&day==q2.front())
    {
      q.push(day);
      cur++;
      q2.pop();
    }
    //trace(cur,day,2);
    if(cur<k)
    {
      while(cur<k)
      {
        cur++;
        q.push(day);
        ans.pb(day);
      }
    }
    //trace(cur,day,3);
    while(!q.empty()&&day==q.front()+n-1)
    {
      q.pop();
      cur--;
      q2.push(day+m+1);
    }
    if(cur<1)
    {
      ans.pb(day);
      q.push(day);
      cur++;
    }
    //trace(cur,day,4);

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

}

int main()
{
   FAST
   #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
#endif
int t=1;
//cin>>t;
while(t--)
    solve();
}


//  Save to Drive
#include<iostream>
#include <bits/stdc++.h>
#define db double
#define ll long long int

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n,m,k;
    cin>>n>>m>>k;
    ll al=1;
    std::vector<ll> v;
    if(k==1)
    {
        while(al<=n+m)
        {
            v.push_back(al);
            al+=n-1;
        }
        cout<<v.size()<<"\n";
        for(ll i=0;i<v.size();i++)
        {
            cout<<v[i]<<" ";
        }
        cout<<"\n";
        return 0;
    }
    for(ll i=0;i<k;i++)
    {
        v.push_back(al);
    }
    al+=n-1;
    while(al<=n+m)
    {
        v.push_back(al);
        al++;
        if(al>n+m)
        {
            break;
        }
        for(ll i=0;i<k-1;i++)
        {
            v.push_back(al);
        }
        al+=n-1;
    }
    cout<<v.size()<<"\n";
    for(ll i=0;i<v.size();i++)
    {
        cout<<v[i]<<" ";
    }
    cout<<"\n";

    return 0;
}


//  Save to Drive
#include<iostream>
#include <bits/stdc++.h>
#define db double
#define ll long long int

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n,m,k;
    cin>>n>>m>>k;
    ll al=1;
    if(k==1)
    {
        while(al<=n+m)
        {
            cout<<al<<" ";
            al+=n-1;
        }
        return 0;
    }
    for(ll i=0;i<k;i++)
    {
        cout<<al<<" ";
    }
    al+=n-1;
    while(al<=n+m)
    {
        cout<<al<<" ";
        al++;
        if(al>=n+m)
        {
            break;
        }
        for(ll i=0;i<k-1;i++)
        {
            cout<<al<<" ";
        }
        al+=n-1;
    }

    return 0;
}


//  Save to Drive
#include<iostream>
#include <bits/stdc++.h>
#define db double
#define ll long long int

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n,m,k;
    cin>>n>>m>>k;
    ll al=1;
    std::vector<ll> v;
    if(k==1)
    {
        while(al<=n+m)
        {
            v.push_back(al);
            al+=n-1;
        }
        cout<<v.size()<<"\n";
        for(ll i=0;i<v.size();i++)
        {
            cout<<v[i]<<" ";
        }
        cout<<"\n";
        return 0;
    }
    for(ll i=0;i<k;i++)
    {
        v.push_back(al);
    }
    al+=n-1;
    while(al<=n+m)
    {
        v.push_back(al);
        al++;
        if(al>=n+m)
        {
            break;
        }
        for(ll i=0;i<k-1;i++)
        {
            v.push_back(al);
        }
        al+=n-1;
    }
    cout<<v.size()<<"\n";
    for(ll i=0;i<v.size();i++)
    {
        cout<<v[i]<<" ";
    }
    cout<<"\n";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,k ;
    cin>>n>>m>>k ;
    if(n>m && k>1)
    {
        cout<<k*2<<endl ;
        for(int i = 0 ; i < k ; i++) cout<<"1 " ;
        cout<<n<<" " ;
        for(int i = 1 ; i < k ; i++) cout<<n+1<<" " ; cout<<endl ;
    }
    else
    {
        vector<int>v ;
        for(int i = 0 ; i < k ; i++) v.push_back(1) ;
       // cout<<v.size()<<endl ;
        int ad=n ;
        if(k==1) ad-- ;
        for(int i = n ; i <= m+n ; i+=ad)
        {
            v.push_back(i) ;
            for(int j = 1 ; j < k && i+1<=m+n ; j++) v.push_back(i+1) ;
        }
        cout<<v.size()<<endl ;
        for(int x : v) cout<<x<<" " ; cout<<endl ;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,k ;
    cin>>n>>m>>k ;
    if(n>m)
    {
        cout<<k*2<<endl ;
        for(int i = 0 ; i < k ; i++) cout<<"1 " ;
        cout<<n<<" " ;
        for(int i = 1 ; i < k ; i++) cout<<n+1<<" " ; cout<<endl ;
    }
    else
    {
        vector<int>v ;
        for(int i = 0 ; i < k ; i++) v.push_back(1) ;
        int ad=n ;
        if(k==1) ad-- ;
        for(int i = n ; i <= m+n ; i+=ad)
        {
            v.push_back(i) ;
            for(int j = 1 ; j < k ; j++) v.push_back(i+1) ;
        }
        cout<<v.size()<<endl ;
        for(int x : v) cout<<x<<" " ; cout<<endl ;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,k ;
    cin>>n>>m>>k ;
    if(n>m)
    {
        cout<<k*2<<endl ;
        for(int i = 0 ; i < k ; i++) cout<<"1 " ;
        cout<<n<<" " ;
        for(int i = 1 ; i < k ; i++) cout<<n+1<<" " ; cout<<endl ;
    }
    else
    {
        vector<int>v ;
        for(int i = 0 ; i < k ; i++) v.push_back(1) ;
       // cout<<v.size()<<endl ;
        int ad=n ;
        if(k==1) ad-- ;
        for(int i = n ; i <= m+n ; i+=ad)
        {
            v.push_back(i) ;
            for(int j = 1 ; j < k && i+1<=m+n ; j++) v.push_back(i+1) ;
        }
        cout<<v.size()<<endl ;
        for(int x : v) cout<<x<<" " ; cout<<endl ;
    }
}


#include <bits/stdc++.h>
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define edl '\n'
#define PI 3.14159265
using namespace std;

int main()
{
	int n,m,k;
	cin>>n>>m>>k;
	int cnt = 0;
	if(k != 1)
	{
		if(n != m)
		{
			cnt= k + 1 + k-1;
			cout<<cnt<<endl;
			for(int i = 0; i< k; i++)cout<<0+1<<" ";
			cout<<n-1+1<<" ";
			for(int i = 0; i< k-1; i++)cout<<n+1<<" ";
		}
		if(n == m)
		{
			cnt = k + 2 + k-1;
			cout<<cnt<<endl;
			for(int i = 0; i< k; i++)cout<<0+1<<" ";
			cout<<n-1+1<<" ";
			for(int i = 0; i< k-1; i++)cout<<n+1<<" ";
			cout<<2*n-1+1<<" ";
		}
	}
	else
	{
		vector <int> A;
		int days = 0;
		cnt = 1;
		A.pb(0+1);
		days += n-1;
		while(days < n+m)
		{
			cnt++;
			A.pb(days+1);
			days = days + n-1;
		}
		cout<<cnt<<endl;
		for(int i = 0; i < cnt; i++)
		{
			cout<<A[i]<<" ";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define edl '\n'
#define PI 3.14159265
using namespace std;

int main()
{
	int n,m,k;
	cin>>n>>m>>k;
	int cnt = 0;
	if(k != 1)
	{
		if(n != m)
		{
			cnt= k + 1 + k-1;
			cout<<cnt<<endl;
			for(int i = 0; i< k; i++)cout<<0+1<<" ";
			cout<<n-1+1<<" ";
			for(int i = 0; i< k-1; i++)cout<<n+1<<" ";
		}
		if(n == m)
		{
			cnt = k + 2 + k-1;
			cout<<cnt<<endl;
			for(int i = 0; i< k; i++)cout<<0+1<<" ";
			cout<<n-1+1<<" ";
			for(int i = 0; i< k-1; i++)cout<<n+1<<" ";
			cout<<2*n-1+1<<" ";
		}
	}
	else
	{
		vector <int> A;
		int days = 0;
		cnt = 1;
		A.pb(0+1);
		days += n-1;
		while(days != n+m)
		{
			cnt++;
			A.pb(days+1);
			days = days + n-1;
		}
		cout<<cnt<<endl;
		for(int i = 0; i < cnt; i++)
		{
			cout<<A[i]<<" ";
		}
	}
	return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N=2e5+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

int check(int x)
{
    ans.clear();
    for(int i=1;i<=k;i++)
        ans.push_back(1);
    for(int i=1;i<=5*(n+m);i++)
        a[i].clear();
    int store=1;
    for(;store<=k;store++)
    {
        for(int i=1;i<=5*(n+m);i+=(n+m))
        {
            for(int j=i;j<=i+n-1;j++)
                a[j].push_back(store);
        }
    }
    int idx=n+1;
    x-=k;
    while(idx<=5*(n+m))
    {
        vector<int> v(a[idx].size());
        int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
        if(sz==0)
        {
            ans.push_back(idx-1);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx-1;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
        }
        while(a[idx].size()<k)
        {
            ans.push_back(idx);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
            store++;
        }
        idx++;
    }
    return 1;
}

int binsearch(int lo, int hi)
{
    while(lo<hi)
    {
        int mid=(lo+hi)>>1;
        if(check(mid))
            hi=mid;
        else
            lo=mid+1;
    }
    check(lo);
    return lo;
}

int32_t main()
{
    IOS;
    cin>>n>>m>>k;
    int reqd=binsearch(k, 2000);
    cout<<reqd<<endl;
    for(auto it:ans)
        cout<<it<<" ";
    return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"

const int N=1e5+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

inline int check(int x)
{
	ans.clear();
	for(int i=1;i<=k;i++)
		ans.push_back(1);
	for(int i=1;i<=2*(n+m);i++)
		a[i].clear();
	int store=1;
	for(;store<=k;store++)
	{
		for(int i=1;i<=2*(n+m);i+=(n+m))
		{
			for(int j=i;j<=i+n-1;j++)
				a[j].push_back(store);
		}
	}
	int idx=n+1;
	x-=k;
	while(idx<=2*(n+m))
	{
		vector<int> v(a[idx].size());
		int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
		if(sz==0)
		{
			ans.push_back(idx-1);
			x-=1;
			if(x<0)
				return 0;
			for(int i=idx-1;i<=2*(n+m);i+=(n+m))
			{
				for(int j=i;j<=i+n-1;j++)
					a[j].push_back(store);
			}
		}
		while(a[idx].size()<k)
		{
			ans.push_back(idx);
			x-=1;
			if(x<0)
				return 0;
			for(int i=idx;i<=2*(n+m);i+=(n+m))
			{
				for(int j=i;j<=i+n-1;j++)
					a[j].push_back(store);
			}
			store++;
		}
		idx++;
	}
	return 1;
}

int binsearch(int lo, int hi)
{
	while(lo<hi)
	{
		int mid=(lo+hi)>>1;
		if(check(mid))
			hi=mid;
		else
			lo=mid+1;
	}
	check(lo);
	return lo;
}

int32_t main()
{
	IOS;
	cin>>n>>m>>k;
	int reqd=binsearch(k, 4000);
	cout<<reqd<<endl;
	for(auto it:ans)
		cout<<it<<" ";
	return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"

const int N=1e5+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

inline int check(int x)
{
    ans.clear();
    for(int i=1;i<=k;i++)
        ans.push_back(1);
    for(int i=1;i<=5*(n+m);i++)
        a[i].clear();
    int store=1;
    for(;store<=k;store++)
    {
        for(int i=1;i<=5*(n+m);i+=(n+m))
        {
            for(int j=i;j<=i+n-1;j++)
                a[j].push_back(store);
        }
    }
    int idx=n+1;
    x-=k;
    while(idx<=5*(n+m))
    {
        vector<int> v(a[idx].size());
        int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
        if(sz==0)
        {
            ans.push_back(idx-1);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx-1;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
        }
        while(a[idx].size()<k)
        {
            ans.push_back(idx);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
            store++;
        }
        idx++;
    }
    return 1;
}

int binsearch(int lo, int hi)
{
    while(lo<hi)
    {
        int mid=(lo+hi)>>1;
        if(check(mid))
            hi=mid;
        else
            lo=mid+1;
    }
    check(lo);
    return lo;
}

int32_t main()
{
    IOS;
    cin>>n>>m>>k;
    int reqd=binsearch(k, 2000);
    cout<<reqd<<endl;
    for(auto it:ans)
        cout<<it<<" ";
    return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N=2e5+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

int check(int x)
{
    ans.clear();
    for(int i=1;i<=k;i++)
        ans.push_back(1);
    for(int i=1;i<=5*(n+m);i++)
        a[i].clear();
    for(int i=1;i<=5*(n+m);i+=(n+m))
    {
        for(int j=i;j<=i+n-1;j++)
            a[j].push_back(1);
    }
    int idx=n+1;
    x-=k;
    int store=2;
    while(idx<=5*(n+m))
    {
        vector<int> v(a[idx].size());
        int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
        if(!a[idx].size() || sz==0)
        {
            ans.push_back(idx-1);
            for(int j=1;j<=k-1;j++)
                ans.push_back(idx);
            x-=k;
            if(x<0)
                return 0;
            for(int i=idx-1;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
            store++;
            if(k>1)
            {
                for(int i=idx;i<=5*(n+m);i+=(n+m))
                {
                    for(int j=i;j<=i+n-1;j++)
                        a[j].push_back(store);
                }
                store++;
            }
        }
        idx++;
    }
    return 1;
}

int binsearch(int lo, int hi)
{
    while(lo<hi)
    {
        int mid=(lo+hi)>>1;
        if(check(mid))
            hi=mid;
        else
            lo=mid+1;
    }
    check(lo);
    return lo;
}

int32_t main()
{
    IOS;
    cin>>n>>m>>k;
    int reqd=binsearch(k, 2000);
    cout<<reqd<<endl;
    for(auto it:ans)
        cout<<it<<" ";
    return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"

const int N=1e4+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

inline int check(int x)
{
    ans.clear();
    for(int i=1;i<=k;i++)
        ans.push_back(1);
    for(int i=1;i<=5*(n+m);i++)
        a[i].clear();
    int store=1;
    for(;store<=k;store++)
    {
        for(int i=1;i<=5*(n+m);i+=(n+m))
        {
            for(int j=i;j<=i+n-1;j++)
                a[j].push_back(store);
        }
    }
    int idx=n+1;
    x-=k;
    while(idx<=5*(n+m))
    {
        vector<int> v(a[idx].size());
        int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
        if(sz==0)
        {
            ans.push_back(idx-1);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx-1;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
        }
        while(a[idx].size()<k)
        {
            ans.push_back(idx);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
            store++;
        }
        idx++;
    }
    return 1;
}

int binsearch(int lo, int hi)
{
    while(lo<hi)
    {
        int mid=(lo+hi)>>1;
        if(check(mid))
            hi=mid;
        else
            lo=mid+1;
    }
    check(lo);
    return lo;
}

int32_t main()
{
    IOS;
    cin>>n>>m>>k;
    int reqd=binsearch(k, 2000);
    cout<<reqd<<endl;
    for(auto it:ans)
        cout<<it<<" ";
    return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"

const int N=1e5+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

inline int check(int x)
{
    ans.clear();
    for(int i=1;i<=k;i++)
        ans.push_back(1);
    for(int i=1;i<=2*(n+m);i++)
        a[i].clear();
    int store=1;
    for(;store<=k;store++)
    {
        for(int i=1;i<=2*(n+m);i+=(n+m))
        {
            for(int j=i;j<=i+n-1;j++)
                a[j].push_back(store);
        }
    }
    int idx=n+1;
    x-=k;
    while(idx<=2*(n+m))
    {
        vector<int> v(a[idx].size());
        int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
        if(sz==0)
        {
            ans.push_back(idx-1);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx-1;i<=2*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
        }
        while(a[idx].size()<k)
        {
            ans.push_back(idx);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx;i<=2*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
            store++;
        }
        idx++;
    }
    return 1;
}

int binsearch(int lo, int hi)
{
    while(lo<hi)
    {
        int mid=(lo+hi)>>1;
        if(check(mid))
            hi=mid;
        else
            lo=mid+1;
    }
    check(lo);
    return lo;
}

int32_t main()
{
    IOS;
    cin>>n>>m>>k;
    int reqd=binsearch(k, 4000);
    cout<<reqd<<endl;
    for(auto it:ans)
        cout<<it<<" ";
    return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"

const int N=2e3+5;

int n, m, k;
vector<int> ans;
vector<int> a[N];

inline int check(int x)
{
    ans.clear();
    for(int i=1;i<=k;i++)
        ans.push_back(1);
    for(int i=1;i<=5*(n+m);i++)
        a[i].clear();
    int store=1;
    for(;store<=k;store++)
    {
        for(int i=1;i<=5*(n+m);i+=(n+m))
        {
            for(int j=i;j<=i+n-1;j++)
                a[j].push_back(store);
        }
    }
    int idx=n+1;
    x-=k;
    while(idx<=5*(n+m))
    {
        vector<int> v(a[idx].size());
        int sz=set_intersection(a[idx].begin(), a[idx].end(), a[idx-1].begin(), a[idx-1].end(), v.begin()) - v.begin();
        if(sz==0)
        {
            ans.push_back(idx-1);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx-1;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
        }
        while(a[idx].size()<k)
        {
            ans.push_back(idx);
            x-=1;
            if(x<0)
                return 0;
            for(int i=idx;i<=5*(n+m);i+=(n+m))
            {
                for(int j=i;j<=i+n-1;j++)
                    a[j].push_back(store);
            }
            store++;
        }
        idx++;
    }
    return 1;
}

int binsearch(int lo, int hi)
{
    while(lo<hi)
    {
        int mid=(lo+hi)>>1;
        if(check(mid))
            hi=mid;
        else
            lo=mid+1;
    }
    check(lo);
    return lo;
}

int32_t main()
{
    IOS;
    cin>>n>>m>>k;
    int reqd=binsearch(k, 2000);
    cout<<reqd<<endl;
    for(auto it:ans)
        cout<<it<<" ";
    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int n = 0, m = 0, k = 0;

  cin >> n >> m >> k;

  vector<int> am(n + m + 1);

  vector<int> ans;

  for(int i = 0; i <= n + m; i++)
    while(am[i] < k) {
      int st = (am[i] ? i : i - 1);
      st = max(st, 0);
      ans.pb(st);
      for(int j = st; j <= n + m; j++) am[j] += (((j - st) % (n + m)) < n);
    }

  cout << ans.size() << endl;

  for(auto& day : ans) cout << day + 1 << ' ';

  return 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int n = 0, m = 0, k = 0;

  cin >> n >> m >> k;

  vector<int> am(n + m + 1, 0);

  vector<int> ans;

  for(int day = 1; day <= n + m; day++) {
    while(am[day] < k || ans.back() <= day - n + 1) {
      ans.pb(day);
      for(int j = day; j < day + n; j++) am[j]++;
    }
  }

  cout << ans.size() << endl;

  for(auto& x : ans) cout << x << ' ';

  return 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int n = 0, m = 0, k = 0;

  cin >> n >> m >> k;

  vector<int> am(((n + m) << 1), 0);

  vector<int> ans;

  for(int day = 1; day <= n + m; day++) {
    while(am[day] < k || ans.back() <= day - n + 1) {
      ans.pb(day);
      for(int j = day; j < day + n; j++) am[j]++;
    }
  }

  cout << ans.size() << endl;

  for(auto& x : ans) cout << x << ' ';

  return 0;
}
/*

*/


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1;
    forn(i,k){
        ans.pb(1);
	}
	curr += n-1;
	while ( 1 ){

        ans.pb(curr);
        if ( curr+1>=m+n ) break;
        forn(i,k-1){
            ans.pb(curr+1);
        }
        curr += n-1;
        if ( curr>m+n ) break;

	}
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1,lst;
    forn(i,k){
        ans.pb(1);
	}
	curr += n-1;
	while ( 1 ){

        ans.pb(curr);
        lst = curr+m;
        if ( curr+1>=m+n ) break;
        forn(i,k-1){
            ans.pb(curr+1);
            lst = curr+1+m;
        }
        if ( lst>m+n ) break;
        curr += n-1;
	}
	if ( curr-m-1<0 ) ans.pb(curr+m-1);
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1,lst;
    forn(i,k){
        ans.pb(1);
	}
	curr += n-1;
	while ( 1 ){

        ans.pb(curr);
        lst = curr+m;
        if ( curr+1>=m+n ) break;
        forn(i,k-1){
            ans.pb(curr+1);
            lst = curr+1+m;
        }
        if ( lst>m+n ) break;
        curr += n-1;
	}
	if ( curr-n-1<0 ) ans.pb(curr+m-1);
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1,lst;
    forn(i,k){
        ans.pb(1);
	}
	curr += n-1;
	while ( 1 ){

        ans.pb(curr);
        lst = curr;
        if ( curr+1>=m+n ) break;
        forn(i,k-1){
            ans.pb(curr+1);
            lst = curr+1;
        }
        curr += n-1;
        if ( lst>=m+n ) break;

	}
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1;
    forn(i,k){
        ans.pb(1);
	}
	curr += n-1;
	while ( 1 ){

        ans.pb(curr);
        if ( curr+1>=m+n ) break;
        forn(i,k-1){
            ans.pb(curr+1);
        }
        curr += n-1;
        if ( curr>=m+n ) break;

	}
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <assert.h>
#include <ctime>
#include <bitset>
#include <numeric>
#include <complex>
#include <conio.h>
using namespace std;

#define FOR(i, a, n) for (register int i = (a); i < (int)(n); ++i)
#define Size(n) ((int)(n).size())
#define ll long long
#define pb push_back
#define X first
#define Y second
#define EPS 1e-10
#define mp make_pair
#define MFOR(i,m,n) for(int i=m;i>n;i--)
#define error(x) cerr<<endl<<x<<endl;
#define st return 0;

void error2(const string &s,const int &t){
    cerr<<endl<<"  "<<s<<" = "<<t<<endl;
}

const int N=1000+2;
int a[2*N];

int main(){
    int n,m,k;
    cin>>n>>m>>k;
    if(k==1){
        int r=(n+m)/(n-1);
        if(r*(n-1)  != n+m) r++;
        cout<<r<<endl;
        int temp=1;
        while(temp<=n+m) {cout<<temp<<" "; temp+=n-1;}
        return 0;
    }
    int temp=n,s=k,t=0;
    if(!(k-1)) t++;
    a[1]=k;
    while(temp<n+m+1){
        a[temp]++;
        if(temp != n+m) a[temp+1]+=t+k-1;
        else s-=t+k-1;
        s+=k+t;
        temp+=n;
    }
    cout<<s<<endl;
    FOR(i,1,N+N)
        while(a[i]){
            a[i]--;
            cout<<i<<" ";
        }
    cout<<endl;
    #ifndef ONLINE_JUDGE
        cout<<endl;
        system("pause");
    #endif
    st;
}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1,lst;
    forn(i,k){
        ans.pb(1);
	}
	curr += n-1;
	while ( 1 ){

        ans.pb(curr);
        lst = curr+m;
        if ( curr+1>=m+n ) break;
        forn(i,k-1){
            ans.pb(curr+1);
            lst = curr+1+m;
        }
        curr += n-1;
        if ( lst>m+n ) break;

	}
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
typedef map<int,int> mii;
typedef map< long long int, long long int> mll;

#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

#define edl '\n'
#define ll long long int
#define mp make_pair

#define in(n) int n; cin >> n;
#define inl(n) ll n; cin >> n;
#define forn(i,n) for ( int i=0 ; i<n ; i++ )
#define forni(i,j,n) for ( int i=j ; i<n ; i++ )
#define forr (i,n) for ( int i=n; i>=0; i-- )
#define numb(arr,i) (int)(arr[i]-'0')

#define filecode ifstream in;ofstream out;in.open("input.txt");out.open("output.txt");
#define Arr(n) int arr[n]={}; forn(i,n) cin>>arr[i];
#define setPrecision(n) cout << std::setprecision(n) << std::fixed;
#define outk(z,n) cout << "Case #" << z << ": " << n << endl;
#define MOD 1000000007
#define PI 3.14159265

int main()
{
    ios::sync_with_stdio(false) ;
	cin.tie(0); cout.tie(0);
	in(n);in(m);in(k);
	vi ans;
	int curr = 1;
    forn(i,k){
        ans.pb(1);
	}
	while ( 1 ){

        curr += n-1;
        ans.pb(curr);
        forn(i,k-1){
            ans.pb(curr+1);
        }
        if ( curr>m ) break;

	}
	int len = ans.size();
	cout << len << endl;
	forn(i,len){
        cout << ans[i] << " ";
	}

}


//newf.cpp

#include <bits/stdc++.h>
using namespace std;
#define fast						ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

#define rep(i,a,b)               for(int i=a;i<b;i++)

#define pfy                       cout<<("YES")
#define pfn                      cout<<("NO")

typedef long long ll;
typedef long double ld;
#define nl                        cout<<("\n")
#define int ll

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}

int hell=round(1e18);

/* */

signed solve(){
	int m,n,k;cin>>n>>m>>k;

	if(k!=1)
		if(m<n){

			cout<<2*k<<endl;

			rep(i,0,k) cout<<1<<" ";
			cout<<n<<" ";
			rep(i,0,k-1) cout<<n+1<<" ";

		}else{

			cout<<2*k+1<<endl;

			rep(i,0,k) cout<<1<<" ";
			cout<<n<<" ";
			rep(i,0,k-1) cout<<n+1<<" ";
			cout<<2*n;

		}
	else{

		if(m<n-1){

			cout<<2<<endl;

			cout<<1<<" ";
			cout<<n<<" ";

		}else if(n!=2 || n==m+1){

			cout<<3<<endl;
			cout<<1<<" ";
			cout<<n<<" ";
			cout<<m+n<<" ";

		}else{

			cout<<3<<endl;
			cout<<1<<" ";
			cout<<2<<" ";
			cout<<3<<" ";
			cout<<4<<" ";

		}

	}

	return 0;
}

signed main(){

int t=1;

   fast;            //  freopen("input.txt","r",stdin); freopen ("output.txt","w",stdout);
//	cin>>t;

while(t--)
{
solve();
}

return 0;

}


//newf.cpp

#include <bits/stdc++.h>
using namespace std;
#define fast						ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

#define rep(i,a,b)               for(int i=a;i<b;i++)

#define pfy                       cout<<("YES")
#define pfn                      cout<<("NO")

typedef long long ll;
typedef long double ld;
#define nl                        cout<<("\n")
#define int ll

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}

int hell=round(1e18);

/* */

signed solve(){
	int m,n,k;cin>>n>>m>>k;

	if(k!=1)
		if(m<n){

			cout<<2*k<<endl;

			rep(i,0,k) cout<<1<<" ";
			cout<<n<<" ";
			rep(i,0,k-1) cout<<n+1<<" ";

		}else{

			cout<<2*k+1<<endl;

			rep(i,0,k) cout<<1<<" ";
			cout<<n<<" ";
			rep(i,0,k-1) cout<<n+1<<" ";
			cout<<2*n;

		}
	else{

		if(m<n-1){

			cout<<2<<endl;

			cout<<1<<" ";
			cout<<n<<" ";

		}else if(n!=2 || n==m+1){

			cout<<3<<endl;
			cout<<1<<" ";
			cout<<n<<" ";
			cout<<2*n-1<<" ";

		}else{

			cout<<4<<endl;
			cout<<1<<" ";
			cout<<2<<" ";
			cout<<3<<" ";
			cout<<4<<" ";

		}

	}

	return 0;
}

signed main(){

int t=1;

   fast;            //  freopen("input.txt","r",stdin); freopen ("output.txt","w",stdout);
//	cin>>t;

while(t--)
{
solve();
}

return 0;

}


#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define MAX 1000005
#define M_p 3.1415926
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define fastio ios::sync_with_stdio(0);cin.tie(0);
#define test int t;cin>>t;while(t--)
#define forr(i,x,y) for(int i=x;i<y;i++)
#define all(vect) vect.begin(),vect.end()
#define ull unsigned long long
#define fout fflush(stdout);
#define min3(x,y,z) min(min(x,y),z)
#define min4(x,y,z,w) min(min3(x,y,z),w)
#define endl "\n"
#define N 100005
#define inf 1e17
#define int long long
//#define size 1000000
//	memset(a,0,sizeof(a));
int32_t main()
{
	fastio
	int n,m,k;
	cin>>n>>m>>k;
	if(m<n)
	{
		if(k==1 && n-m==1)
		{
			cout<<2*k+1<<endl;
			cout<<1<<" "<<n<<" "<<n+m;
		}
		else
		{
			cout<<2*k<<endl;
			forr(i,0,k)
				cout<<1<<" ";
			cout<<n<<" ";
			forr(i,0,k-1)
				cout<<n+1<<" ";
		}
	}
	else if(m==n)
	{
		if(k==1 && n==2)
		{
			cout<<4<<endl<<1<<" "<<2<<" "<<3<<" "<<4;
		}
		else
		{
			cout<<2*k+1<<endl;
			forr(i,0,k)
				cout<<1<<" ";
			cout<<n<<" ";
			forr(i,0,k-1)
				cout<<n+1<<" ";
			if(k>1)
				cout<<2*n<<endl;
			else
				cout<<2*n-1<<" ";
		}
	}
	return 0;
}


#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define MAX 1000005
#define M_p 3.1415926
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define fastio ios::sync_with_stdio(0);cin.tie(0);
#define test int t;cin>>t;while(t--)
#define forr(i,x,y) for(int i=x;i<y;i++)
#define all(vect) vect.begin(),vect.end()
#define ull unsigned long long
#define fout fflush(stdout);
#define min3(x,y,z) min(min(x,y),z)
#define min4(x,y,z,w) min(min3(x,y,z),w)
#define endl "\n"
#define N 100005
#define inf 1e17
#define int long long
//#define size 1000000
//	memset(a,0,sizeof(a));
int32_t main()
{
	fastio
	int n,m,k;
	cin>>n>>m>>k;
	if(m<n)
	{
		if(k==1 && n-m==1)
		{
			cout<<2*k+1<<endl;
			cout<<1<<" "<<n<<" "<<n+m;
		}
		else
		{
			cout<<2*k<<endl;
			forr(i,0,k)
				cout<<1<<" ";
			cout<<n<<" ";
			forr(i,0,k-1)
				cout<<n+1<<" ";
		}
	}
	else if(m==n)
	{
		cout<<2*k+1<<endl;
		forr(i,0,k)
			cout<<1<<" ";
		cout<<n<<" ";
		forr(i,0,k-1)
			cout<<n+1<<" ";
		cout<<2*n-1<<" ";
	}
	return 0;
}


#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define MAX 1000005
#define M_p 3.1415926
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define fastio ios::sync_with_stdio(0);cin.tie(0);
#define test int t;cin>>t;while(t--)
#define forr(i,x,y) for(int i=x;i<y;i++)
#define all(vect) vect.begin(),vect.end()
#define ull unsigned long long
#define fout fflush(stdout);
#define min3(x,y,z) min(min(x,y),z)
#define min4(x,y,z,w) min(min3(x,y,z),w)
#define endl "\n"
#define N 100005
#define inf 1e17
#define int long long
//#define size 1000000
//	memset(a,0,sizeof(a));
int32_t main()
{
	fastio
	int n,m,k;
	cin>>n>>m>>k;
	if(m<n)
	{
		cout<<2*k<<endl;
		forr(i,0,k)
			cout<<1<<" ";
		cout<<n<<" ";
		forr(i,0,k-1)
			cout<<n+1<<" ";
	}
	else if(m==n)
	{
		cout<<2*k+1<<endl;
		forr(i,0,k)
			cout<<1<<" ";
		cout<<n<<" ";
		forr(i,0,k-1)
			cout<<n+1<<" ";
		cout<<2*n-1<<" ";
	}
	return 0;
}


#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define MAX 1000005
#define M_p 3.1415926
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define fastio ios::sync_with_stdio(0);cin.tie(0);
#define test int t;cin>>t;while(t--)
#define forr(i,x,y) for(int i=x;i<y;i++)
#define all(vect) vect.begin(),vect.end()
#define ull unsigned long long
#define fout fflush(stdout);
#define min3(x,y,z) min(min(x,y),z)
#define min4(x,y,z,w) min(min3(x,y,z),w)
#define endl "\n"
#define N 100005
#define inf 1e17
#define int long long
//#define size 1000000
//	memset(a,0,sizeof(a));
int32_t main()
{
	fastio
	int n,m,k;
	cin>>n>>m>>k;
	if(m<n)
	{
		if(k==1 && n-m==1)
		{
			cout<<2*k+1<<endl;
			cout<<1<<" "<<n<<" "<<n+m;
		}
		else
		{
			cout<<2*k<<endl;
			forr(i,0,k)
				cout<<1<<" ";
			cout<<n<<" ";
			forr(i,0,k-1)
				cout<<n+1<<" ";
		}
	}
	else if(m==n)
	{
		if(k==1 && n==2)
		{
			cout<<4<<endl<<1<<" "<<2<<" "<<3<<" "<<4;
		}
		else
		{
			cout<<2*k+1<<endl;
			forr(i,0,k)
				cout<<1<<" ";
			cout<<n<<" ";
			forr(i,0,k-1)
				cout<<n+1<<" ";
			cout<<2*n-1<<" ";
		}
	}
	return 0;
}


#include<iostream>
#include<vector>
using namespace std;
int main()
{
    vector<int> v;
    int n,m,k,a[10005]= {0},i,j;
    bool b[10005]= {0};
    cin>>n>>m>>k;
    b[1]=1;
    for(i=1; i<=n+m; i++)
    {
        while(a[i]<k || b[i+1]==0)
        {
            v.push_back(i);
            for(j=i; j<=i+n-1; j++)
            {
                a[j]++;
                a[j+n+m]++;
                b[j]=1;
            }
        }
    }
    cout<<v.size()<<endl;
    for(i=0; i<v.size(); i++) cout<<v[i]<<" ";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll    long long
#define ipt   freopen("input.txt","r",stdin)
#define opt   freopen("output.txt","w",stdout)

#define ff first
#define ss second

#define pb     push_back
#define m_p    make_pair
#define srt(v) sort(v.begin(),v.end())

#define MOD 998244353

ll arr[1000000];
ll ans[1000000];
int main()
{
    ll n,m,k;
    cin >> n >> m >> k;
    ll pos = 1;
    ll cnt = 0;
    ll peek = n+m;
    if(peek < 7) peek = 7;

    while(pos <= peek)
    {
        for(ll i = pos ; i <= peek; i++)
        {

            if(arr[i] < k)
            {
                pos = i;
                ll keep = arr[pos];
                if(keep == 0 && pos != 1) keep = pos-1;
                else keep = i;
                //cout << pos <<" " << keep <<  endl;
                for(ll j = keep; j <= keep+n-1; j++) arr[j]++;
                ans[++cnt] = keep;
                break;
            }
        }
        //cout << pos << endl;
        if(arr[peek] >= k) break;
    }
    cout << cnt << endl;
    for(ll i = 1; i <= cnt; i++) cout << ans[i] <<" ";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define fast                          \
    {                                 \
        ios ::sync_with_stdio(false); \
        cin.tie(0);                   \
        cout.tie(0);                  \
    }
#define pb(x) push_back(x)
#define ll long long

#define vi vector<int>
#define vl vector<long>
#define vll vector<long long>

#define infi INT_MAX
#define infl LONG_MAX
//const int inf = 1e17 + 7;
#define f(i, a, b) for (ll i = a; i < b; i++)
#define fi(i, a, b) for (ll i = (b - 1); i >= a; i--)
#define F first
#define S second
#define G(a, b) get<a>(b)
#define MP make_pair
#define MT make_tuple
#define ld long double
#define test(t) \
    ll t;       \
    cin >> t;   \
    while (t--)
string s;
vector<ll> prim;
set<ll> prim2;
void primeFactors(int n)
{
    while (n % 2 == 0)
    {
        prim.pb(2);
        prim2.insert(2);
        n = n / 2;
    }

    for (int i = 3; i <= sqrt(n); i = i + 2)
    {

        while (n % i == 0)
        {
            prim.pb(i);
            prim2.insert(i);
            n = n / i;
        }
    }

    if (n > 2)
    {
        prim.pb(n);
        prim2.insert(n);
    }
}
ll dp[10005][27];
void func()
{
    ll n,m,k;
    cin>>n>>m>>k;
    vector<ll> ans(k,1);
    for(int i=n;i<=n+m;i+=n-(k==1)){
        ans.pb(i);
        if(i==n+m){break;}
        for(int j=0;j<k-1;j++){ans.pb(i+1);}
    }
    cout<<ans.size()<<"\n";
    for(auto x:ans){
        cout<<x<<" ";
    }
}

int main()
{
    fast
        freopen("input.txt", "r", stdin);
    {
        func();
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define fast                          \
    {                                 \
        ios ::sync_with_stdio(false); \
        cin.tie(0);                   \
        cout.tie(0);                  \
    }
#define pb(x) push_back(x)
#define ll long long

#define vi vector<int>
#define vl vector<long>
#define vll vector<long long>

#define infi INT_MAX
#define infl LONG_MAX
//const int inf = 1e17 + 7;
#define f(i, a, b) for (ll i = a; i < b; i++)
#define fi(i, a, b) for (ll i = (b - 1); i >= a; i--)
#define F first
#define S second
#define G(a, b) get<a>(b)
#define MP make_pair
#define MT make_tuple
#define ld long double
#define test(t) \
    ll t;       \
    cin >> t;   \
    while (t--)
string s;
vector<ll> prim;
set<ll> prim2;
void primeFactors(int n)
{
    while (n % 2 == 0)
    {
        prim.pb(2);
        prim2.insert(2);
        n = n / 2;
    }

    for (int i = 3; i <= sqrt(n); i = i + 2)
    {

        while (n % i == 0)
        {
            prim.pb(i);
            prim2.insert(i);
            n = n / i;
        }
    }

    if (n > 2)
    {
        prim.pb(n);
        prim2.insert(n);
    }
}
ll dp[10005][27];
void func()
{
    ll n,m,k;
    cin>>n>>m>>k;
    vector<ll> ans(k,1);
    for(int i=n;i<=n+m;i+=n-(k==1)){
        ans.pb(i);
        if(i==n+m){break;}
        for(int j=0;j<k-1;j++){ans.pb(i+1);}
    }
    cout<<ans.size()<<"\n";
    for(auto x:ans){
        cout<<x<<" ";
    }
}

int main()
{
    fast
       // freopen("input.txt", "r", stdin);
    {
        func();
    }

    return 0;
}


#include<bits/stdc++.h>
#define int long long
#define float double
#define endl "\n"
#define debug cout<<"Good uptill here"<<endl<<flush;
#define deb(x) cout<<#x<<":"<<x<<endl;

using namespace std;

const int inf = 1e17 + 7;
const int MOD = 1e7 + 9;

int32_t main(){
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	//CODE FOR SPECIFIED INPUT AND OUTPUT
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int n,m,k;
	cin>>n>>m>>k;
	vector<int> ans;
	for(int i=0;i<k;i++) ans.push_back(1);
	int cur = n;
	while(cur<=n+m){
		ans.push_back(cur);
		if(cur == n+m) break;
		for(int i=0;i<k-1;i++) ans.push_back(i);
		cur += n - (k==1);
	}
	cout<<ans.size()<<endl;
	for(auto i:ans) cout<<i<<" ";
	cout<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define int long long
#define float double
#define endl "\n"
#define debug cout<<"Good uptill here"<<endl<<flush;
#define deb(x) cout<<#x<<":"<<x<<endl;

using namespace std;

const int inf = 1e17 + 7;
const int MOD = 1e7 + 9;

int32_t main(){
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	//CODE FOR SPECIFIED INPUT AND OUTPUT
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int n,m,k;
	cin>>n>>m>>k;
	vector<int> ans;
	for(int i=0;i<k;i++) ans.push_back(1);
	int cur = n;
	while(cur<=n+m){
		ans.push_back(cur);
		if(cur == n+m) break;
		for(int i=0;i<k-1;i++) ans.push_back(cur+1);
		cur += n - (k==1);
	}
	cout<<ans.size()<<endl;
	for(auto i:ans) cout<<i<<" ";
	cout<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define int long long
#define float double
#define endl "\n"
#define debug cout<<"Good uptill here"<<endl<<flush;
#define deb(x) cout<<#x<<":"<<x<<endl;

using namespace std;

const int inf = 1e17 + 7;
const int MOD = 1e7 + 9;

int32_t main(){
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	//CODE FOR SPECIFIED INPUT AND OUTPUT
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int n,m,k;
	cin>>n>>m>>k;
	int cnt = (2*k) + ((n==m)?1:0);
	cout<<cnt<<endl;
	for(int i=0;i<k;i++) cout<<1<<" ";
	cout<<n<<" ";
	for(int i=0;i<k-1;i++) cout<<n+1<<" ";
	if(n==m) cout<<n+m-1<<endl;
	else cout<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db long double
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define mi map<int,int>
#define ml map<ll,ll>
#define mii map<pii,int>
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define mod 1000000007
#define MAX 4294967295
#define EPS 1e-9
#define io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define MAXN 15000005
#define inf 1e10
#define PI acos(-1.0)
#define int long long

int n,m,k,x;

signed main(){
    io;
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin>>n>>m>>k;
    if((n+m)%(n-1)) x = (n+m)/(n-1)+1;
    else x = (n+m)/(n-1);
    int ans = x-1+k;
    cout<<ans<<endl;
    for(int i=0;i<k;i++) cout<<1<<" ";
    int cnt=1+n-1;
    for(int i=0;i<x-1;i++) cout<<cnt<<" ", cnt+=x-1;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db long double
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define mi map<int,int>
#define ml map<ll,ll>
#define mii map<pii,int>
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define mod 1000000007
#define MAX 4294967295
#define EPS 1e-9
#define io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define MAXN 15000005
#define inf 1e10
#define PI acos(-1.0)
#define int long long

int n,m,k,ans;

signed main(){
    io;
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin>>n>>m>>k;
    if(n==m){
        cout<<2*k+1<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<2*n-1<<endl;
    }
    else{
        cout<<2*k<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db long double
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define mi map<int,int>
#define ml map<ll,ll>
#define mii map<pii,int>
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define mod 1000000007
#define MAX 4294967295
#define EPS 1e-9
#define io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define MAXN 15000005
#define inf 1e10
#define PI acos(-1.0)
#define int long long

int n,m,k,ans;

signed main(){
    io;
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin>>n>>m>>k;
    if(n==m || (n==m+1 && k==1)){
        cout<<2*k+1<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<2*n-1<<endl;
    }
    else{
        cout<<2*k<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db long double
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define mi map<int,int>
#define ml map<ll,ll>
#define mii map<pii,int>
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define mod 1000000007
#define MAX 4294967295
#define EPS 1e-9
#define io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define MAXN 15000005
#define inf 1e10
#define PI acos(-1.0)
#define int long long

int n,m,k,ans;

signed main(){
    io;
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin>>n>>m>>k;
    if(n==2 && m==2){
        if(k==1){
            cout<<4<<endl;
            for(int i=1;i<=4;i++) cout<<i<<" ";
            cout<<endl;
        }
        else{
            cout<<2*k+1<<endl;
            for(int i=0;i<k;i++) cout<<1<<" ";
            cout<<n<<" ";
            for(int i=0;i<k-1;i++) cout<<n+1<<" ";
            cout<<2*n<<endl;
        }
    }
    else if(n==m || (n==m+1 && k==1)){
        cout<<2*k+1<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<2*n-1<<endl;
    }
    else{
        cout<<2*k<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db long double
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define mi map<int,int>
#define ml map<ll,ll>
#define mii map<pii,int>
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define mod 1000000007
#define MAX 4294967295
#define EPS 1e-9
#define io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define MAXN 15000005
#define inf 1e10
#define PI acos(-1.0)
#define int long long

int n,m,k,ans;

signed main(){
    io;
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
    cin>>n>>m>>k;
    if(n==2 && m==2 && k==1){
            cout<<4<<endl;
            for(int i=1;i<=4;i++) cout<<i<<" ";
            cout<<endl;
    }
    else if(n==m || (n==m+1 && k==1)){
        cout<<2*k+1<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<2*n<<endl;
    }
    else{
        cout<<2*k<<endl;
        for(int i=0;i<k;i++) cout<<1<<" ";
        cout<<n<<" ";
        for(int i=0;i<k-1;i++) cout<<n+1<<" ";
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    int n , m , k ;
    cin>>n>>m>>k;
    if(n==m&&k>1){
        cout<<2*k+1<<endl;
        for(int i=1;i<=k;i++)cout<<1<<" ";
        cout<<n<<" ";
        for(int i=2;i<=k;i++)cout<<n+1<<" ";
        cout<<n+2;
    }

    else if(n-m<=1&&k==1)cout<<3<<endl<<1<<" "<<n<<" "<<2*n-1;

    else if((n-m>1&&k==1)||(k>1)){
        cout<<2*k<<endl;
        for(int i=1;i<=k;i++)cout<<1<<" ";
        cout<<n<<" ";
        for(int i=2;i<=k;i++)cout<<n+1<<" ";
    }
}


#include <iostream>
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    int n , m , k ;
    cin>>n>>m>>k;
    if(n==m&&k>1){
        cout<<2*k+1<<endl;
        for(int i=1;i<=k;i++)cout<<1<<" ";
        cout<<n<<" ";
        for(int i=1;i<=k;i++)cout<<n+1<<" ";
    }

    else if(n-m<=1&&k==1)cout<<3<<endl<<1<<" "<<n<<" "<<2*n-1;

    else if((n-m>1&&k==1)||(k>1)){
        cout<<2*k<<endl;
        for(int i=1;i<=k;i++)cout<<1<<" ";
        cout<<n<<" ";
        for(int i=2;i<=k;i++)cout<<n+1<<" ";
    }
}


#include<bits/stdc++.h>
using namespace std;
int arr[5000];
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);
    for(int i =1  ; i <=n ; i++)
        arr[i]+=k;

    for(int i =1 ; i <=n+m ; i++)
    {
        if (arr[i+1]==0 && i!=n+m)
        {
            for(int j=0 ; j<n ; j++)
            {
                arr[j+i]++;

            }
            v.push_back(i);

        }

        if (arr[i]<k)
        {

                int temp=k-arr[i];
            for(int j=0 ; j<temp ; j++)
                v.push_back(i);
            for(int j=0 ; j<n ; j++){
                arr[i+j]+=temp;

            }
        }
    }

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);

        v.push_back(n);

        if (k>1)
    for(int i=0 ; i<k-1 ; i++)
        v.push_back(n+1);
    else {

    if (n+m>=2*n-1)v.push_back(n*2-1);
    }

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;
    int temp=m+n;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);
    temp--;

        v.push_back(n);
        temp-=(n-1);

    for(int i=0 ; i<k-1 ; i++)
        v.push_back(n+1);
    temp--;
    if (temp-(n-1)>=0)v.push_back(2*(n-1)+1);

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);

        v.push_back(n);

    for(int i=0 ; i<k-1 ; i++)
        v.push_back(n+1);

    if (n<=m+1)v.push_back(n*2-1);

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);

        v.push_back(n);

    for(int i=0 ; i<k-1 ; i++)
        v.push_back(n+1);

    if (n==m)v.push_back(n*2-1);

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int arr[5000];
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);
    for(int i =1  ; i <=n ; i++)
        arr[i]+=k;

    for(int i =1 ; i <=n+m ; i++)
    {
        if (arr[i+1]==0 )
        {
            for(int j=0 ; j<n ; j++)
            {
                arr[j+i]++;

            }
            v.push_back(i);

        }

        if (arr[i]<k)
        {

                int temp=k-arr[i];
            for(int j=0 ; j<temp ; j++)
                v.push_back(i);
            for(int j=0 ; j<n ; j++){
                arr[i+j]+=temp;

            }
        }
    }

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);

        v.push_back(n);

    for(int i=0 ; i<k-1 ; i++)
        v.push_back(n+1);

    if (k>1){
    if (n+m>=2*n)v.push_back(n*2-1);
    }
    else {
        if (n+m>=2*n-1)v.push_back(n*2-1);
    }

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int arr[5000];
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);
    for(int i =1  ; i <=n ; i++)
        arr[i]+=k;

    for(int i =1 ; i <=n+m ; i++)
    {
       if (arr[i+1]==0 && i!=n+m)
       {
            for(int j=0 ; j<n ;j++){
                arr[j+i]++;

            }
                v.push_back(i);

       }
       else if (arr[i]==1 && k!=1)
       {

        if (n+m-(n-1)>=n+m-i)k--;
           for(int j=0 ; j<k ; j++)
            v.push_back(i);
           for(int j=0 ; j<n ; j++)
           {
               arr[i+j]+=k;
           }
       }
    }

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);

        v.push_back(n);

        if (k>1)
    for(int i=0 ; i<k-1 ; i++)
        v.push_back(n+1);

    if (n+m>2*n-1)v.push_back(n*2-1);

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int arr[5000];
int main ()
{
    int n,m,k;
    cin>>n>>m>>k;

    vector<int > v;
    for(int i =0 ; i< k ; i++)
        v.push_back(1);
    for(int i =1  ; i <=n ; i++)
        arr[i]+=k;

    for(int i =1 ; i <=n+m ; i++)
    {
       if (arr[i+1]==0 && i!=n+m)
       {
            for(int j=0 ; j<n ;j++){
                arr[j+i]++;

            }
                v.push_back(i);

       }
       else if (arr[i]==1 )
       {

           for(int j=0 ; j<k-1 ; j++)
            v.push_back(i);
           for(int j=0 ; j<n ; j++)
           {
               arr[i+j]+=k-1;
           }
       }
    }

    cout<<v.size()<<endl;
    for(int i =0 ; i<v.size() ; i++)
        cout<<v[i]<<" ";

    return 0;
}


// abhishek soni.....[NSIT'22]
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define letsgo                  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl                    '\n'
#define mp                      make_pair
#define pb                      push_back
#define pf                      push_front
#define pob                     pop_back
#define pof                     pop_front
#define ff                      first
#define ss                      second
#define ALL(x)                  (x).begin(),(x).end()
#define int                     long long
#define ll                      long long
#define deb(x,y)                cout<<x<<" == "<<y<<endl;
#define _deb(x)                    cout<<"# "<<x<<endl;
#define set_bits(x)              __builtin_popcountll(x)
#define unset_bits(x)              __builtin_ctzll(x)
#define nl(i,a,b,j,m,n)         for(int i=a;i<b;i++)for(int j=m;j<n;j++)
#define fl(i,a,b)               for(int i=a;i<b;i++)
#define bl(i,a,b)               for(int i=a;i>=b;i--)
#define ma(arr,size,type)       type*arr=new type[size]()
#define m2a(arr,row,col,type)   type**arr=new type*[row];fl(i,0,row) arr[i]=new type[col]()
using namespace std;
using namespace __gnu_pbds;
typedef pair<int,int>           pii;
typedef pair<int,pair<int,int>> piii;
typedef vector<vector<int>>     matrix;
/*______________________________________________________________________________________________________________*/
int pow(int a,int b,int m){
    if(a==0)return 0;
    if(b==0)return 1;
    int temp=pow(a,b/2,m);
    temp = ((temp%m)*(temp%m))%m;
    if(b&1) temp = ((temp%m)*(a%m))%m;
    return temp;
}
int string_to_num(string s){
    stringstream num(s); int x; num >> x; return x;
}
string num_to_string(int n){
    string s;
    while(n>0){ s=char(n%10+'0')+s; n/=10; }
    return ((s.length()==0)? "0" : s );
}
/*______________________________________________________________________________________________________________*/

const int mod=1e9+7;
const int R_max=1e2+5;
const int C_max=1e2+5;
/*______________________________________________________________________________________________________________*/

void solve(){
    int n,m,k; cin>>n>>m>>k;
    vector<int> ans;
    if(m == n){
        ans.resize(2*k+1);
    }else if(m < n){
        ans.resize(2*k);
    }else{
        int len = ceil(((double(m))/n)) + ceil(((double(m))/n)) * k;
        if(m % n == 0) len++;
        ans.resize(len);
    }
    int len = ans.size();
    // cout<<"len : "<<len<<endl;
    int cnt = 1;
    int ind = 0;
    fl(i,0,k) ans[ind++] = cnt;
    len -= k;
    if(k == 1) cnt += n - 1;
    else cnt += n;
    while(len > 0){
        bool temp = false;
        if(len > 0){
            ans[ind++] = cnt - 1;
            if(k == 1) ans[ind - 1]++;
            len--;
        }
        if(len > 0){
            fl(i,0,k-1){
                ans[ind++] = cnt;
            }
             if(k == 1) cnt += n - 1;
            else cnt += n;
        }
    }
    cout<<ans.size()<<endl;
    fl(i,0,ans.size()){
        cout<<ans[i]<<" ";
    }
    cout<<endl;

}

signed main(){
    letsgo
    int t=1;
    // cin>>t;
    for(int T=1;T<=t;T++){
        // cout<<"test case # "<<T<<endl;
        // clock_t z = clock();
        solve();
        // cerr << "Run Time : " << ((double)(clock() - z) / CLOCKS_PER_SEC);
    }
}


// abhishek soni.....[NSIT'22]
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define letsgo                  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl                    '\n'
#define mp                      make_pair
#define pb                      push_back
#define pf                      push_front
#define pob                     pop_back
#define pof                     pop_front
#define ff                      first
#define ss                      second
#define ALL(x)                  (x).begin(),(x).end()
#define int                     long long
#define ll                      long long
#define deb(x,y)                cout<<x<<" == "<<y<<endl;
#define _deb(x)                    cout<<"# "<<x<<endl;
#define set_bits(x)              __builtin_popcountll(x)
#define unset_bits(x)              __builtin_ctzll(x)
#define nl(i,a,b,j,m,n)         for(int i=a;i<b;i++)for(int j=m;j<n;j++)
#define fl(i,a,b)               for(int i=a;i<b;i++)
#define bl(i,a,b)               for(int i=a;i>=b;i--)
#define ma(arr,size,type)       type*arr=new type[size]()
#define m2a(arr,row,col,type)   type**arr=new type*[row];fl(i,0,row) arr[i]=new type[col]()
using namespace std;
using namespace __gnu_pbds;
typedef pair<int,int>           pii;
typedef pair<int,pair<int,int>> piii;
typedef vector<vector<int>>     matrix;
/*______________________________________________________________________________________________________________*/
int pow(int a,int b,int m){
    if(a==0)return 0;
    if(b==0)return 1;
    int temp=pow(a,b/2,m);
    temp = ((temp%m)*(temp%m))%m;
    if(b&1) temp = ((temp%m)*(a%m))%m;
    return temp;
}
int string_to_num(string s){
    stringstream num(s); int x; num >> x; return x;
}
string num_to_string(int n){
    string s;
    while(n>0){ s=char(n%10+'0')+s; n/=10; }
    return ((s.length()==0)? "0" : s );
}
/*______________________________________________________________________________________________________________*/

const int mod=1e9+7;
const int R_max=1e2+5;
const int C_max=1e2+5;
/*______________________________________________________________________________________________________________*/

void solve(){
    int n,m,k; cin>>n>>m>>k;
    vector<int> ans;
    fl(i,0,k) ans.pb(1);
    int day = n;
    while(day <= n + m){
        ans.pb(day);
        day++;
        if(day <= n + m){
            fl(i,0,k-1){
                ans.pb(day);
            }
        }
        day += n - 1;
        if(k == 1) day--;
    }
    cout<<ans.size()<<endl;
    fl(i,0,ans.size()){
        cout<<ans[i]<<" ";
    }
    cout<<endl;

}

signed main(){
    letsgo
    int t=1;
    // cin>>t;
    for(int T=1;T<=t;T++){
        // cout<<"test case # "<<T<<endl;
        // clock_t z = clock();
        solve();
        // cerr << "Run Time : " << ((double)(clock() - z) / CLOCKS_PER_SEC);
    }
}


#include <bits/stdc++.h>

using namespace std;

int n,m,k;

int main (){
	cin >> n >> m >> k;
	if (n > m){
		if (k > 1){
			cout << k * 2 << endl;
			for (int i = 0; i < k; i++){
				cout << 1 << " ";
			}
			for (int i = 0; i < k - 1; i++){
				cout << n << " ";
			}
			cout << n + 1;
		}
		else{
			cout << 3 << endl;
			cout << 1 << " " << n + 1 << " " << n;
		}
	}
	else{
		cout << k * 2 + 1 << endl;
		for (int i = 0; i < k; i++){
			cout << 1 << " ";
		}
		for (int i = 0; i < k; i++){
			cout << n + 1 << " ";
		}
		cout << n;
	}

	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;
using ll = long long;
using ull = unsigned long long;

const long double inf = 1e9 + 7;

void solve(){
	int n , k;
	cin >> n >> k;
	vector<int> a(n);
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	sort(a.rbegin() , a.rend());
	int ans = a[0];
	int id = 1;
	while(k--){
		ans += a[id];
		id += 1;
	}
	cout << ans << endl;
}

int main(){
	int t;
	cin >> t;
	for(int i = 0; i < t; i++){
		solve();
	}
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;
using ll = long long;
using ull = unsigned long long;

const long double inf = 1e9 + 7;

void solve(){
	int n , k;
	cin >> n >> k;
	vector<int> a(n);
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	sort(a.rbegin() , a.rend());
	int ans = a[0];
	for(int i = 1; i <= k; i++){
		ans += a[i];
	}
	cout << ans << endl;
}

int main(){
	int t;
	cin >> t;
	for(int i = 0; i < t; i++){
		solve();
	}
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;
using ll = long long;
using ull = unsigned long long;

const long double inf = 1e9 + 7;

void solve(){
	int n , k;
	cin >> n >> k;
	vector<ll> a(n);
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	sort(a.rbegin() , a.rend());
	ll ans = a[0];
	int id = 1;
	while(k--){
		ans += a[id];
		id += 1;
	}
	cout << ans << endl;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int t;
	cin >> t;
	for(int i = 0; i < t; i++){
		solve();
	}
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;
using ll = long long;
using ull = unsigned long long;

const long double inf = 1e9 + 7;

void solve(){
	int n , k;
	cin >> n >> k;
	vector<int> a(n);
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	sort(a.rbegin() , a.rend());
	ll ans = a[0];
	int id = 1;
	while(k--){
		ans += (ll)a[id];
		id += 1;
	}
	cout << ans << endl;
}

int main(){
	int t;
	cin >> t;
	for(int i = 0; i < t; i++){
		solve();
	}
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;
using ll = long long;
using ull = unsigned long long;

const long double inf = 1e9 + 7;

void solve(){
	int n , k;
	cin >> n >> k;
	vector<int> a(n);
	ll ans = 0;
	for(int i = 0; i < n; i++){
		cin >> a[i];
		if(i > 0 && i <= k){
			ans += (ll)a[i];
		}
	}
	cout << ans << endl;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int t;
	cin >> t;
	for(int i = 0; i < t; i++){
		solve();
	}
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;
using ll = long long;
using ull = unsigned long long;

const long double inf = 1e9 + 7;

void solve(){
	int n , k;
	cin >> n >> k;
	vector<int> a(n);
	ll ans = 0;
	for(int i = 0; i < n; i++){
		cin >> a[i];
		if(i <= k){
			ans += (ll)a[i];
		}
	}
	cout << ans << endl;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int t;
	cin >> t;
	for(int i = 0; i < t; i++){
		solve();
	}
	return 0;
}