You are given three integers $$$a$$$, $$$b$$$ and $$$x$$$. Your task is to construct a binary string $$$s$$$ of length $$$n = a + b$$$ such that there are exactly $$$a$$$ zeroes, exactly $$$b$$$ ones and exactly $$$x$$$ indices $$$i$$$ (where $$$1 \le i < n$$$) such that $$$s_i \ne s_{i + 1}$$$. It is guaranteed that the answer always exists.For example, for the string "01010" there are four indices $$$i$$$ such that $$$1 \le i < n$$$ and $$$s_i \ne s_{i + 1}$$$ ($$$i = 1, 2, 3, 4$$$). For the string "111001" there are two such indices $$$i$$$ ($$$i = 3, 5$$$).Recall that binary string is a non-empty sequence of characters where each character is either 0 or 1.

The first line of the input contains three integers $$$a$$$, $$$b$$$ and $$$x$$$ ($$$1 \le a, b \le 100, 1 \le x < a + b)$$$.

Print only one string $$$s$$$, where $$$s$$$ is any binary string satisfying conditions described above. It is guaranteed that the answer always exists.

NoteAll possible answers for the first example:   1100;  0011. All possible answers for the second example:   110100;  101100;  110010;  100110;  011001;  001101;  010011;  001011.

    #include "iostream"
    using namespace std;
    int main()
    {
        int a,b,x,n;
        char u,v;
        cin>>a>>b>>x;
        n=a+b;
        if(a>b) u='0',v='1';
        else {u='1',v='0';swap(a,b);}
        for(int i=0;i<x/2;i++) {cout<<u<<v;a--,b--;}
        if(x%2==0){
            while(b--) cout<<v;
            while(a--) cout<<u;
        }
        else{
            while(a--) cout<<u;
            while(b--) cout<<v;
        }
        return 0;
    }

#include <cstdio>
using namespace std;
int main()
{
    int a, b, x;
    scanf("%d%d%d", &a, &b, &x);
    x++;
    if (x % 2 == 0)
    {
        for (int i = 0; i < b - x / 2 + 1; i++) putchar('1');
        for (int i = 0; i < a - x / 2 + 1; i++) putchar('0');
        for (int i = 1; i < x / 2; i++) putchar('1'), putchar('0');
    }
    else
    {
        bool flag = a < b;
        if (flag)
            b--;
        else
            putchar('0'), a--;
        for (int i = 0; i < b - x / 2 + 1; i++) putchar('1');
        for (int i = 0; i < a - x / 2 + 1; i++) putchar('0');
        for (int i = 1; i < x / 2; i++) putchar('1'), putchar('0');
        if (flag) putchar('1');
    }
    return 0;
}

#include <iostream>
using namespace std;

int main()
{
	int a, b, x, j = 1;
	cin >> a >> b >> x;
	if (a > b)
		j = 0;
	while (x > 1)
	{
		if (j % 2 == 0)
			cout << '0', a--;
		else
			cout << '1', b--;
		x--, j++;
	}
	if (j % 2 == 0)
	{
		while (a--)
			cout << '0';
		while (b--)
			cout << '1';
	}
	else
	{
		while (b--)
			cout << '1';
		while (a--)
			cout << '0';
	}
	return 0;
}

#include "iostream"
using namespace std;
int main()
{
    int a,b,x,n;
    char u,v;
    cin>>a>>b>>x;
    n=a+b;
    if(a>b)
        u='0',v='1';
    else
    {
        u='1',v='0';swap(a,b);//数目对应
    }
    for(int i=0;i<x/2;i++)
    {
        cout<<u<<v;
        a--,b--;
    }
    if(x%2==0)
    {
        while(b--)
            cout<<v;
        while(a--)
            cout<<u;
    }
    else
    {
        while(a--)
            cout<<u;
        while(b--)
            cout<<v;
    }
    return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <algorithm>
#include <map>
#include <queue>
#include <clocale>
#include <bitset>
#include <cstring>
#include <memory.h>
#include <numeric>
#include <iomanip>
#include <stack>
#include <list>

using namespace std;

#pragma comment (linker, "/STACK:667177216")
#define ll long long
#define LL long long
#define ull unsigned long long
#define ld long double
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pb push_back
const ll mod = 1000000007;
#define INF (int)(2e9)
#define LINF (ll)(4e18)
#define forit(mas) for(auto(it)=(mas).begin();(it)!=(mas).end();(it)++)
#define pii pair<int,int>

string s;

int check() {
	int cnt = 0;
	for (int i = 1; i < s.size(); i++) cnt += s[i] != s[i - 1];
	return cnt;
}

int main() {

#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	int a, b, x;
	cin >> a >> b >> x;
	s = "";
	int f = a > b;
	int ans = 0;
	while (1) {
		if (f) {
			s += '0';
			a--;
		}
		else {
			s += '1';
			b--;
		}
		if (s.size() > 1) ans += (s[s.size() - 1] != s[s.size() - 2]);
		if (ans == x) break;
		if (ans == x - 1) {
			if (s.back() == '0') {
				while (a) {
					s += '0';
					a--;
				}
				while (b) {
					s += '1';
					b--;
				}
			}
			else {
				while (b) {
					s += '1';
					b--;
				}
				while (a) {
					s += '0';
					a--;
				}
			}
			break;
		}
		f ^= 1;
	}
	cout << s;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	int a,b,x;
	cin>>a>>b>>x;
	string s;
	int temp = x/2;
	if(x%2==0 && x/2!=b)
	{
		s+="1";
		b--;
		temp--;
	}
	for(int i=0;i<temp;i++)
	{
		s+="01";
	}
	a-=temp;b-=temp;
	while(a--)
		s+="0";
	while(b--)
		s+="1";
	cout<<s<<endl;
	return 0;
}

# include<bits/stdc++.h>
using namespace std;
int p[2], n, k;
int main(){
    cin >> p[0] >> p[1] >> n;
    k = p[1] > p[0];
    for(int i = 1; i < n; i++, p[k]--, k ^= 1) cout << char(k + '0');
    cout << string(p[k], k + '0') << string(p[!k], !k + '0');
}

#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
#include <algorithm>
#include <cmath>
#include <functional>

using namespace std;

int main()
{
	int a, b, x;
	cin >> a >> b >> x;
	string ans;
	if (x == 1)
	{
		while (a--)
		{
			ans += '0';
		}
		while (b--)
		{
			ans += '1';
		}
		cout << ans;
		return 0;
	}
	if (x % 2 == 0)
	{
			if (a == max(a, b))
			{
				while (x)
				{
					ans += '0';
					ans += '1';
					x -= 2;
					a--;
					b--;
				}
				while (b--)
				{
					ans += '1';
				}
				while (a--)
				{
					ans += '0';
				}
				cout << ans;
				return 0;
			}
			if (b == max(a, b))
			{
				while (x)
				{
					ans += '1';
					ans += '0';
					x -= 2;
					a--;
					b--;
				}
				while (a--)
				{
					ans += '0';
				}
				while (b--)
				{
					ans += '1';
				}
				cout << ans;
				return 0;
			}

	}
	else
	{
		if (a == max(a, b))
		{
			while (x > 1)
			{
				ans += '0';
				ans += '1';
				x -= 2;
				a--;
				b--;
			}
			while (a--)
			{
				ans += '0';
			}
			while (b--)
			{
				ans += '1';
			}
			cout << ans;
			return 0;
		}
		if (b == max(a, b))
		{
			while (x > 1)
			{
				ans += '1';
				ans += '0';
				x -= 2;
				a--;
				b--;
			}
			while (b--)
			{
				ans += '1';
			}
			while (a--)
			{
				ans += '0';
			}
			cout << ans;
			return 0;
		}
	}

}

#include<iostream>
#include<cstdio>
#include<fstream>
#include<set>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
#include<vector>
#include<iomanip>
#include<cstdlib>
#include<list>
#include<queue>
#include<stack>
#include<algorithm>
#define inf 0x3f3f3f3f
#define MOD 1000000007
#define mem0(a) memset(a,0,sizeof(a))
#define mem1(a) memset(a,-1,sizeof(a))
#define meminf(a) memset(a,inf,sizeof(a))
typedef long long ll;
using namespace std;
int main()
{
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  /*freopen("test.txt","r",stdin);
  freopen("output.txt","w",stdout);*/
  int n,m,k;
  char a='1',b='0';
  cin>>n>>m>>k;
  if(n>m)swap(a,b);
  int t=k/2;
  while(t--)
  {
    cout<<a<<b;
    n--;m--;
  //  cout<<n<<' '<<m<<endl;
  }
  if(n>m&&k%2)
  {
    for(int i=1;i<=n;i++)cout<<'0';
    for(int i=1;i<=m;i++)cout<<'1';
  }
  else if(n>m&&k%2==0)
  {
    for(int i=1;i<=m;i++)cout<<'1';
    for(int i=1;i<=n;i++)cout<<'0';
  }
  else if(n<=m&&k%2)
  {
    for(int i=1;i<=m;i++)cout<<'1';
    for(int i=1;i<=n;i++)cout<<'0';
  }
  else
  {
    for(int i=1;i<=n;i++)cout<<'0';
    for(int i=1;i<=m;i++)cout<<'1';
  }
  cout<<endl;
  return 0;
}

#define _CRT_SECURE_NO_WARNINGS

#pragma comment(linker, "/STACK:8000000")

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <queue>
#include <cstdlib>
#include <iostream>
#include <ctime>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define ll long long
#define ld long double
#define us unsigned short
#define ui unsigned int

using namespace std;

vector<int> v;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int a, b, x;
	cin >> a >> b >> x;
	int c, d;
	c = max(a, b);
	d = min(a, b);
	char c1 = '0';
	char c2 = '1';
	if (a < b)
		c1 = '1', c2 = '0';
	string s;
	int q = 0;
	while (x > 0) {
		s += (q == 0 ? c1 : c2);
		q = (q + 1) % 2;
		--x;
		if (q == 1) --c;
		if (q == 0) --d;
	}
	if (q == 0)
	{
		for (int i = 0; i < c; ++i)
			s += c1;
		string s1;
		for (int i = 0; i < s.size(); ++i)
		{
			if (s[i] == c2 && d > 0)
			{
				--d;
				--i;
				s1 += c2;
			}
			else
				s1 += s[i];
		}
		s = s1;
		//for (int i = 0; i < d; ++i)
		//	s += c2;
	}
	else
	{
		for (int i = 0; i < d; ++i)
			s += c2;
		//for (int i = 0; i < c; ++i)
		//	s += c1;
		string s1;
		for (int i = 0; i < s.size(); ++i)
		{
			if (s[i] == c1 && c > 0)
			{
				--c;
				--i;
				s1 += c1;
			}
			else
				s1 += s[i];
		}
		s = s1;
	}
	cout << s;
	return 0;
}

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

#define test ll T;sc(T);while(T--)
#define lf printf("\n")
#define sc(n) scanf("%lli",&n)
#define sc2(n,m) scanf("%lli%lli",&n,&m)
#define REP(i,n) for(ll i=0;i<n;i++)
#define ll long long int
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL)
#define MOD 1000000007
#define vi vector<ll>
#define ii pair<ll,ll>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define si set<ll>
#define st string

int main()
{
    ll a,b,x;
    sc(a);sc(b);sc(x);
    vi v;
    ll f=0;
    if(a==0)
    {
        REP(i,b) printf("1"); return 0;
    }
    if(b==0)
    {
        REP(i,a) printf("0"); return 0;
    }

    v.pb(0);
    a--;
    f=1;
    while(x>0)
    {
        if(f==1)
        {
            if(b==0) break;
            f=0;
            v.pb(1);
            b--;
        }
        else
        {
            if(a==0) break;
            f=1;
            v.pb(0);
            a--;
        }
        x--;
    }
    if(x==0)
    {
        REP(i,a)
        {
            printf("0");
        }
        for(ll i=0; i<v.size()-1;i++)
        {
            printf("%lli",v[i]);
        }
        if(v[v.size()-1]==0)
        {
            REP(i,b) printf("1");
            printf("0");
        }
        else
        {
            printf("1");
            REP(i,b) printf("1");
        }
    }
    else
    {
        if(b>0)
        {
            REP(i,b) printf("1");
            for(ll i=0; i<v.size()-1;i++)
            {
                printf("%lli",v[i]);
            }
            if(v[v.size()-1]==0)
            {
                printf("0");
                REP(i,a) printf("0");
            }
            else
            {
                REP(i,a) printf("0");
                printf("1");
            }
        }
        else
        {
            for(ll i=0; i<v.size();i++)
            {
                printf("%lli",v[i]);
            }
            REP(i,a) printf("0");
        }
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int zero, one, x;
    cin >> zero >> one >> x;

    // x = 1 01 10
    // x = 2 010 101

    string mix = "", ans;
    if (zero >= one) {
        mix += "0";
        zero--;
        int cur = 1;
        while (x > 0) {
            mix += to_string(cur);
            if (cur == 1)
                one--;
            else
                zero--;
            cur ^= 1;
            x--;
        }

        string zeroStr, oneStr;
        for (int i = 0; i < zero; i++)
            zeroStr += "0";
        for (int i = 0; i < one; i++)
            oneStr += "1";
        if (mix.back() != '1') {
            mix = mix.substr(0, mix.length() - 1) + oneStr + "0";
            oneStr = "";
        }
        ans = zeroStr + mix + oneStr;
    } else {
        mix += "1";
        one--;
        int cur = 0;
        while (x > 0) {
            mix += to_string(cur);
            if (cur == 1)
                one--;
            else
                zero--;
            cur ^= 1;
            x--;
        }
        string zeroStr, oneStr;
        for (int i = 0; i < zero; i++)
            zeroStr += "0";
        for (int i = 0; i < one; i++)
            oneStr += "1";
        if (mix.back() != '0') {
            mix = mix.substr(0, mix.length() - 1) + zeroStr + "1";
            zeroStr = "";
        }
        ans = oneStr + mix + zeroStr;
    }

    cerr << mix << endl;
    cout << ans << endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n, a, b, x;
int mem[102][102][202][2];
stack<bool>stck;
bool dp(int z, int o, int xx, bool f)
{
    if(z>a || o>b)
        return 0;
    if(z+o==n)
        return (xx==x);
    int ret= mem[z][o][xx][f];
    if(ret!=-1)
        return ret;
    ret= dp(z+1, o, xx+(f!=0), 0);
    if(ret)
    {
        stck.push(0);
        return mem[z][o][xx][f]= 1;
    }
    else
    {
        ret= dp(z, o+1, xx+(f!=1), 1);
        if(ret)
        {
            stck.push(1);
            return mem[z][o][xx][f]= 1;
        }
    }return mem[z][o][xx][f]= 0;
}
int main()
{
    while(cin>>a>>b>>x)
    {
        n= a+b;
        while(!stck.empty())
            stck.pop();
        memset(mem, -1, sizeof mem);
        dp(1, 0, 0, 0);
        memset(mem, -1, sizeof mem);
        if(stck.size()==0)
            dp(0, 1, 0, 1), stck.push(1);
        else stck.push(0);
        while(!stck.empty())
            cout<<stck.top(), stck.pop();
        cout<<endl;
    }

    return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cstring>

int a, b, x;	//a--0, b--1
char s[210];
int szS;

void doPrint(int &p, char first, int &count1, char second, int &count2, int &x)
{
	while (x > 0)
	{

		s[p] = first;p++;count1--;x--;
		if (x <= 0)
			return ;
		if (count2 > 0)
			s[p] = second;p++;count2--;x--;
	}
}

void printRemain(int &p, char mark, int &markCount)
{
	while (markCount > 0)
	{
		s[p] = mark;
		p++;
		markCount--;
	}
}

int main()
{
	scanf("%d%d%d", &a, &b, &x);
	szS = a + b;

	memset(s, 0, sizeof(s));
	int l = 0, r = szS - 1;

	if (x % 2 == 0)
	{
		if (a > b)
		{
			s[l] = '0';
			s[r] = '0';
			l++;r--;
			x = x - 2;
			a = a - 2;

			doPrint(l, '1', b, '0', a, x);

			printRemain(l, '0', a);
			printRemain(l, '1', b);
		}
		else
		{
			s[l] = '1';
			s[r] = '1';
			l++;r--;
			x = x - 2;
			b = b - 2;

			doPrint(l, '0', a, '1', b, x);

			printRemain(l, '1', b);
			printRemain(l, '0', a);
		}

	}
	else	//
	{
		if (a > b)
		{
			s[l] = '0';
			s[r] = '1';

			l++;
			r--;
			x--;
			a--; b--;

			doPrint(l, '1', b, '0', a, x);

			printRemain(l, '0', a);
			printRemain(l, '1', b);
		}
		else
		{
			s[l] = '1';
			s[r] = '0';

			l++;
			r--;
			x--;
			a--; b--;

			doPrint(l, '0', a, '1', b, x);

			printRemain(l, '1', b);
			printRemain(l, '0', a);

		}
	}

	printf("%s\n", s);

	return 0;
}

#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <climits>
#include <algorithm>
#include <string>
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <set>

using namespace std;
#define ll long long
#define mod 1000000007
#define N 1005

int constructBinString(int a, int b, int x)
{
    int d, i;

    // Divide index value by 2 and store
    // it into d
    d = x / 2;

    // If index value x is even and
    // x/2 is not equal to a
    if (x % 2 == 0 && x / 2 != a) {
        d--;
        cout << 0;
        a--;
    }

    // Loop for d for each d print 10
    for (i = 0; i < d; i++)
        cout << "10";

    // subtract d from a and b
    a = a - d;
    b = b - d;

    // Loop for b to print remaining 1's
    for (i = 0; i < b; i++) {
        cout << "1";
    }

    // Loop for a to print remaining 0's
    for (i = 0; i < a; i++) {
        cout << "0";
    }
}

int main(){
    int a, b, x, c;
    scanf("%d %d %d", &a, &b, &x);

    constructBinString(a, b, x);

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,x;
	cin>>a>>b>>x;
	char s[a+b];
	int one=0;
	int zero=0;
	int count=-1;
	int size=0;
	while(count!=x-1)
	{
		if(a<b)
		{
			if(size%2)
			{
				s[size++]='0';
				zero++;
			}
			else
			{
				s[size++]='1';
				one++;
			}
			count++;
		}
		else
		{
			if(size%2)
			{
				s[size++]='1';
				one++;
			}
			else
			{
				s[size++]='0';
				zero++;
			}
			count++;
		}
	}
	if(s[size-1]=='0')
	{
		int rem = a-zero;
		while(rem--)
			s[size++]='0';
		rem=b-one;
		while(rem--)
			s[size++]='1';
	}
	else
	{
		int rem = b-one;
		while(rem--)
			s[size++]='1';
		rem = a-zero;
		while(rem--)
			s[size++]='0';
	}
	s[size]='\0';
	// cout<<size<<endl;
	cout<<s<<endl;

}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vec vector <int>
#define vecl vector <long long>
#define fr(i,a,b) for (ll i=a;i<b;i++)
#define pb push_back
#define pii pair <int,int>
#define pll pair <long long,long long>
#define mp make_pair
#define ff first
#define ss second
#define maa 1000000007
int main()
{

    int z,o,x ;
    cin>>z>>o>>x ;
    vector<int>v ;
    if(o>z)
  {  o-- ;
    v.pb(1) ;
    for(int i=0;i<x;i++)
    {
        if(i%2==0)
        {
            v.pb(0) ;
            z-- ;
        }
        else
        {
            if(o>0)
           { v.pb(1) ;
            o-- ;}
        }
    }
    cout<<"1" ;
    while(o>0)
     { cout<<"1" ;
     o-- ;}
      cout<<"0" ;
       while(z>0)
     { cout<<"0" ;
     z--; }
      for(int i=2;i<v.size();i++)
      cout<<v[i] ;
  }
  else
  {
       z-- ;
    v.pb(0) ;
    for(int i=0;i<x;i++)
    {
        if(i%2==0)
        {
            v.pb(1) ;
            o-- ;
        }
        else
        {
            if(z>0)
           { v.pb(0) ;
            z-- ;}
        }
    }
    cout<<"0" ;
    while(z>0)
     { cout<<"0" ;
     z-- ;}
      cout<<"1" ;
       while(o>0)
     { cout<<"1" ;
     o--; }
      for(int i=2;i<v.size();i++)
      cout<<v[i] ;

  }

}

// Boy_of_KutBilim
#include <iostream>
#include <map>
using namespace std;

#define endl '\n'

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a, b, x;
  char first = '0', second = '1';
  cin >> a >> b >> x;

  if (b > a) {
    swap(a, b);
    swap(first, second);
  }
  string s = "";
  int cnt = 0;
  for (cnt = 0; cnt < x; cnt++) {
    if (cnt % 2 == 0) s += first, a--;
    else s += second, b--;
  }
  if (cnt % 2) {
    while (a) s += first, a--;
    while (b) s += second, b--;
  } else {
    while (b) s += second, b--;
    while (a) s += first, a--;
  }
  cout << s;

  return (0);
}

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>

using namespace std;

typedef long long ll;
const int inf = 0x7fffffff;

int main()
{
    int a,b,x;
    char s[3][205];

    cin >> a >> b >> x;

    if(a >= b)
    {
        s[1][0] = '0';
        s[1][1] = 0;
        a--;
        for(int i = 1 ; i <= x ; i++)
        {
            s[1][i] = (i % 2) + '0';
            s[1][i + 1] = 0;

            if(i % 2)
                b--;
            else
                a--;
        }

        s[0][0] = 0;
        for(int i = 0 ; i < a ; i++)
        {
            s[0][i] = '0';
            s[0][i + 1] = 0;
        }

        s[2][0] = 0;
        for(int i = 0 ; i < b ; i++)
        {
            s[2][i] = '1';
            s[2][i + 1] = 0;
        }

        if(s[1][strlen(s[1]) - 1] == '0' && s[2][0])
            swap(s[1][strlen(s[1]) - 1],s[2][strlen(s[2]) - 1]);
    }
    else
    {
        s[1][0] = '1';
        s[1][1] = 0;
        b--;
        for(int i = 1 ; i <= x ; i++)
        {
            s[1][i] = ((i + 1) % 2) + '0';
            s[1][i + 1] = 0;

            if((i + 1) % 2)
                b--;
            else
                a--;
        }

        s[0][0] = 0;
        for(int i = 0 ; i < b ; i++)
        {
            s[0][i] = '1';
            s[0][i + 1] = 0;
        }

        s[2][0] = 0;
        for(int i = 0 ; i < a ; i++)
        {
            s[2][i] = '0';
            s[2][i + 1] = 0;
        }

        if(s[1][strlen(s[1]) - 1] == '1' && s[2][0])
            swap(s[1][strlen(s[1]) - 1],s[2][strlen(s[2]) - 1]);
    }

    cout << s[0] << s[1] << s[2] << endl;

    return 0;
}

/*
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>

using namespace std;

typedef long long ll;
const int inf = 0x7fffffff;

int main()
{

    return 0;
}
*/

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <map>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <iomanip>
#include <climits>
#include <tuple>
#include <cassert>

using namespace std;

#define ALL(a) a.begin(), a.end()
#define pii pair<int, int>
#define pll pair<long long, long long>
#define len(a) (int)a.size()
#define PB push_back
#define EB emplace_back

typedef  long long ll;

class DSU {
private:
	vector<int> ids;
	vector<int> h;
public:
	DSU(int n) {
		ids.resize(n);
		h.resize(n);
		for (int i = 0; i < n; i++) {
			ids[i] = i;
			h[i] = 1;
		}
	}
	int getRoot(int ind) {
		if (ids[ind] != ind)return getRoot(ids[ind]);
		return ind;
	}
	bool connected(int ind1, int ind2) {
		return getRoot(ind1) == getRoot(ind2);
	}
	void connect(int ind1, int ind2) {
		if (connected(ind1, ind2))return;
		int r1 = getRoot(ind1);
		int r2 = getRoot(ind2);
		if (h[r1] > h[r2]) {
			ids[r2] = r1;
			h[r1] += h[r2];
		}
		else {
			ids[r1] = r2;
			h[r2] += h[r1];
		}
	}
	void showId(int n) {
		for (int i = 0; i < n; i++) {
			printf("%d ", ids[i]);
		}
		printf("\n");
	}
};

ll gcd(ll a, ll b) {
	while (b != 0) {
		ll t = a % b;
		a = b;
		b = t;
	}
	return a;
}

ll lcd(ll a, ll b) {
	return a / gcd(a, b)*b;
}

int sgn(int n) {
	if (n < 0)return -1;
	if (n > 0)return 1;
	return 0;
}

int const MOD = 1000000007;

int modS(int a, int b) {
	return (a + b) % MOD;
}

int main() {

	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	string res = "01";
	a--;
	b--;
	c--;
	for (int i = 0; i < c; i++) {
		if (i % 2 == 0) {
			if (a > 0) {
				a--;
				res += '0' + i % 2;
			}
			else break;
		}
		else {
			if (b > 0) {
				b--;
				res += '0' + i % 2;
			}
			else break;
		}
	}
	int k = 0;
	for (int i = 0; i < len(res) - 1; i++)k += res[i] != res[i + 1];
	k--;
	if (k != c) {
		if (a == 0 && b > 0) {
			b--;
			res = '1' + res;
		}
		else if (b == 0 && a > 0) {
			a--;
			res += '0';
		}
	}

	while (b > 0) {
		b--;
		res.insert( res.find('1') + res.begin(), '1');
	}
	while (a > 0) {
		a--;
		res.insert(res.find('0') + res.begin(), '0');
	}
	printf("%s", res.c_str());
#ifdef _DEBUG
	printf("\nEND\n");
	while (1);
#endif
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
//#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<stack>
#include<queue>
#include<unordered_map>
#include<unordered_set>
#include<string>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<set>
#include<list>
#include<vector>
#include<map>
#include<deque>
#include<sstream>
#include<fstream>
#include<istream>
#include<random>
#include<numeric>
#include<utility>
#include<conio.h>
#include <bitset>
#include <climits>
#define       IO 		ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ll long long
#define ld long double
#define endl "\n"
#define lop(i, j, n)	for(int i = j; i<n; i++)
#define prl pair<ll,ll>
#define all(x) x.begin(),x.end()
#define sz(x)	((1ll)*(x.size()))
#define srt(x) sort(x.begin(),x.end())
#define BSearch(x,val) binary_search(x.begin(),x.end(),val)
#define pri pair<int,int>
#define EPS 1e-9
#define vll vector<ll>
#define vii vector<int>
#define PI atan(1.0)*4.0
#define sc(x) scanf("%d",&x)
#define infl	1e10
using namespace std;
vii Graph[200000 + 5];
//char Graph[1000][1000];
int visited[200000 + 5];
int dx[] = { 0 , 0 ,-1 , 1 };
int dy[] = { -1 , 1 , 0 , 0 };
//ll BFS(int x) {
//	queue<int> q;
//	q.push(1);
//	memset(visited, -1, sizeof visited);
//	visited[1] = 0;
//	while (!q.empty())	{
//		int t = q.front();
//		q.pop();
//		if (t == n)return visited[n];
//		lop(i, 1, n + 1) {
//			if (visited[i] == -1 && Graph[t][i] == x) {
//				visited[i] = visited[t] + 1;
//				q.push(i);
//			}
//		}
//	}
//	return -1;
//}
ll binlow(ll key, vector<pair<ll, ll>>& dg) {
	ll n = dg.size() - 1, L = 1, R = n, mid, endindx = -1;
	while (L <= R) {
		mid = (R - L) / 2 + L;
		if (dg[mid].first > key) {
			R = mid - 1;
		}
		else if (dg[mid].first == key) {
			L = mid + 1;
			endindx = mid;
		}
		else if (dg[mid].first < key) {
			L = mid + 1;
			endindx = mid;
		}
	}
	return endindx;
}
string alpha = "abcdefghijklmnopqrstuvwxyz";
ll GCD(ll a, ll b) { return((!b) ? a : GCD(b, a%b)); }
ll LCM(ll a, ll b) { return a / (GCD(a, b))*b; }
int CntOnes(ll n) { if (!n) { return 0; } else { return 1 + CntOnes(n & (n - 1)); } }
ll nCr(ll n, ll r) { if (n < r)return 0; if (r == 0)return 1; return n * nCr(n - 1, r - 1) / r; }
ll toDecimal(vll& a, int base, int siz) { ll ans = 0;	for (ll i = siz - 1, x = 1; i >= 0; i--, x *= base) { ans += (a[i] * x); } return ans; }
bool isPrime(ll n) { if (n == 2)return 1; if (n < 2 || n % 2 == 0)return 0; for (ll i = 3; i*i <= n; i += 2)if (n%i == 0)return 0; return 1; }
bool isPalindrome(string str) { ll l = 0; ll h = sz(str) - 1; while (h > l) { if (str[l++] != str[h--]) { return 0; } } return 1; }
bool isPerfectSquare(ll num) { return (sqrt(num)*sqrt(num)) == (num); }
bool isEqual(string x, string y) { if (sz(x) != sz(y))return 0; lop(i, 0, sz(x)) { if (x[i] != y[i])return 0; } return 1; }
ll n, m, q, T, k;
vll a;
ll dp[200000 + 5];

ll solve(ll money, ll pos = 0) {
	if (pos >= n || !money)return 0;
	if (dp[pos])return dp[pos];
	if (money - a[pos] >= 0)
		return dp[pos] = 1 + solve(money - a[pos], pos + 1);
	else
		return solve(money, pos + 1);
}

int main() {
	IO;
	//freopen("lucky.in", "r", stdin);
	//freopen("key.out", "w", stdout);
	ll a, b, x, last = 0,_a,_b;
	cin >> a >> b >> x;
	_a = a, _b = b;
	string ans = "0";	a--;
	while (x > 1 && a > 0 && b > 0)
	{
		if (!last) {
			ans += '1';
			b--;
			last = 1;
		}
		else {
			ans += '0';
			a--;
			last = 0;
		}
		x--;
	}
	if (!a&&x > 1) {
		ans.insert(ans.begin(), '1'), b--;
		x -= 2;
	}
	if (last == 1) {
		while (b > 0)
		{
			ans += '1';
			b--;
		}
		while (a > 0)
		{
			ans += '0';
			a--;
		}
		x--;
	}
	else {
		while (a > 0)
		{
			ans += '0';
			a--;
		}
		while (b > 0)
		{
			ans += '1';
			b--;
		}
		x--;
	}
	cout << ans << endl;
//	system("pause");
	return 0;
}

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b,n;
	bool fg=false;
	scanf("%d%d%d",&a,&b,&n);
	if(a*2==n)
		fg=!fg;
	while(a!=-1||b!=-1)
	{
		if(n<=1)
		{
			if(!fg)
				while(a--)
					printf("%d",fg);
			else
				while(b--)
					printf("%d",fg);
		}
		else
		{
			printf("%d",fg);
			if(!fg)
				a--;
			else
				b--;
		}
		fg=!fg;
		n--;
//		printf("%d %d\n",a,b);
	}
	return 0;
}

#include <bits/stdc++.h>

std::string s[201];

int main(void)
{
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(NULL);
	std::cout.tie(NULL);
	int a,b,x;
	std::cin>>a>>b>>x;
	int xa = a, xb = b;
	if(xa > xb)
	{
		for(int i=0;i<=x;i++)
		{
			if(i & 1)
			{
				s[i] = '1';
				b--;
			}
			else
			{
				s[i] = '0';
				a--;
			}
		}
		while(a--)
		s[0] += '0';
		while(b--)
		s[1] += '1';
	}
	else
	{
		for(int i=0;i<=x;i++)
		{
			if(i & 1)
			{
				s[i] = '0';
				a--;
			}
			else
			{
				s[i] = '1';
				b--;
			}
		}
		while(a--)
		s[1] += '0';
		while(b--)
		s[0] += '1';
	}
	for(int i=0;i<=x;i++)
	std::cout<<s[i];
	std::cout<<"\n";
	return 0;
}

#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define ll long long
#define ull unsigned long long
#define opt ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define rep(i,n) for(i=0;i<n;i++)
#define repl(i,a,b) for(i=a;i<b;i++)
#define repa(i,a,b) for(i=a;i<=b;i++)
#define repr(i,n) for(i=n-1;i>=0;i--)
#define nl cout<<"\n";
#define M 1000000007
#define N 1000005
#define MAX 1000005

void solve()
{
    ll a,b,x,i,f=1,g=0;
    string s="01";
    cin >> a >> b >> x;
    if(a<b&&x==2*a)
    {
        s="10";
        f=0;
    }
    x--; a--; b--;
    if(x&1) g=1;
    while(x)
    {
        if((x==1)&&g) break;
        if(f)
        {
            if(a)
            {
                s+="0";
                a--;
                f=0;
            }
            else break;
        }
        else
        {
            if(b)
            {
                s+="1";
                b--;
                f=1;
            }
            else break;
        }
        x--;
    }
    if(g)
    {
        for(i=0;i<b;i++) s+="1";
        for(i=0;i<a;i++) s+="0";
        cout << s;
    }
    else
    {
        for(i=0;i<a;i++) cout << "0";
        cout << s;
        for(i=0;i<b;i++) cout << "1";
    }
    nl;
}

int main()
{
    opt;
    solve();
    return 0;
}

#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
#define INF 1e9;

int a, b, x, tmp1, tmp2;
vector<int>dq;

int main() {
	scanf("%d%d%d", &a, &b, &x);

	tmp1 = 0;
	tmp2 = 1;
	if (a < b) {
		swap(tmp1, tmp2);
		swap(a, b);
	}

	bool flag = 1;
	for (int i = 0; i < x; i++)
	{
		if (flag && a > 0) {
			a--;
			dq.push_back(tmp1);
			flag = 0;
		}
		else if (!flag && b > 0) {
			b--;
			dq.push_back(tmp2);
			flag = 1;
		}
	}

	if (dq.back() == tmp1) {
		for (int i = 0; i < a; i++)
			dq.push_back(tmp1);

		for (int i = 0; i < b; i++)
			dq.push_back(tmp2);
	}
	else {
		for (int i = 0; i < b; i++)
			dq.push_back(tmp2);

		for (int i = 0; i < a; i++)
			dq.push_back(tmp1);
	}
	for (int i = 0; i < dq.size(); i++)
		printf("%d", dq[i]);
}

#include <iostream>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;

typedef long long ll;
#define mx 1005

int main()
{
    int a,b,x,d;
    while(~scanf("%d%d%d", &a,&b,&x))
    {
        if(b>=a)
        {
            for(int i=0; i<x/2; i++)
            {
                cout<<"10";
            }
        }
        else
        {
            for(int i=0; i<x/2; i++)
            {
                cout<<"01";
            }
        }
        if((b>=a&&x%2)||(b<a&&x%2==0))
        {
            for(int i=x/2; i<b; i++)
                cout<<'1';
            for(int i=x/2; i<a; i++)
                cout<<'0';

        }
        else
        {
            for(int i=x/2; i<a; i++)
                cout<<'0';
            for(int i=x/2; i<b; i++)
                cout<<'1';
        }
        cout<<endl;
    }
    return 0;
}

    #include "iostream"
    using namespace std;
    int main()
    {
        int a,b,x,n;
        char u,v;
        cin>>a>>b>>x;
        n=a+b;
        if(a>b) u='0',v='1';
        else {u='1',v='0';swap(a,b);}
        for(int i=0;i<x/2;i++) {cout<<u<<v;a--,b--;}
        if(x%2==0){
            while(b--) cout<<v;
            while(a--) cout<<u;
        }
        else{
            while(a--) cout<<u;
            while(b--) cout<<v;
        }
        return 0;
    }

#include <iostream>
using namespace std;
int main()
{
    int a,b,x,n;
    char u,v;
    cin>>a>>b>>x;
    n=a+b;
    if(a>b)
        u='0',v='1';
    else
    {
        u='1',v='0';
        swap(a,b);//0与1的要数目对应
    }
    //已经有2*(x/2)-1种了
    for(int i=0; i<x/2; i++)
    {
        cout<<u<<v;
        a--,b--;//减少输出的个数
    }
    //x是奇数缺两种，x是偶数缺一种

    //判断x的奇偶性
    if(x%2==0)//先输出少的，因为这样和前一个字符一样，正好只加上一种不同
    {
        while(b--)//b所代表的永远是个数少的字符、
            cout<<v;
        while(a--)
            cout<<u;
    }
    else
    {
        while(a--)//a代表个数多的那个字符
            cout<<u;
        while(b--)
            cout<<v;
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<iostream>

using namespace std;

int main() {
	int a, b, x;
	cin >> a >> b >> x;
	char u, v;
	if (a > b) {
		u = '0';
		v = '1';
	}
	else {
		u ='1';
		v = '0';
		int t;
		t = a;
		a = b;
		b = t;
	}
	for (int i = 0; i < x / 2; i++) {
		cout << u << v;
		a--;
		b--;
	}
	if (x%2) {
		while (a--)cout << u;
		while (b--)cout << v;
	}
	else {
		while (b--)cout << v;
		while (a--)cout << u;
	}
	return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int a = 0, b = 0, x = 0;

	bool flag = true;
	bool esc = true;

	cin >> a >> b >> x;
	if (a < b)
		flag = false;
	int n = a + b;

	for (int i = 0; i < n; i++)
	{
		if (x == 1)
		{
			if (flag == true)
			{
				for (int j = 0; j < a; j++)
					cout << 0;
				for (int k = 0; k < b; k++)
					cout << 1;
			}
			else if(flag == false)
			{
				for (int k = 0; k < b; k++)
					cout << 1;
				for (int j = 0; j < a; j++)
					cout << 0;
			}
			esc = false;
		}
		else
		{
			if (flag == true)
			{
				cout << 0;
				a--;
				flag = false;
			}
			else if (flag == false)
			{
				cout << 1;
				b--;
				flag = true;
			}
			x--;
		}

		if (esc == false)
			break;
	}
	cout << endl;
	return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,n) for(int i=1;i<n;i++)
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define rep(i,a,b) for(ll i=a;i<=b;i++)
#define pn cout<<endl

const ll mod=1000000007ll;
const ll Mod=1000000009ll;
const ll maxn=100005;

using namespace std;

int main(){

	int n0,n1,x;
	cin>>n0>>n1>>x;

	string ans="";
	int i=0;

	if( n0>n1 ){
		ans+="0";
		i=1;
		n0--;
	}else{
		ans+="1";
		i=0;
		n1--;
	}

	while(x!=1){
		ans+=to_string(i);
		i==1?n1--:n0--;
		i=!i;
		x--;
	}

	i=!i;
	if(i==1){
		while( n1-- )ans+="1";
		while( n0-- )ans+="0";
	}else{
		while( n0-- )ans+="0";
		while( n1-- )ans+="1";
	}

	cout<<ans<<endl;

	return 0;
}

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<string>
#include<vector>
using namespace std;
int main()
{
	int n, k, a, b, x;
	int i, j, ans = 0;
	cin >> a >> b >> x;
	n = a + b;
	char* s = new char[n + 1];
	s[n] = '\0';
	for (i = 0; i < n; ++i)
	{
		s[i] = '0';
	}
	bool t = false;
	if (min(a, b) == a)
	{
		b = a;
		t = true;
	}
	j = 0;
	for (i = 0; i < b; ++i)
	{
		s[j] = '1';
		if (x == 1)
			j++;
		else
			if (x % 2 == 1)
			{
				j += 2;
				x -= 2;
			}
			else
			{
				s[j] = '0';
				s[j + 1] = '1';
				if (x == 2)
					x--;
				else
					x -= 2;
				j += 2;
			}
	}

	if (t)
	{
		for (i = 0; i < n; ++i)
		{
			if (s[i] == '0')
				s[i]++;
			else
				s[i]--;
		}
	}
	cout << s << endl;
	delete[]s;
	return 0;
}

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

int main()
{
    int a, b, x;
    cin >> a >> b >> x;

    int g = a;
    int h = b;
    int z = x;
    string s = "";
    bool done = true;
    for (int i = 0; i < x; i++) {
        if (done) {
            done = false;
            s += '0';
            a--;
        } else {
            done = true;
            s += '1';
            b--;
        }
    }

    if (s[0] != s[s.size() - 1]) {
        if (a == 0) {
            while (b > 0) {
                cout << '1';
                b--;
            }
            cout << s << endl;
        }
        else {
            cout << s;
            while (b > 0) {
                cout << '1';
                b--;
            }
            while (a > 0) {
                cout << '0';
                a--;
            }
        }
    }
    else {
        while (a > 0) {
            cout << '0';
            a--;
        }
        cout << s;
        while (b > 0) {
            cout << '1';
            b--;
        }
    }
}

#include <bits/stdc++.h>
#define N 5005
#define ll long long
#define mem(a, b) memset(a, b, sizeof(a))
using namespace std;
int main() {
	ios::sync_with_stdio(false);
	string ans, t;
	int a, b, x;
	while (cin >> a >> b >> x) {
		if (a > b)	t = "01";
		else	t = "10";
		++x;
		int tt = x / 2;
		for (int i = 0; i < tt; ++i) {
			ans += t;
		}
		a -= tt;
		b -= tt;
		if (x % 2) {
			if (a > b)	ans += "0", a--;
			else ans += "1", b--;
		}
		int l, r;
		int len = ans.size();
		if (a > 0) {
			for (int i = 0; i < len; ++i) {
				if (ans[i] == '0') {
					l = i;
					break;
				}
			}
		}
		if (b > 0) {
			for (int i = 0; i < len; ++i) {
				if (ans[i] == '1') {
					r = i;
					break;
				}
			}
		}
		string sss;
		for (int i = 0; i < len; ++i) {
			if (i == l) {
				while (a--)
					sss += "0";
			}
			if (i == r) {
				while (b--) {
					sss += "1";
				}
			}
			sss += ans[i];
		}
		cout << sss << endl;
		ans = sss = "";
	}
}

#include <iostream>

using namespace std;

int ans[105], nr=0;

int solve10(int b, int a, int x) {
    for(int i = 1; i <= x + 1; i++) {
        if(i % 2 == 1) {
            ans[++nr] = 1;
            a--;
        }
        else {
            ans[++nr] = 0;
            b--;
        }
    }
    if(a < 0 || b < 0) {
        return 0;
    }
    cout << ans[1];
    for(int i = 1; i <= a; i++) {
        cout << "1";
    }
    for(int i = 1; i <= b; i++) {
        cout << "0";
    }
    for(int i = 2; i <= nr; i++)
        cout << ans[i];

    return 1;
}

int solve01(int a, int b, int x) {
    nr = 0;
    for(int i = 1; i <= x + 1; i++) {
        if(i % 2 == 1) {
            ans[++nr] = 0;
            a--;
        }
        else {
            ans[++nr] = 1;
            b--;
        }
    }
    if(a < 0 || b < 0) {
        return 0;
    }
    cout << ans[1];
    for(int i = 1; i <= a; i++) {
        cout << "0";
    }
    for(int i = 1; i <= b; i++) {
        cout << "1";
    }
    for(int i = 2; i <= nr; i++)
        cout << ans[i];

    return 1;
}

int main()
{
    int a,b,x;
    cin>>a>>b>>x;

    int verdict = solve10(a, b, x);
    if(!verdict)
        solve01(a, b, x);

    return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main()
{
	int a, b, x;
	cin >> a >> b >> x;
	string s;
	for (size_t i = 0; i < x+1; i++)
	{
		if (i & 1) s += '0', a--;
		else s += '1', b--;
	}
	if (a == -1 || b == -1) {
		for (size_t i = 0; i < s.length(); i++) {
			if (s[i] == '0') s[i] = '1';
			else s[i] = '0';
		}

		if (a == -1) a = 0, b--;
		else b = 0, a--;
	}
	while (a--) { s.insert(s.begin() + 1, '0'); }
	while (b--) { s.insert(s.begin() + 1, '1'); }
	std::cout << s;
	//system("pause");
    return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
int a, b, x;
cin >> a >> b >> x;
int dem0 = a, dem1 = b;
int j = 0;
if (dem0 > dem1){
    j = 0;
}
else{
    j = 1;
}
if (x == 1){
	for (int i = 0; i < a; ++i)
		cout << 0;
	for (int i = 0 ; i < b; ++i)
		cout << 1;
}
else{x = x+1;
while (dem0 != 0 && dem1 != 0){
	if (j % 2 == 0){
		cout<<0;
		dem0--;
		j = 1;
	}
	else{
		dem1--;
		cout<<1;
		j = 0;
	}

	x--;
	if (x == 1){
		if (j == 0){
			while (dem1 != 0){cout<<1; dem1--;}
			while (dem0 != 0){cout<<0; dem0--;}
		}
		else{
			while (dem0 != 0){cout<<0; dem0--;}
			while (dem1 != 0){cout<<1; dem1--;}
		}
		return 0;
	}
}
}

return 0;
}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <map>
#include <vector>

typedef long long ll;

using namespace std;

int main(){
    ios::sync_with_stdio(false);
    int x;
    int ab[2];
    cin >> ab[0] >> ab[1] >> x;
    int n = ab[0]+ab[1];
    if(ab[0] == 0){for(int i = 0; i<n; i++){cout << '1';}return 0;}
    if(ab[1] == 0){for(int i = 0; i<n; i++){cout << '0';}return 0;}

    int tab[n];
    int aux = 1;
    if(ab[0]>ab[1]) aux =0;
    int fst = aux;
    int i = 0;
    for(;x>=0;x--){
        tab[i] = aux;
        ab[aux]--;
        i++;
        aux = 1-aux;
    }
    if(aux!=fst) i--;
    for(;ab[fst]>0;ab[fst]--) cout << fst;
    for(int j = 0; j<i; j++){cout << tab[j];}
    for(;ab[1-fst]>0;ab[1-fst]--) cout << 1-fst;
    if(aux!=fst) cout << fst;

return 0;
}

# include<bits/stdc++.h>
using namespace std;
int p[2], n, k;
int main(){
    cin >> p[0] >> p[1] >> n;
    k = p[1] > p[0];
    for(int i = 1; i < n; i++, p[k]--, k ^= 1) cout << char(k + '0');
    cout << string(p[k], k + '0') << string(p[!k], !k + '0');
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define deb1(x)                cout<<#x<<": "<<x<<endl
#define deb2(x, y)             cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define deb3(x, y, z)          cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define deb4(a, b, c, d)       cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define deb5(a, b, c, d, e)    cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define deb6(a, b, c, d, e, f) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl

// ll kadane()
// {
// 	ll maxsofar=0,maxendinghere=0,n,i;
// 	cin>>n;
// 	ll a[n];
// 	for(i=0;i<n;i++)
// 	{
// 		cin>>a[i];
// 		maxendinghere+=a[i];
// 		if(maxendinghere<0) maxendinghere=0;
// 		else
// 		{
// 			if(maxendinghere>maxsofar)
// 			{
// 				maxsofar=maxendinghere;
// 			}
// 		}
// 	}
// 	return maxsofar;
// }

// vector <int> adj[10];
//     bool visited[10];

//     void dfs(int s) {
//         visited[s] = true;
//         for(int i = 0;i < adj[s].size();++i)    {
//          if(visited[adj[s][i]] == false)
//              dfs(adj[s][i]);
//         }
//     }

//     void initialize() {
//         for(int i = 0;i < 10;++i)
//          visited[i] = false;
//     }

//     int main() {
//         int nodes, edges, x, y, connectedComponents = 0;
//         cin >> nodes;                       //Number of nodes
//         cin >> edges;                       //Number of edges
//         for(int i = 0;i < edges;++i) {
//          cin >> x >> y;
//      //Undirected Graph
//          adj[x].push_back(y);                   //Edge from vertex x to vertex y
//          adj[y].push_back(x);                   //Edge from vertex y to vertex x
//         }

//         initialize();                           //Initialize all nodes as not visited

//         for(int i = 1;i <= nodes;++i) {
//          if(visited[i] == false)     {
//              dfs(i);
//              connectedComponents++;
//          }
//         }
//         cout << "Number of connected components: " << connectedComponents << endl;
//         return 0;
//     }

int main()
{
	ll a,b,x,i,j,swaps=0,boxes=0,blanks=0,temp=0;
	cin>>a>>b>>x;
	string s,str1,str0;
	vector<int> v;
	vector<int>::iterator it;
	for(i=0;i<a;i++)
	{
		v.push_back(0);
	}
	for(i=0;i<b;i++)
	{
		v.push_back(1);
	}
	if(x==1)
	{
		for(it=v.begin();it!=v.end();it++)
		{
			cout<<*it;
		}
		cout<<endl;
		return 0;
	}
	if(x%2==0)
	{
		boxes=x/2;
		blanks=(x/2)+1;
	}
	else
	{
		boxes=(x/2)+1;
		blanks=(x/2)+1;
	}
	boxes--;
	blanks--;
	//deb2(boxes,blanks);
	if(a>=b) 	// 0s > 1s 0s in blanks... start with blanks
	{
		i=0;
		while(blanks!=0)
		{
			v[i]=0;
			//cout<<v[i]<<" "<<i<<endl;
			a--;
			i+=2;
			blanks--;
		}
		temp=i;
		i=1;
		while(boxes!=0)
		{
			v[i]=1;
			//cout<<v[i]<<" "<<i<<endl;
			b--;
			i+=2;
			boxes--;
		}
		if(x%2==0)
		{		// blanks> boxes so boxes se start
			while(b!=0)
			{
				v[i]=1;
				//cout<<v[i]<<" "<<i<<endl;
				b--;
				i++;
			}
			while(a!=0)
			{
				v[i]=0;
				//cout<<v[i]<<" "<<i<<endl;
				a--;
				i++;
			}
		}
		else
		{
			i=temp;
			while(a!=0)
			{
				v[i]=0;
				//cout<<v[i]<<" "<<i<<endl;
				a--;
				i++;
			}
			while(b!=0)
			{
				v[i]=1;
				//cout<<v[i]<<" "<<i<<endl;
				b--;
				i++;
			}
		}
	}
	else		// 1s > 0s 1s in blanks... start with 1s
	{
		i=0;
		while(blanks!=0)
		{
			v[i]=1;
			//cout<<v[i]<<" "<<i<<endl;
			b--;
			i+=2;
			blanks--;
		}
		temp=i;
		i=1;
		while(boxes!=0)
		{
			v[i]=0;
			//cout<<v[i]<<" "<<i<<endl;
			a--;
			i+=2;
			boxes--;
		}
		if(x%2==0)
		{		// blanks> boxes so boxes se start
			while(a!=0)
			{
				v[i]=0;
				//cout<<v[i]<<" "<<i<<endl;
				a--;
				i++;
			}
			while(b!=0)
			{
				v[i]=1;
				//cout<<v[i]<<" "<<i<<endl;
				b--;
				i++;
			}
		}
		else
		{
			i=temp;
			while(b!=0)
			{
				v[i]=1;
				//cout<<v[i]<<" "<<i<<endl;
				b--;
				i++;
			}
			while(a!=0)
			{
				v[i]=0;
				//cout<<v[i]<<" "<<i<<endl;
				a--;
				i++;
			}
		}
	}
	// cout<<"hey";
	for(it=v.begin();it!=v.end();it++)
	{
		cout<<*it;
	}
	cout<<endl;
	return 0;
}

//Vivek
#pragma optimize("", off)
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:36777216")
#include <bits/stdc++.h>

#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define mod 1000000007
#define all(v) v.begin(),v.end()
#define pb push_back
#define sz(i) int(i.size())
#define setto(n) cout << fixed << setprecision(n)
#define fi first
#define se second
#define mem(a, b) memset(a, b, sizeof(a))
#define len(s) int(s.length())
#define INF LONG_MAX
#define UNIQUE(a) ((a).erase(unique((a).begin(), (a).end()), (a).end()))
#define random() ((ll)rand() << 32 | rand())
#define C(c) c-'a'

using namespace std;

#ifdef ONLINE_JUDGE
#define endl '\n'
#endif
#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
template<class T> void smin(T& a, T val) {if (a > val) a = val;}
template<class T> void smax(T& a, T val) {if (a < val) a = val;}
template<typename T>inline std::ostream &operator << (std::ostream & os,const std::vector<T>& v){bool first = true;os << "[";for(auto i: v){if(!first)os << ", ";os << i;first = false;}return os << "]";}
//Check N size twiceeeeeeeeeeeeeeeeee, and verify it
const int N = 2*1e5 + 10;

int n, a, b, x;

void go(int x, int till){
	for (int i = 0; i < till; ++i)
		cout<<x;
}

int main(){

	cin>>a>>b>>x;

	int t0 = a, t1 = b;
	// a = no of 0s
	// b = no of 1s

	--x;

	string s = "";

	int f = (a>b) ? 1 : 0, i = 0;

	char last = '0';

	for ( ; x > 0 ; )
	{
		if(f){
			s+= "0";
			last = '0';
			--a;
		}
		else{
			s+= "1";
			last = '1';
			--b;
		}
		f = !f;
		if(i != 0)
			--x;
		++i;
	}

	cout<<s;

	if(last == '1'){
		go(1,b);
		go(0,a);
	}

	else{
		go(0,a);
		go(1,b);
	}

	return 0;
}

#include <iostream>
#include <cmath>
#include <vector>
#include <string>

using namespace std;
int main() {
   int a1, b1, x;
   cin >> a1 >> b1 >> x;
   string ans;
   string xx = "";
   int t;
   int a, b;
   if (a1 <= b1){
    a = b1;
    b = a1;
   }else{
   a = a1;
   b = b1;
   }
           for (int i = 0; i < (x + 1) / 2; i++){
            xx = xx + "10";
           }
           if (x % 2 == 0){
                a = a - ((x + 1) / 2) - 1;
           }else{
                a = a - ((x + 1) / 2);
           }
           b = b - ((x + 1) / 2);
           for (int i = 0; i < a; i++){
                ans = ans + "1";
           }
           ans = ans + xx;
           for (int i = 0; i < b; i++){
                ans = ans + "0";
           }
           if (x % 2 == 0){
                ans = ans + "1";
           }
    if (a1 > b1){
        for (int i = 0; i < a1 + b1; i++){
            if (ans[i] == '1'){
                ans[i] = '0';
            }else{
                ans[i] = '1';
            }
        }
    }
    cout << ans;
   return 0;
}

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define PI 3.14159265

int power(int x, unsigned int y)
{
    if (y == 0)
        return 1;
    else if (y % 2 == 0)
        return power(x, y / 2) * power(x, y / 2);
    else
        return x * power(x, y / 2) * power(x, y / 2);
}

int  main()
{
	int q=1;
    //cin>>q;
	int Q=1;

	while(q--)
	{
        int a,b,x;
        cin>>a>>b>>x;

        if(x%2)
        {
                string s;
                s+='0';
                a--;

                int v=0;

                while(x--)
                {

                        s+=(1-v)+'0';
                        if((1-v)==1)
                        b--;
                        else
                        a--;

                        v=(1-v);
                }

                while(a>0)
                {
                        s='0'+s;
                        a--;
                }
                while(b>0)
                {
                        s+='1';
                        b--;
                }

                cout<<s;

        }
        else
        {
                string s;

                if(a>b)
                {
                          s+='0';
                a--;

                int v=0;

                while(x--)
                {

                        s+=(1-v)+'0';
                        if((1-v)==1)
                        b--;
                        else
                        a--;

                        v=(1-v);
                }

                while(a>0)
                {
                        s+='0';
                        a--;
                }

                int j=-1;

                for(int i=0; i<s.size(); i++)
                if(s[i]=='1')
                {
                        j=i;
                         break;
                }

                string t;

                for(int i=0; i<=j; i++)
                t+=s[i];

                while(b>0)
                {
                        t+='1';
                        b--;
                }

                for(int i=j+1; i<s.size(); i++)
                t+=s[i];

                cout<<t;

                }
                else
                {
                        s+='1';
                        b--;

                        int v=1;

                          while(x--)
                {

                        s+=(1-v)+'0';
                        if((1-v)==1)
                        b--;
                        else
                        a--;

                        v=(1-v);
                }

                 while(b>0)
                {
                        s+='1';
                        b--;
                }

                int j=-1;

                for(int i=0; i<s.size(); i++)
                if(s[i]=='0')
                {
                        j=i;
                         break;
                }

                string t;

                for(int i=0; i<=j; i++)
                t+=s[i];

                while(a>0)
                {
                        t+='0';
                        a--;
                }

                for(int i=j+1; i<s.size(); i++)
                t+=s[i];

                cout<<t;

                }

        }

	}
}

#include <iostream>
#include <string>

using namespace std;

void f (const int& x, char& y, string& z) {
    for (int i = 0; i < x; i++) {
        z += y;
    }
}

int main()
{
    int n = 0, m = 0, l = 0, k = 0;
    char zero = '0', one = '1';
    string s = "";
    cin >> n >> m >> l;
    k = l / 2;
    for (int i = 0; i < k; i++) {
        if (n > m) {
            s += "01";
        }
        else {
            s += "10";
        }
        n--;
        m--;
    }
    if (l % 2 > 0) {
        if (s.back() == one) {
            f(n, zero, s);
            f(m, one, s);
        }
        else {
            f(m, one, s);
            f(n, zero, s);
        }
    }
    else {
        if (s.back() == one) {
            f(m, one, s);
            f(n, zero, s);
        }
        else {
            f(n, zero, s);
            f(m, one, s);
        }
    }
    cout << s;
}

#include <cstdio>
#include <cstring>
#define ll int
#define inf 1<<30
#define il inline
il ll max(ll x,ll y){return x>y?x:y;}
il ll min(ll x,ll y){return x<y?x:y;}
il ll abs(ll x){return x>0?x:-x;}
il void swap(ll &x,ll &y){ll t=x;x=y;y=t;}
il void read(ll &x){
    x=0;ll f=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')f=-f;c=getchar();}
    while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
    x*=f;
}
il void print(ll x){if(x<0)putchar('-');x=abs(x);if(x>9)print(x/10);putchar(x%10+'0');}
il void writeln(ll x){if(x<0)putchar('-');x=abs(x);print(x);putchar('\n');}
il void write(ll x){if(x<0)putchar('-');x=abs(x);print(x);putchar(' ');}
using namespace std;
/*===================Header Template=====================*/
#define N 10000
ll a[2],x,t;
int main(){
	read(a[0]);read(a[1]);read(x);
	t=a[0]>a[1]?0:1;printf("%d",t);a[t]--;
	for(ll i=1;i<x;i++){
		t=t^1;a[t]--;
		printf("%d",t);
	}
	for(ll i=1;i<=a[t];i++)printf("%d",t);
	t=t^1;
	for(ll i=1;i<=a[t];i++)printf("%d",t);
	return 0;
}

#include<iostream>

#include<stdio.h>

#include<string>

using namespace std;

int main(){

	int a,b,c,d,k;

	scanf("%d %d %d",&a,&b,&c);

	string s;

	d=a+b;

	int c1=0,c0=0;

	if(a>b){

		for(int i=0; i<=c; i+=1){

			if(i%2==0){

				s+='0';

				c0+=1;
			}

			else{

				s+='1';

				c1+=1;
			}
		}
	}

	else{

		for(int i=0; i<=c; i+=1){

			if(i%2==0){

				s+='1';

				c1+=1;
			}

			else{

				s+='0';

				c0+=1;
			}
		}
	}

	int l=s.length();

	for(int i=0; i<l; i+=1){

		if(s[i]=='0'){

			for(int j=0; j<a-c0; j+=1){

				s.insert(s.begin()+i,'0');
			}

			break;
		}
	}

	l=s.length();

	for(int i=0; i<l; i+=1){

		if(s[i]=='1'){

			for(int j=0; j<b-c1; j+=1){

				s.insert(s.begin()+i,'1');
			}

			break;
		}
	}

	cout<<s;
}

#include <iostream>
using namespace std;

#define Q 201

int main()
{
	int a, b, x;
	cin >> a >> b >> x;

	int life[Q];
	for (int i = 0; i < Q; i++) life[i] = 0;
	for (int i = 0; i < a; i++) life[2 * i + 1] = 1;

	if (x % 2 || x == 2 * a)
	{
		life[0] = 1;
		b--;
		x--;
	}

	int tail = 0, ind = 2;
	while (b)
	{
		if (!x) tail++;
		else
		{
			life[ind] = 1;
			x -= 2;
			if (ind == 2 * a) x++;
			ind += 2;
		}
		b--;
	}

	if (life[0]) for (int i = 0; i <= tail; i++) cout << "1";
	cout << "0";
	if (!life[0]) for (int i = 0; i < tail; i++) cout << "1";

	for (int i = 2; i < Q; i++)
	{
		if (life[i])
		{
			if (i % 2) cout << "0";
			else cout << "1";
		}
	}

	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;

int a,b,x;
string s;

void func(string m, string n, int y)
{
	for(int i = 0; i < y; i++)
		s += m;
		if(x % 2 != 0)
		{
			s.insert(0, n);
			x--;
		}
		for(int i = s.length() - 1; x > 0, i > 0; i--)
		{
			if(x <= 0) break;
			s.insert(i, n);
			x -= 2;
		}
		for(int i = 0; i < s.length(); i++)
			if((s[i] == '0' && s[i+1] == '1') || (s[i] == '1' && s[i+1] == '0'))
				{
					while(s.length() != a + b)
						s.insert(i+1, n);
					break;
				}
}

int main()
{
	cin >> a >> b >> x;
	if(b > a)	func("1", "0", b);
		else func("0", "1", a);
	cout << s;
}

#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstdio>
#include <iostream>
using namespace std;

int main() {

	ios::sync_with_stdio(false);

	string s;
	int a,b,x;
	cin>>a>>b>>x;
	if(a>b){
		for(int i=0;i<a-(x/2);i++)
			s+='0';
		if(b!=0)
		for(int i=0;i<b-(x+1)/2+1;i++)
			s+='1';
		for(int i=1;i<=x-1;i++){
			if(i%2)
				s+='0';
			else s+='1';
		}
	}
	else{
		for(int i=0;i<b-(x/2);i++)
			s+='1';
		if(a!=0)
		for(int i=0;i<a-(x+1)/2+1;i++)
			s+='0';
		for(int i=1;i<=x-1;i++){
			if(i%2)
				s+='1';
			else s+='0';
		}
	}
	cout<<s<<endl<<endl;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	int a,b,x;
	cin>>a>>b>>x;
	string s;
	int temp = x/2;
	if(x%2==0 && x/2!=b)
	{
		s+="1";
		b--;
		temp--;
	}
	for(int i=0;i<temp;i++)
	{
		s+="01";
	}
	a-=temp;b-=temp;
	while(a--)
		s+="0";
	while(b--)
		s+="1";
	cout<<s<<endl;
	return 0;
}

#include<bits/stdc++.h>
#define ll long long int
#define cin(a,n) for(i=0;i<n;i++){cin>>a[i];}
#define fast ios_base:: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define forl(i,a,n) for(i=a;i<n;i++)
#define ld long double
#define cout(a,n) for(i=0;i<n;i++)cout<<a[i]<<" ";
#define mod 1000000007
#define nl cout<<"\n";
#define inf 1e15
#define de cout<<"here";
using namespace std;
int main()
{
    ll i,j,k,l,m=0,n,a,b;
    cin>>a>>b>>n;
    k=n/2;
    l=k;
    i=0;
    m=n%2;
    char s[1000];
    if(a>=b){
        while(k--)
        {
            s[i]='0';
            i++;
            a--;
            s[i]='1';
            i++;
            b--;
        }
        if(m==0)
        {
            while(b)
            {
                s[i]='1';
                i++;
                b--;
            }
            while(a)
            {
                s[i]='0';
                a--;
                i++;
            }
        }
        else
        {
            while(a)
            {
                s[i]='0';
                a--;
                i++;
            }
            while(b)
            {
                s[i]='1';
                i++;
                b--;
            }

        }
    }
    else
    {
        while(k--)
        {
            s[i]='1';
            i++;
            b--;
            s[i]='0';
            i++;
            a--;
        }
        if(m==0)
        {
            while(a)
            {
                s[i]='0';
                a--;
                i++;
            }
            while(b)
            {
                s[i]='1';
                i++;
                b--;
            }
        }
        else
        {

            while(b)
            {
                s[i]='1';
                i++;
                b--;
            }
            while(a)
            {
                s[i]='0';
                a--;
                i++;
            }

        }
    }
    s[i]='\0';
    cout<<s;
    return 0;
}

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

typedef long long ll;
typedef unsigned long long ull;

#define fr(i,a,b) for(ll i= (a) ; i< (b) ; i++)
#define pb push_back
#define mp make_pair
#define pii pair< int, int >
#define pll pair< long long, long long >
#define all(a) a.begin(), a.end()
#define ff first
#define ss second
//string s = bitset< 64 >( 12345 ).to_string();

//vector <int> A={1,2,3} A.front()=1 A.back()=3 push_back() pop_back() erase(*) vector <int> A(size, value)

int main()
{

	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif

	time_t t1, t2;
	t1 = clock();

	int a,b,x; cin>>a>>b>>x;
	int mx, mn; char mxc, mnc;

	int f=1;
	if(a>b) f=0;

	while(x--)
	{
		if(f==1){cout<<1; b--; f=1-f;}
		else{cout<<0; a--; f=1-f;}
	}

	if(f==1)
	{
		while(a--) cout<<0;
		while(b--) cout<<1;
	}

	else
	{
		while(b--) cout<<1;
		while(a--) cout<<0;
	}

	t2 = clock();
	cerr << "time taken: " << t2-t1;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long a,b,x,i,j,numa,numb,temp;
    cin>>a>>b>>x;
    if(x%2==0)
    {
        temp = x/2;
        if(a>=b)
        {
            numa = temp+1;
            numb = temp;
            for(i=0;i<=x;i++)
            {
                if(i%2==0)
                {
                    for(j=0;j<a/numa;j++)
                        cout<<"0";
                    if(i==x)
                    {
                        for(j=0;j<a%numa;j++)
                            cout<<"0";
                    }
                }
                else
                {
                    for(j=0;j<b/numb;j++)
                        cout<<"1";
                    if(i==x-1)
                    {
                        for(j=0;j<b%numb;j++)
                            cout<<"1";
                    }
                }
            }
        }
        else if(b>a)
        {
            numa = temp;
            numb = temp+1;
            for(i=0;i<=x;i++)
            {
                if(i%2==1)
                {
                    for(j=0;j<a/numa;j++)
                        cout<<"0";
                    if(i==x-1)
                    {
                        for(j=0;j<a%numa;j++)
                            cout<<"0";
                    }
                }
                else
                {
                    for(j=0;j<b/numb;j++)
                        cout<<"1";
                    if(i==x)
                    {
                        for(j=0;j<b%numb;j++)
                            cout<<"1";
                    }
                }
            }
        }

    }
    else{
        temp = (x+1)/2;
        numa = temp;
        numb = temp;
        for(i=0;i<=x;i++)
            {
                if(i%2==1)
                {
                    for(j=0;j<a/numa;j++)
                        cout<<"0";
                    if(i==x)
                    {
                        for(j=0;j<a%numa;j++)
                            cout<<"0";
                    }
                }
                else
                {
                    for(j=0;j<b/numb;j++)
                        cout<<"1";
                    if(i==x-1)
                    {
                        for(j=0;j<b%numb;j++)
                            cout<<"1";
                    }
                }
            }
    }
    return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,n) for(int i=1;i<n;i++)
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define rep(i,a,b) for(ll i=a;i<=b;i++)
#define pn cout<<endl

const ll mod=1000000007ll;
const ll Mod=1000000009ll;
const ll maxn=100005;

using namespace std;

int main(){

	int n0,n1,x;
	cin>>n0>>n1>>x;

	string ans="";
	int i=0;

	if( n0>n1 ){
		ans+="0";
		i=1;
		n0--;
	}else{
		ans+="1";
		i=0;
		n1--;
	}

	while(x!=1){
		ans+=to_string(i);
		i==1?n1--:n0--;
		i=!i;
		x--;
	}

	i=!i;
	if(i==1){
		while( n1-- )ans+="1";
		while( n0-- )ans+="0";
	}else{
		while( n0-- )ans+="0";
		while( n1-- )ans+="1";
	}

	cout<<ans<<endl;

	return 0;
}

#include<iostream>

#include<cstring>

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<vector>

using namespace std;

int main()

{

    int a,b,x,num1,num2;

    string str="";

    while(cin>>a>>b>>x)

    {

        str="";

        num1=num2=0;

        if(a>=b)

        {

            for(int i=0; i<=x; i++)

            {

                if(i%2==0)

                    str=str+'0',num1++;

                else str=str+'1',num2++;

            }

            for(int i=0; i<a-num1; i++)

                str='0'+str;

            if(str[str.length()-1]=='1')

            {

                for(int i=0; i<b-num2; i++)

                    str=str+'1';

            }

            else

            {

                for(int i=0; i<b-num2; i++)

                    str=str.insert(str.length()-2,"1");

            }

        }

        else

        {

            for(int i=0; i<=x; i++)

            {

                if(i%2==0)

                    str=str+'1',num1++;

                else str=str+'0',num2++;

            }

            for(int i=0; i<b-num1; i++)

                str='1'+str;

            if(str[str.length()-1]=='0')

            {

                for(int i=0; i<a-num2; i++)

                    str=str+'0';

            }

            else

            {

                for(int i=0; i<a-num2; i++)

                    str=str.insert(str.length()-2,"0");

            }

        }

        cout<<str<<endl;

    }

}

#include <iostream>

using namespace std;

int main()
{
    int a,b,x;
    cin>>a>>b>>x;
    int flag;
    if(a>=b) flag=0;
    else flag=1;
    while(x!=1)
    {
        x--;
        if(flag){
            cout<<1;
            b--;
        }else{
            cout<<0;
            a--;
        }
        flag=1-flag;
    }
    if(flag==0){
        while(a!=0){
            cout<<0;
            a--;
        }
        while(b!=0)
        {
            cout<<1;
            b--;
        }
    }
    else{
        while(b!=0){
            cout<<1;
            b--;
        }
        while(a!=0){
            cout<<0;
            a--;
        }
    }
    cout<<endl;
    return 0;
}

#include<iostream>
using namespace std;

int main()
{
	int a, b, x;
	cin >> a >> b >> x;

	int length = a + b;
	int flag = a > b ? 0 : 1;
	if (!flag)
		a--;
	else
		b--;
	cout << flag;
	while (x > 1)
	{
		flag = !flag;
		x--;
		if (!flag)
			a--;
		else
			b--;
		cout << flag;
	}
	if (flag)
	{
		while (b--)
			cout << '1';
		while (a--)
			cout << '0';
	}
	else
	{
		while (a--)
			cout << '0';
		while (b--)
			cout << '1';
	}

	//system("PAUSE");
	return 0;
}

#include <iostream>
#include <stdio.h>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <map>
#include <sstream>
using namespace std;

#define name "tmp"
#define debug(a) cout << #a << ": " << a << endl;
#define debug1(a,l,r) fo(i,l,r) cout << a[i] << ' '; cout << endl;
#define ini freopen(name".inp","r",stdin); freopen(name".out","w",stdout);
#define foe(it,c) for ( __typeof(c.begin())it = c.begin(); it  != c.end(); it ++)
#define fo(i,a,b) for (int i = a; i <= b; i++)
#define fu(i,a,b) for (int i = a; i >= b; i--)
#define ll long long
#define pii pair <int,int>
#define pll pair <ll,ll>
#define F fisrt
#define S second
#define ull unsigned long long
#define psl pair <string,ll>
#define fl float
#define db double
#define plp <ll,pll>

deque <int> f;
int d, x, a, b;
int main()
{
    //ini;
    d = 0;
    cin >> a >> b >> x;
    f.push_back(0);
    --a;

    while (d < x)
    {
        if (a > 0 && d < x)
        {
            if (f.back() == 1)
                f.push_back(0), --a, ++d;
            else if (f.front() == 1)
                f.push_front(0), --a, ++d;
        }
        if (b > 0 && d < x)
        {
            if (f.back() == 0)
                f.push_back(1), --b, ++d;
            else if (f.front() == 0)
                f.push_front(1), --b, ++d;

        }
    }
    if (f.back() == 1)
        while (b > 0)
            f.push_back(1), --b;
    if (f.back() == 0)
        while (a > 0)
            f.push_back(0), --a;
    if (f.front() == 1)
        while (b > 0)
            f.push_front(1), --b;
    if (f.front() == 0)
        while (a > 0)
            f.push_front(0), --a;

    if (b > 0)
    {
        cout << 0;
        fo(i,1,b)
            cout << 1;
        fo(i,1,f.size()-1) cout << f[i];
        return 0;
    }
    else if (a > 0)
    {
        cout << 1;
        fo(i,1,a)
            cout << 0;
        fo(i,1,f.size()-1) cout << f[i];
        return 0;
    }
    fo(i,0,f.size()-1)
        cout << f[i];
}

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;
typedef long long ll;

const int MAX = 205;
char str[MAX];
char res[MAX];

int main() {
	//freopen("test.txt", "r", stdin);
	int a, b, x;
	while (scanf("%d %d %d", &a, &b, &x) != EOF) {
		// 初始化
		memset(str, '\0', sizeof(str));
		memset(res, '\0', sizeof(res));
		// 交换
		bool flag = false;
		if (a < b) {
			swap(a, b);
			flag = true;
		}
		// 构造
		for (int i = 1; i <= x+1; i ++) {
			if (i % 2 == 1) {
				str[i] = '0';
				a --;
			} else {
				str[i] = '1';
				b --;
			}
		}
		int len = 0;
		for (int i = 1; i <= a+1; i ++) {
			res[++len] = '0';
		}
		for (int i = 1; i <= b+1; i ++) {
			res[++len] = '1';
		}
		for (int i = 3; i <= x+1; i ++) {
			res[++len] = str[i];
		}
		// 交换
		if (flag) {
			for (int i = 1; i <= len; i ++) {
				res[i] = (res[i] == '1' ? '0' : '1');
			}
		}
		// 输出
		//printf("%s\n", str+1);
		printf("%s\n", res+1);
	}
	return 0;
}

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

int main()
{
    int a, b, x, indx,cnt=0;
    cin>>a>>b>>x;
    if(a==1 && x==2)x=x;
    else x--;
    indx=a;

    string str="";
    cout<<str<<endl;
    for(int i=0; i<a; i++)str+="0";
    for(int i=0; i<b; i++)str+="1a";
    int n=str.size();

    for(int i=0; i<n; i++)
    {
        if(x<=0)break;
        if(x==1 && a>1)
        {

            swap(str[i], str[n-1]);
            x--;
        }
        else
        {
            for(int j=indx; j<n; j++)
            {
                if(str[j]=='a')
                {
                    swap(str[i], str[j]);
                    x=x-2;
                    indx=j+1;
                    a--;
                    break;
                }
            }
        }
    }
    for(int i=0; i<n; i++)
    {
        if(str[i]!='a')cout<<str[i];
    }

    return 0;
}

#include<cstdio>
void swap(int *a,int *b)
{
    int x=*a;
    *a=*b;
    *b=x;
}
void cambiar(char *c)
{
    if(*c=='0')
        *c='1';
    else
        *c='0';
}
int main()
{
    int a,b,x,i=0,j=0,k=0;
    char s[200]="",primeros[101]="",segundos[101]="",cambio='1',c=cambio;
    scanf("%d %d %d",&a,&b,&x);
    if(a>=b)
        c=cambio='0';
    else
        swap(&a,&b);
    s[i]=c;
    for(i=1;i<=x;i++)
    {
        cambiar(&c);
        s[i]=c;
    }
    j=(x+2)/2;
    k=(x+1)/2;
    for(i=0;i+j-1<a;i++)
        primeros[i]=cambio;
    cambiar(&cambio);
    for(i=0;i+k-1<b;i++)
        segundos[i]=cambio;
    printf("%s%s",primeros,segundos);
    for(i=2;i<=x;i++)
        printf("%c",s[i]);
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
	int a, b, x;
	cin >> a >> b >> x;
	vector<int> ans;
	if (a == x / 2){
		ans.push_back(1);
		b--;
	} else {
		ans.push_back(0);
		a--;
	}
	for (int i = 1; i <= x; i++)
		if (ans[i-1] == 0){
			ans.push_back(1);
			b--;
		} else {
			ans.push_back(0);
			a--;
		}

	for (unsigned int i = 0; i < ans.size() && a + b > 0; i++)
		if (ans[i] == 1){
			ans.insert(ans.begin() + i, b, 1);
			i+= b;
			b = 0;
		} else {
			ans.insert(ans.begin() + i, a, 0);
			i += a;
			a = 0;
		}
	for (auto &i: ans)
		cout << i;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define clr(a, x) memset(a, x, sizeof(a))
#define pb(x) push_back(x)
#define X first
#define Y second
#define fastin                    \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);
typedef long long ll;
typedef long double ld;
typedef pair<int,int > pii;
typedef pair<ll,ll > pll;
const int inf = 0x3f3f3f3f;
const int llinf=0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-6;
const int maxn=250;
int a,b,x;
int main(){
    scanf("%d %d %d",&a,&b,&x);///0///1
    int mid=x/2;
    if(x%2==0){
        if(a>b){
            for(int i=1;i<=mid;i++) printf("01");
            for(int i=1;i<=b-mid;i++) printf("1");
            for(int i=1;i<=a-mid;i++) printf("0");
        }
        else {
            for(int i=1;i<=mid;i++) printf("10");
            for(int i=1;i<=a-mid;i++) printf("0");
            for(int i=1;i<=b-mid;i++) printf("1");
        }
    }
    else if(a>b){
        for(int i=1;i<=mid;i++) printf("01");
        for(int i=1;i<=a-mid;i++) printf("0");
        for(int i=1;i<=b-mid;i++) printf("1");
    }
    else {
        for(int i=1;i<=mid;i++) printf("10");
        for(int i=1;i<=b-mid;i++) printf("1");
        for(int i=1;i<=a-mid;i++) printf("0");
    }
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
const int MAXN = 200;
using namespace std;

inline int read() {
  int x = 0, w = 1;
  char c = ' ';

  while (!isdigit(c)) {
    c = getchar();
    if (c == '-') w = -1;
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }

  return x * w;
}

int a, b, x, ans[MAXN + 5];

void init() {
  a = read();
  b = read();
  x = read();
}

int main() {
#ifdef forever23
  freopen("test.in", "r", stdin);
#endif
  init();

  int r = (a < b);

  for (int i = 1; i <= x + 1; ++i) {
    if (i % 2 == r) {
      ans[i] = 1;
      --b;
    } else {
      ans[i] = 0;
      --a;
    }
  }

  for (int i = 1; i <= x + 1; ++i) {
    printf("%d", ans[i]);
    if (ans[i]) {
      while (b) putchar('1'), --b;
    } else {
      while (a) putchar('0'), --a;
    }
  }

  return 0;
}

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

typedef long long ll;
typedef unsigned long long ull;

#define fr(i,a,b) for(ll i= (a) ; i< (b) ; i++)
#define pb push_back
#define mp make_pair
#define pii pair< int, int >
#define pll pair< long long, long long >
#define all(a) a.begin(), a.end()
#define ff first
#define ss second
//string s = bitset< 64 >( 12345 ).to_string();

//vector <int> A={1,2,3} A.front()=1 A.back()=3 push_back() pop_back() erase(*) vector <int> A(size, value)

int main()
{

	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif

	time_t t1, t2;
	t1 = clock();

	int x,a,b; cin>>a>>b>>x;

	int X=x; int A=a, B=b;

	string s="";

	int n=a+b; int cnt=0;

	s+='0'; a--;
	s+='1'; b--;
	cnt++;

	while(cnt<x)
	{
			if(s[s.length()-1]=='0'){ s+='1'; b--;}
			else {s+='0'; a--;}
			cnt++;		//cout<<"hi";
	}

	if(a==0 && b==0) return cout<<s,0;

	if(a>0)
	{
		string ta="";
		while(a>0)
			{ta+='0'; a--;}

		//cout<<ta<<endl;
		s=ta+s;
	}

	if(b>0)
	{
		string tb="";
		while(b>0)
			{tb+='1'; b--;}

		//cout<<tb<<endl;
		for(int i=0; i<s.length(); i++)
			if(s[i]=='1'){ //cout<<"hi"<<i<<endl;
				s=s.substr(0,i+1)+tb+s.substr(i+1); break;
			}
	}

	int c=0; int cz=0, co=0;
	for(int i=0; i<n-1; i++)
	{
		if(s[i]=='0') cz++; else co++;
		if(s[i]!=s[i+1]) c++;
	}

	if(s[n-1]=='0') cz++; else co++;

	//cout<<cz<<co;
	if(c==X && cz==A && co==B)
		return cout<<s,0;

	string s1=""; a=A; b=B; cnt=0;
	s1+='1'; b--;
	s1+='0'; a--;
	cnt++;

	while(cnt<x)
	{
			if(s1[s1.length()-1]=='0'){ s1+='1'; b--;}
			else {s1+='0'; a--;}
			cnt++;		//cout<<"hi";
	}

	if(a==0 && b==0) return cout<<s1,0;

	if(b>0)
	{
		string tb="";
		while(b>0)
			{tb+='1'; b--;}

		//cout<<ta<<endl;
		s1=tb+s1;
	}

	if(a>0)
	{
		string ta="";
		while(a>0)
			{ta+='0'; a--;}

		//cout<<tb<<endl;
		for(int i=0; i<s1.length(); i++)
			if(s1[i]=='0'){ //cout<<"hi"<<i<<endl;
				s1=s1.substr(0,i+1)+ta+s1.substr(i+1); break;
			}
	}

	c=cz=co=0;
	for(int i=0; i<n-1; i++)
	{
		if(s1[i]=='0') cz++; else co++;
		if(s1[i]!=s1[i+1]) c++;
	}

	if(s1[n-1]=='0') cz++; else co++;

	//cout<<cz<<co;
	if(c==X && cz==A && co==B)
		return cout<<s1,0;

	t2 = clock();
	cerr << "time taken: " << t2-t1;

	return 0;
}

/*
USER: ripghale
LANG: C++

_Bismillahirrahmanirrahim_

All Rights Rezerved by the BGO

Thanks to Hutch for debug function

R.I.P GHALE
*/

#include<bits/stdc++.h>

#define testcase() int tc,tci; sf(tc); for(tci=1; tci<=tc; tci++)

#define fi() freopen("i.txt","r", stdin)
#define fo() freopen("o.txt","w", stdout)
#define fri(x) freopen(x,"r", stdin)
#define fro(x) freopen(x,"w", stdout)
#define met(a,b) memset(a,b,sizeof a);

#define max3(a, b, c) max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c) min(a, b) < min(b, c) ? min(a, b) : min(b, c)

#define sf(a) scanf("%d", &a)
#define sff(a, b) scanf("%d %d", &a, &b)
#define sfff(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define pf(a) printf("%d\n", a)
#define pff(a, b) printf("%d %d\n", a, b)
#define pfff(a, b, c) printf("%d %d %d\n", a, b, c)

#define pb push_back
#define mp make_pair

#define loop(i, j, n) for(int i=j; i<n; i++)
#define ctrl() printf("xxxxxxxxxxxxxxxxxxxxxxx\n")

#define F first
#define S second

#define INF INT_MAX-10

//------bitmask operations------//
#define setbit(x, j) x |= (1<<j)
#define removebit(x, j) x &= ~(1<<j)
#define checkbit(x, j) x &= (1<<j)
#define flipbit(x, j) x ^= (1<<j)
#define lsb(x, t) t= (x & (-x) )
//------------------------------//

using namespace std;

void debug(int n, ...){
	va_list v1;
	va_start(v1, n);
	for(int i=0; i<n; i++){
		int val=va_arg(v1, int);
		printf("%d ", val);
	}
	va_end(v1);
	printf("\n");
}

	/////////////////////////////////////////////////////

		///////////			////		/////////
		//		  //		////		///		//
		//        //		////		///		 //
	    ///////////			////		///		//
		//		//			////		/////////
		//		 //			////		///
		//		  //   ///	////  ///	///
		//		   //  ///  ////  ///	///

	/////////////////////////////////////////////////////

int a[2],v;
bool c;

int main(){
    cin>>a[0]>>a[1]>>v;
    if(a[0]<a[1])c=1;
    while(v>1){
        cout<<c;
        a[c]--;
        c=!c;
        v--;
    }
    while(a[c]){
		cout<<c;
		a[c]--;
	}
    c=!c;
    while(a[c]){
		cout<<c;
		a[c]--;
	}
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false),cin.tie(NUll),cout.tie(NUll)
using namespace std;
const ll mod = 1000000007;
ll gcd(ll a,ll b)
{
    if(a==0) return b;
    else return gcd(b%a,a);
}

int main()
{
    ll a,b,x;
    cin>>a>>b>>x;
    string s="";
    if(x%2==0)
    {
        if(a>b)
        {
            for(int i=0;i<x/2;i++) cout<<"01";

            cout<<string(b-x/2,'1')<<string(a-x/2,'0');
        }
        else
        {
            for(int i=0;i<x/2;i++) cout<<"10";
            cout<<string(a-x/2,'0')<<string(b-x/2,'1');
        }

    }
    else if(a>b)
    {
        for(int i=0;i<x/2;i++) cout<<"01";

        cout<<string(a-x/2,'0')<<string(b-x/2,'1');

    }
    else if(b>=a)
    {
        for(int i=0;i<x/2;i++) cout<<"10";

        cout<<string(b-x/2,'1')<<string(a-x/2,'0');
    }
}

#include<bits/stdc++.h>
using namespace std;
main()
{
    int a,b,d,index1,index0;
    cin >> b >>a >> d;
    char arr[a+b];
    if(a<=b)
    {
        memset(arr,'1',a);
        memset(arr+a,'0',b);
        index1 = a-1, index0 = a+b-1;
    }
    else
    {
        memset(arr,'0',b);
        memset(arr+b,'1',a);
        index1 = b-1, index0 = a+b-1;
    }
    if(d%2==0)
        while(d>1)
        {
            if(d%2==0)
            {
                int temp = arr[index0];
                for(int i=index0;i>0;i--)
                {
                    arr[i] = arr[i-1];
                }
                arr[0] =temp;
                index1++;
            }
            else
            {
                int temp = arr[index1];
                for(int i=index1;i>0;i--)
                {
                    arr[i] = arr[i-1];
                }
                arr[0] =temp;
                //index1++;
            }
            d--;
        }
    else
        while(d>0)
            {
                if(d%2==0)
                {
                    int temp = arr[index0];
                    for(int i=index0;i>0;i--)
                    {
                        arr[i] = arr[i-1];
                    }
                    arr[0] =temp;
                    index1++;
                }
                else
                {
                    int temp = arr[index1];
                    for(int i=index1;i>0;i--)
                    {
                        arr[i] = arr[i-1];
                    }
                    arr[0] =temp;
                    //index1++;
                }
                d--;
            }

    for(int i=0;i<a+b;i++)
        cout << arr[i];
}

#include <stdio.h>
#include <cstdio>
#include <vector>
#include <queue>
#include <iostream>
#include <stack>
#include <math.h>
#include <algorithm>

using namespace std;

int main(void) {
	int a, b, x;
	int i = 1;
	char str[201];
	scanf("%d%d%d", &a, &b, &x);

	if (a > b) {
		str[0] = '0';
		a--;
	}
	else {
		str[0] = '1';
		b--;
	}

	while (x > 0 && a != 0 && b != 0) {
		if (str[i - 1] == '0') {
			str[i] = '1';
			b--;
			x--;
			if (x == 0) {
				while (a != 0) {
					str[i] = '0';
					i++;
					a--;
				}
				str[i] = '1';
			}
		}
		else {
			str[i] = '0';
			a--;
			x--;
			if (x == 0) {
				while (b != 0) {
					str[i] = '1';
					i++;
					b--;
				}
				str[i] = '0';
			}
		}
		i++;
	}

	while (a != 0) {
		str[i] = '0';
		i++;
		a--;
	}

	while (b != 0) {
		str[i] = '1';
		i++;
		b--;
	}

	str[i] = '\0';
	printf("%s", str);

	return 0;
}

//fifer a tak luboin
#include <bits/stdc++.h>

#define ll long long
#define mb make_pair
#define pb push_back
#define S second
#define F first
#define INF 1e9
#define P 1000000009
#define pi (3.1415926535)

using namespace std;

int main()
{

    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    /*freopen("black.in", "r", stdin); sdfsdf
    freopen("black.out", "w", stdout);*/

        int A,B,x;
        cin>>A>>B>>x;
        string ans="";

        int cur=0;
        if(B>A)
        {
            cur=1;
        }
        for(int i=0;i<x+1;i++)
        {
            ans+=(char)(cur+48);
            cur=(cur^1);
        }

        int cnt0=0;
        int cnt1=0;
        for(int i=0;i<ans.size();i++)
        {
            if(ans[i]=='0')
            {
                cnt0++;
            }
            else
            {
                cnt1++;
            }
        }
        A-=cnt0;
        B-=cnt1;
        int idx1;
        for(int i=0;i<ans.size();i++)
        {
            if(ans[i]=='0')
            {
                idx1=i;break;
            }
        }
        while(A>0)
        {
            ans.insert(idx1,"0");
            A--;
        }

        int idx;

        for(int i=0;i<ans.size();i++)
        {
            if(ans[i]=='1')
            {
                idx=i;break;
            }
        }

        while(B>0)
        {
            ans.insert(idx,"1");
            B--;
        }
        cout<<ans;

return 0;}

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
using namespace std;

vector<int> from[100010];
int k[100010];

int main() {
    int k0, k1, z;
    cin >> k0 >> k1 >> z;

    if (z == 0) {
        for (int i = 0; i < k0; i++)
            cout << 0;
        for (int i = 0; i < k1; i++)
            cout << 1;
        return 0;
    }

    string s = k0 >= k1 ? "01" : "10";
    for (int i = 1; i < z; i++)
        s += ('0' + '1' - s[s.size() - 1]);

    k0 -= count(s.begin(), s.end(), '0');
    k1 -= count(s.begin(), s.end(), '1');

    if (s[0] == '0') {
        for (int i = 0; i < k0; i++)
            cout << 0;
        cout << "01";
        for (int i = 0; i < k1; i++)
            cout << 1;
    } else {
        for (int i = 0; i < k1; i++)
            cout << 1;
        cout << "10";
        for (int i = 0; i < k0; i++)
            cout << 0;
    }
    cout << s.substr(2);
}

#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <string>
#include <queue>
#include <stack>
#define LL long long
#define rep(i,a,b) for(int i=a;i<b;i++)
#define repn(i,b) for(int i=1;i<=b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
#define pren(i,a) for(int i=a;i>0;i--)
#define all(x) (x).begin(),(x).end()
#define endl "\n"
const int INF = 0x7fffffff;
const LL  INF_LL = (LL)1e18;
const int maxn = 1e5+10;
using namespace std;

int a, b, x;
bool T[205];
int t = 1;

int main()
{
	memset(T,false,sizeof(T));
	scanf("%d%d%d",&a,&b,&x);
	int tot = a+b;
	T[0] = a<b;
	if (a >= b) a--;
	else b--;
	while (x > 1) {
		x--;
		T[t] = !T[t-1];
		if (T[t]) b--;
		else a--;
		t++;
	}
	//cout<<tot<<endl;
	if (T[t-1]) while (b--) T[t++] = true;
	else while (a--) T[t++] = false;
	T[t] = !T[t-1];
	rep(i,t+1,tot) T[i] = T[i-1];
	rep(i,0,tot) cout<<T[i];
	cout<<endl;
	return 0;
}

 #include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define ll long long int
#define mod 100000007
#define start int t;cin>>t;while(t--)
#define db(x) cout<<#x<<"="<<x<<"\n"
#define db2(a,b)cout<<#a<<": "<<a<<" , "<<#b<<": "<<b<< endl;
#define db3(a,b,c)cout<<#a<<": "<<a<<" , "<<#b<<": "<<b<<" , "<<#c<<": "<<c<<endl;
#define forr(i, n) for (int i = 0; i < n; i++)
#define fr(i, n) for (int i = 1; i <= n; i++)
#define en "\n"
#define vi vector<int>
#define vli vector<long long int>
#define pii pair<int,int>
#define mii map<int,int>
#define mpp make_pair
#define pb emplace_back
#define all(x) x.begin(),x.end()
#define sortv(x) sort(x.begin(),x.end())
#define sorta(x,n) sort(x,x+n)
#define print_all(x) for(auto t:x) cout<<t<<" ";cout<<en;
#define in(x) cin>>x
#define in2(x,y) cin>>x>>y
#define in3(x,y,z) cin>>x>>y>>z
#define oo(x) cout<<x<<endl
#define oo2(x,y) cout<<x<<" "<<y<<endl
#define oo3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
#define ood(n,x) cout<<fixed<<setprecision(n)<<x<<"\n"
#define sz(x) x.size()
#define ff first
#define ss second
using namespace std;
ll mod_pow(ll x, int n){
    if(n == 0)      return 1;

    ll res = 1;
    while(n > 0){
        if(n & 1)   res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return res;
}
vector<ll> allDivisors(ll n) {
    vector<ll> v;
    for (ll i=1; i<=sqrt(n); i++)
    {
        if (n%i == 0)
        {
            if (n/i == i)
                v.pb(i);

            else {
                v.pb(i);
                v.pb(n/i);
            }
        }
    }
    return v;
}
bool isPalin(string s){
    for(int i=0;i<s.size()/2;i++){
        if(s[i]!=s[s.size()-i-1]){
            return false;
        }
    }
    return true;
}

vi z_algo(string s){
    int n=sz(s);
    int l=0,r=0;
    vi z(n);
    for(ll i=1;i<n;i++){
        if(i>r){
            l=r=i;
            while(r<n && s[r]==s[r-l]){
                r++;
            }
            z[i]=r-l;
            r--;
        }
        else{
            ll index=i-l;
            if(i+z[index]<=r) z[i]=z[index];
            else{
                l=i;
                while(r<n && s[r]==s[r-l]){
                    r++;
                }
                z[i]=r-l;
                r--;
            }
        }
    }
    return z;
}

vi z_match(string str, string pat){
    string total=pat+"$"+str;
    vi z=z_algo(total);
    vi ans;
    forr(i,z.size()){
        if(z[i]==pat.size()){
            ans.pb(i-1-pat.size());
        }
    }
    return ans;

}

vi kmp(string s) {
    int n = (int)s.length();
    vector<int> pi(n);
    for (int i = 1; i < n; i++) {
        int j = pi[i-1];
        while (j > 0 && s[i] != s[j])
            j = pi[j-1];
        if (s[i] == s[j])
            j++;
        pi[i] = j;
    }
    return pi;
}

vi kmp_match(string str, string pat){
    string total=pat+"$"+str;
    int n=sz(total);
    vi ans=kmp(total);
    vi res;
    for(int i=pat.size()+1;i<n;i++){
        if(ans[i]==pat.size()){
           res.pb(i-2*pat.size());
        }
    }
    return res;
}

bool comp(const pair<ll, ll> &a, const pair<ll, ll> &b) {
    if (a.first == b.first) {
        return a.second < b.second;
    } else {
        return a.second < b.second;
    }
}

bool isPrime(ll n)
{
    int skip=0;
    if(n<2)
        return false;
    else if(n==2)
        return true;
    ll limit=sqrt(n);
    if(n%2==0)
        return false;
        for(int j=3; j<=limit; j+=2){
            if(n%j==0)
                return false;
            }
    return true;
}

ll fact(ll n){
    if(n==1) return 1;
    else return n*fact(n-1);
}

ll kadane(vli &a, int n){
    ll curr=a[0];
    ll ans=a[0];
    fr(i,n-1){
        curr+=a[i%n];
        ans=max(ans,curr);
        curr=max(curr,0LL);
    }
    return ans;
}

// Stay honest with yourself
bool fine=0;
//Read the constraints carefully Mridul
//You Can Do this

void solve(){
    int a,b,x;
    in3(a,b,x);
    if(a>=b){
        string s1="01";
        string s="";
        for(int i=1;i<=(x+1)/2;i++){
            s+=s1;
        }
        if(x&1){
            int zero=a-count(all(s),'0');
            int ones=b-count(all(s),'1');
            string fro(zero,'0');
            string last(ones,'1');
            string ans=fro+s+last;
            oo(ans);
            return;
        }
        else{
            int zero=a-count(all(s),'0')-1;
            int ones=b-count(all(s),'1');
            string fro(zero,'0');
            string last(ones,'1');
            string ans=fro+s+last+"0";
            oo(ans);
            return;
        }
    }
    else{
        string s1="10";
        string s="";
        for(int i=1;i<=(x+1)/2;i++){
            s+=s1;
        }
        if(x&1){
            int zero=a-count(all(s),'0');
            int ones=b-count(all(s),'1');
            string fro(zero,'0');
            string last(ones,'1');
            string ans=last+s+fro;
            oo(ans);
            return;
        }
        else{
            int zero=a-count(all(s),'0');
            int ones=b-count(all(s),'1')-1;
            string fro(zero,'0');
            string last(ones,'1');
            string ans=last+s+fro+"1";
            oo(ans);
            return;
        }
    }

}

int main(){
   /* #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin);
     freopen("error.txt", "w", stderr);
      freopen("output.txt", "w", stdout);
     #endif */
    fast;
   if(fine){
        start{
            solve();
        }
   }
   else solve();
    return 0;
}

//Vivek
#pragma optimize("", off)
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:36777216")
#include <bits/stdc++.h>

#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define mod 1000000007
#define all(v) v.begin(),v.end()
#define pb push_back
#define sz(i) int(i.size())
#define setto(n) cout << fixed << setprecision(n)
#define fi first
#define se second
#define mem(a, b) memset(a, b, sizeof(a))
#define len(s) int(s.length())
#define INF LONG_MAX
#define UNIQUE(a) ((a).erase(unique((a).begin(), (a).end()), (a).end()))
#define random() ((ll)rand() << 32 | rand())
#define C(c) c-'a'

using namespace std;

#ifdef ONLINE_JUDGE
#define endl '\n'
#endif
#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
template<class T> void smin(T& a, T val) {if (a > val) a = val;}
template<class T> void smax(T& a, T val) {if (a < val) a = val;}
template<typename T>inline std::ostream &operator << (std::ostream & os,const std::vector<T>& v){bool first = true;os << "[";for(auto i: v){if(!first)os << ", ";os << i;first = false;}return os << "]";}
//Check N size twiceeeeeeeeeeeeeeeeee, and verify it
const int N = 2*1e5 + 10;

int n, a, b, x;

int main(){

	cin>>a>>b>>x;

	int t0 = a, t1 = b;
	// a = no of 0s
	// b = no of 1s

	--x;

	string s = "";

	int f = (a>b) ? 1 : 0, i = 0;

	char last = '0';

	for ( ; x > 0 ; )
	{
		if(f){
			s+= "0";
			last = '0';
			--a;
		}
		else{
			s+= "1";
			last = '1';
			--b;
		}
		f = !f;
		if(i != 0)
			--x;
		++i;
	}

	int ans = 0, co = 0;
	cout<<s;

	if(last == '1'){
		for (int i = 0; i < b; ++i)
		{
			cout<<1;
			++ans;
		}
		for (int i = 0; i < a; ++i)
		{
			cout<<0;
			++ans;
			++co;
		}
	}

	else{
		for (int i = 0; i < a; ++i)
		{
			cout<<0;
			ans++;
			++co;
		}
		for (int i = 0; i < b; ++i)
		{
			cout<<1;
			++ans;
		}
	}

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
bool status[100000000];
string i2s(ll n){stringstream ss;ss<<n;string s;s=ss.str();return s;}
ll gcd(ll a,ll b){if(a%b==0) return b;else return gcd(b,a%b);}
ll lcm(ll a, ll b){return (a*b)/gcd(a,b);}
void fast(){ios_base::sync_with_stdio(false);cin.tie(NULL);}
void sieve(){int i,j,n=10000000;status[1]=1;for(i=4; i<=n; i+=2)status[i]=1;for(i=3; i<=sqrt(n); i+=2){if(status[i]==0){for(j=i*i; j<=n; j+=i)status[j]=1;}}}
int main()
{

   /* Read Problem Clearly and Code*/
    fast();
    int n,k,x;
    while(cin>>n>>k>>x)
    {
        int i=1;
        string s;
        while(i!=x+2)
        {
            if(n>=k){
                if(i%2==1){
                    s+='0';
                }
                else s+='1';
            }
            else{
                 if(i%2==1){
                    s+='1';
                }
                else s+='0';
            }
            i++;
        }
        //cout<<s<<endl;
        int sz=s.size();
        int zero,one;
        zero=count(s.begin(),s.end(),'0');
        one=count(s.begin(),s.end(),'1');
        if(zero<n){
        if(s[0]=='0')
        {
            string szero;
           for(i=1; i<=n-zero; i++)
           {
               szero+='0';
           }
           s=szero+s;
        }
        else if(s[sz-1]=='0')
        {
            string szero;
           for(i=1; i<=n-zero; i++)
           {
               szero+='0';
           }
           s=s+szero;
        }
        else{

            string ls;
            for(i=0; i<sz-1; i++)
            {
                ls+=s[i];
            }
            string szero;
           for(i=1; i<=n-zero; i++)
           {
               szero+='0';
           }
           s=ls+szero;
            s+='1';
        }
        }
       // cout<<s<<endl;
         sz=s.size();

        if(one<k)
        {

            if(s[0]=='1')
            {
                string sone;
                for(i=1; i<=k-one; i++)
                    sone+='1';
                  s=sone+s;
            }
            else if(s[sz-1]=='1')
            {

               string sone;
                for(i=1; i<=k-one; i++)
                    sone+='1';
                  s=s+sone;
                  //cout<<s<<endl;
            }
            else{

                string ls;
                for(i=0; i<sz-1 ; i++)
                {
                    ls+=s[i];
                }
                //cout<<ls<<endl;
                 string sone;
                for(i=1; i<=k-one; i++)
                    sone+='1';

                    s=ls+sone;
                    s=s+'0';

            }

        }
       cout<<s<<endl;

    }
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main() {
  int a, b, x;
  cin >> a >> b >> x;
  string res;
  for (int i = 0; i < x + 1; i++) {
    res.push_back('0' + (i & 1 ^ a > b ^ 1));
  }
  if (a > b) {
    a -= (x + 2) / 2;
    b -= (x + 1) / 2;
    res = string(a, '0') + res;
    if (res.back() == '1') {
      res += string(b, '1');
    } else {
      res = res.substr(0, res.size() - 1) + string(b, '1') + '0';
    }
  } else {
    a -= (x + 1) / 2;
    b -= (x + 2) / 2;
    res = string(b, '1') + res;
    if (res.back() == '0') {
      res += string(a, '0');
    } else {
      res = res.substr(0, res.size() - 1) + string(a, '0') + '1';
    }
  }
  cout << res << '\n';
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int a,b,x;
	cin>>a>>b>>x;
	deque<int> c;
	if(x%2!=0)
	{
		for(int i=0;i<=x;i++)
		{
			c.push_back(i%2);
		}
		int l0=a-(x/2)-1;
		int l1=b-(x/2)-1;
		for(int i=0;i<l0;i++)
		{
			c.push_front(0);
		}
		for(int i=0;i<l1;i++)
		{
			c.push_back(1);
		}
	}
	else
	{
		if(a>b)
		{
			for(int i=0;i<=x;i++)
			{
				c.push_back(i%2);
			}
			int l0=a-(x/2)-1;
			for(int i=0;i<l0;i++)
			{
				c.push_front(0);
			}

			int l1=b-(x/2);
			*(c.end()-1)=1;
			for(int i=0;i<l1-1;i++)
			{
				c.push_back(1);
			}
			c.push_back(0);

		}
		else
		{
			for(int i=1;i<=x+1;i++)
			{
				c.push_back(i%2);
			}
			int l1=b-(x/2)-1;
			for(int i=0;i<l1;i++)
			{
				c.push_front(1);
			}

			int l0=a-(x/2);
			*(c.end()-1)=0;
			for(int i=0;i<l0-1;i++)
			{
				c.push_back(0);
			}
			c.push_back(1);
		}
	}
	for (std::deque<int>::iterator it = c.begin(); it!=c.end(); ++it)
    std::cout <<*it;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int count(string s){

	int l=s.length();

	int k=0;

	for(int i=0; i+1<l; i+=1){

		if(s[i]=='1' && s[i+1]=='0'){

			k+=1;
		}

		else if(s[i]=='0' && s[i+1]=='1'){

			k+=1;
		}
	}

	return k;
}

int main(){

	int a,b,c,d,k;

	cin>>a>>b>>c;

	string s;

	d=a+b;

	for(int i=0; i<a; i+=1){

		s+='1';
	}

	for(int i=0; i<b; i+=1){

		s+='0';
	}

	for(int i=0; i+1<d; i+=1){

		for(int j=0; j+1<d; j+=1){

			if(s[j]!=s[j+1]){

				swap(s[j],s[j+1]);

				k=count(s);

				if(k==c){

					break;
				}
			}
		}

		if(k==c){

			break;
		}
	}

	cout<<s<<endl;
}

#include <iostream>

using namespace std;

class Solution{

public:
    string binaryString(int a, int b, int x){

        if(x <= 1)
            return repeat(a, "0") + repeat(b, "1");

        string first, second;
        if(a > b)
            first = "0", second = "1";
        else
            first = "1", second = "0";

        int firstNum = 0, secondNum = 0;
        string res = first;
        firstNum ++;
        for(int i = 0 ; i < x - 1 ; i ++){
            res += (i % 2 == 0 ? second : first);
            if(i % 2 == 0)
                secondNum ++;
            else
                firstNum ++;
        }

        if(a > b)
            a -= firstNum, b -= secondNum;
        else
            a -= secondNum, b -= firstNum;

        if((x - 2) % 2 == 0)
            res += repeat(b, second) + repeat(a, first);
        else
            res += repeat(b, first) + repeat(a, second);

        return res;
    }

private:
    string repeat(int n, const string& pattern){
        string res = "";
        while(n --)
            res += pattern;
        return res;
    }
};

int main() {

    int a, b, x;
    cin >> a >> b >> x;
    cout << Solution().binaryString(a, b, x) << endl;

    return 0;
}

/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define ull unsigned long long
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    int i,j,k,l,m,n,p,q,x,y,u,v,r,tc,t;

    int a,b;
    char ch[300];

    cin>>a>>b>>x;

    m=x/2;

    if(x%2==0 && a>=b)
    {
    	for(i=1;i<=m;i++)
    		cout<<"01";
    	for(i=1;i<=b-m;i++)
    		cout<<1;
    	for(i=1;i<=a-m;i++)
    		cout<<0;
	}
	else if(x%2==0 && a<b)
    {
    	for(i=1;i<=m;i++)
    		cout<<"10";
    	for(i=1;i<=b-m;i++)
    		cout<<0;
    	for(i=1;i<=a-m;i++)
    		cout<<1;
	}
	else if(x%2==0 && a<b)
	{
		for(i=1;i<=m;i++)
			cout<<"01";
		for(i=1;i<=a-m;i++)
			cout<<0;
		for(i=1;i<=b-m;i++)
			cout<<1;
	}
	else
	{
		for(i=1;i<=m;i++)
			cout<<"10";
		for(i=1;i<=a-m;i++)
			cout<<1;
		for(i=1;i<=b-m;i++)
			cout<<0;
	}
	cout<<endl;

//	main();

    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
#include <algorithm>
#include <cmath>
#include <functional>

using namespace std;

int main()
{
	int a, b, x;
	cin >> a >> b >> x;
	string ans;
	if (x == 1)
	{
		while (a--)
		{
			ans += '0';
		}
		while (b--)
		{
			ans += '1';
		}
		cout << ans;
		return 0;
	}
	if (x % 2 == 0)
	{
			if (a == max(a, b))
			{
				while (x)
				{
					ans += '0';
					ans += '1';
					x -= 2;
					a--;
				}
				while (a--)
				{
					ans += '0';
				}
				cout << ans;
				return 0;
			}
			if (b == max(a, b))
			{
				while (x)
				{
					ans += '1';
					ans += '0';
					x -= 2;
					b--;
				}
				while (b--)
				{
					ans += '1';
				}
				cout << ans;
				return 0;
			}

	}
	else
	{
		if (a == max(a, b))
		{
			while (x > 1)
			{
				ans += '0';
				ans += '1';
				x -= 2;
				a--;
				b--;
			}
			while (a--)
			{
				ans += '0';
			}
			while (b--)
			{
				ans += '1';
			}
			cout << ans;
			return 0;
		}
		if (b == max(a, b))
		{
			while (x > 1)
			{
				ans += '1';
				ans += '0';
				x -= 2;
				a--;
				b--;
			}
			while (b--)
			{
				ans += '1';
			}
			while (a--)
			{
				ans += '0';
			}
			cout << ans;
			return 0;
		}
	}

}

// BinaryConstructing.cpp

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <unordered_map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <deque>
#include <bitset>
#include <climits>
#include <cstdio>
#include <list>
#include <iomanip>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long int
void solve()
{
	int z, o, idx;
	cin >> z >> o >> idx;

	string temp = "01";

	int i = 1;
	int to = 1;
	int tz = 1;
	int flag = 1;

	while (i < idx)
	{

		if (flag == 1)
		{
			temp += "0";

			tz++;
		} else
		{
			temp += "1";

			to++;
		}
		flag = 1 - flag;
		i++;

	}
	to = o - to;
	tz = z - tz;
	string aageki = "";
	while (tz > 0)
	{
		aageki += "0";
		tz--;
	}
	aageki += temp;

	while (to > 0)
	{
		aageki += "1";
		to--;
	}

	cout << aageki << endl;

	// cout << temp << endl;

}
int main() {
	fastIO

	solve();
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
const ll d=1e9+7;
#define pb push_back
#define mp make_pair
#define sz(a) (ll)a.size()
#define inst(a) insert(a)
#define f first
#define s second
#define lpi(i,start,end,val) for(i=start;i<=end;i+=val)
#define lpr(i,start,end,val) for(i=start;i>=end;i-=val)
#define lp(i,n) for(i=0;i<n;i++)
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
	int a,b,x,i,ans=0;
	cin>>a>>b>>x;
	if(x==1)
	{
		lp(i,a)
			cout<<"0";
		lp(i,b)
			cout<<"1";
		cout<<endl;
		return 0;
	}
	bool flag=0;
	if(a>=b)
	{
	lp(i,x)
	{
		if(!flag && a)
		{
			cout<<"0";
			a--;
			flag=1;
		}
		else if(flag && b)
		{
			cout<<"1";
			b--;
			flag=0;
		}
		if(i>0)
			ans++;
		if(ans>=x-2)
			break;
	}
	if(!flag)
	{
		lp(i,a)
			cout<<"0";
		lp(i,b)
			cout<<"1";
	}
	else
	{
		lp(i,b)
			cout<<"1";
		lp(i,a)
			cout<<"0";
	}
	cout<<endl;
	}
	else
	{
		lp(i,x)
	{
		if(!flag && a)
		{
			cout<<"1";
			a--;
			flag=1;
		}
		else if(flag && b)
		{
			cout<<"0";
			b--;
			flag=0;
		}
		if(i>0)
			ans++;
		if(ans>=x-2)
			break;
	}
	if(!flag)
	{
		lp(i,a)
			cout<<"1";
		lp(i,b)
			cout<<"0";
	}
	else
	{
		lp(i,b)
			cout<<"0";
		lp(i,a)
			cout<<"1";
	}
	cout<<endl;
	}
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main(){

	int a,bb,x;
	cin>>a>>bb>>x;
	bool b=true;
	int c0=0;
	int c1=0;
	for(int i=1;i<x;i++){
		if(i%2==0){
			b=true;
			cout<<"1";
			c1++;
		}
		else{
			b=false;
			cout<<"0";
			c0++;
		}
	}
	if(b==true){
		for(int i=1;i<=a-c0;i++){
			cout<<"0";
		}
		for(int i=1;i<=bb-c1;i++ ){
			cout<<"1";
		}
	}
	else{
		for(int i=1;i<=bb-c1;i++ ){
			cout<<"1";
		}
		for(int i=1;i<=a-c0;i++){
			cout<<"0";
		}
	}
}

#include <iostream>

using namespace std;

int main()
{
    int a, b, x, aT;
    cin >> a >> b >> x;
    x--;
    aT = a;
    for (int i = 0; i < a-x/2-x%2; i++)
    {
        cout << 0;
        aT--;
    }
    for (int i = 0; i < x/2; i++)
    {
        cout << 10;
        aT--;
        b--;
    }
    for (int i = 0; i < b; i++)
        cout << 1;
    for (int i = 0; i < aT; i++)
        cout << 0;
}

#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iostream>
using namespace std;
int main(){
	int a,b,x;
	cin>>a>>b>>x;
	int t = x/2;
	int y = x/2;
	int u = a-x/2;
	int v = b-x/2;
	if(b > a) while(t--) cout<<"10";
	else while(y--) cout<<"01";
	if(b < a){
		while(u--) cout<<"0";
		while(v--) cout<<"1";
	}
	else {
		while(v--) cout<<"1";
		while(u--) cout<<"0";
	}
	cout<<endl;
	return 0;
}

#include <iostream>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;

typedef long long ll;
#define mx 1005

int main()
{
    int a,b,x,d;
    while(~scanf("%d%d%d", &a,&b,&x))
    {
        if(b>=a)
        {
            for(int i=0; i<x/2; i++)
            {
                cout<<"10";
            }
        }
        else
        {
            for(int i=0; i<x/2; i++)
            {
                cout<<"01";
            }
        }
        if(x%2==0&&b>=a)
        {
            for(int i=x/2; i<a; i++)
                cout<<'0';
            for(int i=x/2; i<b; i++)
                cout<<'1';
        }
        else
        {
            for(int i=x/2; i<b; i++)
                cout<<'1';
            for(int i=x/2; i<a; i++)
                cout<<'0';
        }
        cout<<endl;
    }
    return 0;
}

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

int main() {
	int a,b,x;
	cin>>a>>b>>x;
    string ans;
    ans+='1';
    a--;
    int count=0;
    while(a>0 && b>0 && x>1)
    {
        if(count%2==0)
        {
            ans+='0';
            b--;
        }
        else
        {
            ans+='1';
            a--;
        }
        count++;
        x--;
    }
    if(count%2!=0)
    {
        while(b>0)
        {
            ans+='0';
            b--;
        }
        while(a>0)
        {
            ans+='1';
            a--;
        }
    }
    else
    {
        while(a>0)
        {
            ans+='1';
            a--;
        }
        while(b>0)
        {
            ans+='0';
            b--;
        }
    }
    cout<<ans;
	return 0;
}

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

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void __f(const char* na, Arg1&& arg1, Args&&... args) {
  const char* c = strchr(na + 1, ',');
  cerr.write(na, c - na) << " : " << arg1 << " , ";
  __f(c + 1, args...);
}
#define SZ(v) (int)v.size()
#define endl "\n"
#define ALL(v) v.begin(), v.end()
#define UNIQUE(v) sort(ALL(v)),v.erase(unique(ALL(v)),v.end())
typedef long long LL;
typedef pair <int,int> pii;
const double pi = acos(-1.0);
const double eps = 1e-8;
const int inf = 1e9;
const LL INF = 1e18;
const int mod = 1e9 + 7;
const int N = 1e5 + 5;

int a, b, x;
int dp[101][101][201][2];

int ok(int idx, int used_a, int diff, int pre) {
  if (idx > a + b) return used_a == a && diff == x;
  int used_b = idx - 1 - used_a;

  if (dp[idx][used_a][diff][pre] != -1) return dp[idx][used_a][diff][pre];

  int ret = 0;
  if (used_a + 1 <= a) ret |= ok(idx + 1, used_a + 1, diff + (pre != 0), 0);
  if (used_b + 1 <= b) ret |= ok(idx + 1, used_a, diff + (pre != 1), 1);
  return dp[idx][used_a][diff][pre] = ret;
}

void print(int idx, int used_a, int diff, int pre) {
  if (idx > a + b) return;
  int used_b = idx - 1 - used_a;
  if (used_a + 1 <= a && ok(idx + 1, used_a + 1, diff + (pre != 0), 0)) {
    cout << 0;
    print(idx + 1, used_a + 1, diff + (pre != 0), 0);
    return;
  }
  else if (used_b + 1 <= b && ok(idx + 1, used_a, diff + (pre != 1), 1)) {
    cout << 1;
    print(idx + 1, used_a, diff + (pre != 1), 1);
    return;
  }
}

void solve() {
  cin >> a >> b >> x;
  memset(dp, -1, sizeof(dp));
  if (ok(2, 1, 0, 0)) {
    cout << 0;
    print(2, 1, 0, 0);
  }
  else if (ok(2, 0, 0, 1)) {
    cout << 1;
    print(2, 0, 0, 1);
  }
  else {
    assert(false);
  }
  cout << endl;
}

int main() {
  ios_base::sync_with_stdio(0); cin.tie(0);
  #ifdef LOCAL
    freopen("input.txt", "r", stdin);
  #endif
  int t = 1;
  //cin >> t;
  for (int tc = 1; tc <= t; tc++) solve();
  return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define N 300009
#define fast cin.tie(0);cout.tie(0);
#define order ios::sync_with_stdio(0);
using namespace std;
int o,z,x;
string s;
int main()
{
    fast order
    cin>>z>>o>>x;
    int a=0;
    x++;
    while(x&&o!=0&&z!=0)
    {
        x--;
        if(a==0)z--;
        else o--;
        s+=char('0'+a);
        a=1-a;
    }
    int jj=0;
    if(x)
    {
        if(z==0){cout<<1;o--;}
        else jj=1;
    }
    z-=jj;
    for(int i=0;i<z;i++)cout<<0;
    if(!s.empty()){
    cout<<s.substr(0,s.size()-1);
        if(s[s.size()-1]=='0')jj++;
    else cout<<1;
    }
    for(int i=0;i<o;i++)cout<<1;
    while(jj--)cout<<0;
}

#include <iostream>
using namespace std;
int main(){
    int a,b,x;
    cin >> a >> b >> x;
    int zc = 1;
    int oc = 0;
    string s = "0";
    for(int i=1;i<=x;i++){
        if(s[s.size()-1]=='0') {s+='1'; oc+=1; continue;}
        if(s[s.size()-1]=='1') {s+='0'; zc+=1; continue;}
    }
    string z = "";
    for(int i=zc;i<a;i++){ z+='0';}
    string o = "";
    for(int i=oc;i<b;i++){ o+='1';}
    int ochk = 0;
    int zchk = 0;
    string replace = "";
    for(int i=0;i<s.size();i++){
        replace += s[i];
        if(s[i]=='0'){
            if(zchk==0){
                zchk = 1;
                replace += z;
            }
        }
    }
    s = replace;
    replace = "";
    for(int i=0;i<s.size();i++){
        replace += s[i];
        if(s[i]=='1'){
            if(ochk==0){
                ochk = 1;
                replace += o;
            }
        }
    }
    cout << replace << endl;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    int a,b,x;
    cin>>a>>b>>x;
    int target=a+b;
    deque<int> dq;
    vector<int> vc;
    int l,m;
    if(a>=b){
        l=0;
        m=1;
    }
    else{
        l=1;
        m=0;
    }
    dq.push_back(l);
    dq.push_back(m);
    vc.push_back(l);
    vc.push_back(m);
    a-=1;
    b-=1;

    int pattern=1,i;
    for(i=2;i<target;i++)
    {
        if(pattern<x)
        {
            if(vc[vc.size()-1]==0){
                vc.push_back(1);
                dq.push_back(1);
                b--;

            }
            else{
                vc.push_back(0);
                dq.push_back(0);
                a--;
                 //cout<<"hi";
            }

            pattern++;
        }
        else
        {
            if(dq.back()!=0){
                while(a>0){
                    dq.push_front(0);
                    a--;
                }
            }
            else{
                while(a>0){
                    dq.push_back(0);
                    a--;
                }

            }

            if(dq.back()!=1){
                while(b>0){
                    dq.push_front(1);
                    b--;
                }
            }
            else{
                while(b>0){
                    dq.push_back(1);
                    b--;
                }
            }
            break;
        }
    }

    while(!dq.empty())
    {
        cout<<dq.front();
        dq.pop_front();
    }

}

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;
typedef long long ll;

const int MAX = 105;
char str[MAX];
char res[MAX];

int main() {
	//freopen("test.txt", "r", stdin);
	int a, b, x;
	while (scanf("%d %d %d", &a, &b, &x) != EOF) {
		// 初始化
		memset(str, '\0', sizeof(str));
		memset(res, '\0', sizeof(res));
		// 交换
		bool flag = false;
		if (a < b) {
			swap(a, b);
			flag = true;
		}
		// 构造
		for (int i = 1; i <= (x + 1) - 2; i ++) {
			if (i % 2 == 1) {
				str[i] = '0';
				a --;
			} else {
				str[i] = '1';
				b --;
			}
		}
		int len = 0;
		for (int i = 1; i <= a; i ++) {
			res[++len] = '0';
		}
		for (int i = 1; i <= b; i ++) {
			res[++len] = '1';
		}
		strcpy(res+1+len, str+1);
		// 交换
		if (flag) {
			for (int i = 1; i <= len; i ++) {
				str[i] = (str[i] == '1' ? '0' : '1');
			}
		}
		// 输出
		printf("%s\n", res+1);
	}
	return 0;
}

#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
#define INF 1e9;

int a, b, x;
vector<int>dq;

int main() {
	scanf("%d%d%d", &a, &b, &x);

	for (int i = 0; i < x; i++)
	{
		if (i % 2 == 1) {
			b--;
			dq.push_back(1);
		}
		else {
			a--;
			dq.push_back(0);
		}
	}

	if (dq.back() == 0) {
		for (int i = 0; i < a; i++)
			dq.push_back(0);

		for (int i = 0; i < b; i++)
			dq.push_back(1);
	}
	else {
		for (int i = 0; i < b; i++)
			dq.push_back(1);

		for (int i = 0; i < a; i++)
			dq.push_back(0);
	}
	for (int i = 0; i < dq.size(); i++)
		printf("%d", dq[i]);
}

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

int main()
{
    int a, b, x, indx,cnt=0;
    cin>>a>>b>>x;
    if(a>1 && b>1 && x>1)x--;
    indx=a;

    string str="";
    cout<<str<<endl;
    for(int i=0; i<a; i++)str+="0";
    for(int i=0; i<b; i++)str+="1a";
    int n=str.size();

    for(int i=0; i<n; i++)
    {
        if(x==0)break;
        if(x==1)
        {

            swap(str[i], str[n-1]);
            x--;
        }
        else
        {
            for(int j=indx; j<n; j++)
            {
                if(str[j]=='a')
                {
                    swap(str[i], str[j]);
                    x=x-2;
                    indx=j+1;
                    break;
                }
            }
        }
    }
    for(int i=0; i<n; i++)
    {
        if(str[i]!='a')cout<<str[i];
    }

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
  int a = 0, b = 0, x = 0;
  cin >> a  >> b >> x;
  string res = "";

  bool inside = true;
    if(a >= b){

     while(x > 1){
        if(inside){
          res += "0";
          a--;
        }
        else{
          res += "1";
          b--;
        }
        inside = !inside;
        x--;
      }
     }else{
      while(x > 1){
        if(inside){
          res += "1";
          b--;
        }
        else{
          res += "0";
          a--;
        }
          inside = !inside;
        x--;
      }
    }
  if(res[res.size() - 1] == '0'){
    for(int i = 0; i < a; i++)
      res += "0";

    for(int q = 0; q < b; q++)
      res += "1";
  }else{
      for(int i = 0; i < b; i++)
      res += "1";

    for(int q = 0; q < a; q++)
      res += "0";

  }
  cout << res << "\n";

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int x;

int main() {
    int a, b;
    scanf("%d%d%d", &a, &b, &x) ;
    string ans;
    int iter = x + 1;
    while( iter-- ) {
        if( iter & 1 )
            ans += '1', b -= 1;
        else
            ans += '0', a -= 1;
    }

    if( a == -1 || b == -1 ) {
        for(int i = 0; ans[ i ]; i += 1) {
            if( ans[ i ] == '0' )
                ans[ i ] = '1';
            else
                ans[ i ] = '0';
        }
        if( a == -1 )
            a = 0, b -= 1;
        else
            b = 0, a -= 1;
    }

    while( a-- )
        ans.insert( ans.begin() + 1, '0');
    cout << ans << endl;
    while( b-- )
        ans.insert( ans.begin() + 1, '1');
    cout << ans << endl;

    return 0;
}

/*#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int AX = 3e5+66;
char s[AX];
int main(){
	double x1 , y1 ;
	double x2 , y2 ;
	double x3 , y3 ;
	cin >> x1 >> y1;
	cin >> x2 >> y2;
	cin >> x3 >> y3;
	int a1 =
	return 0 ;
}*/

#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int AX = 1e3+6;
int res[AX];
int main(){
	int a , b , x ;
	cin >> a >> b >> x ;
	int one , zero    ;
	int one2 , zero2  ;
	zero = a;
	one = b ;

	zero2 = a;
	one2 = b ;

	string s ;
	string bb ;
	for( int i = 1 ; i <= x + 1 ; i++ ){
		if( i % 2 ) {s += '1'; bb += '0' ;}
		else {s += '0'; bb += '1';}
	}

	if( (x + 1) % 2 == 0 ){
		zero -= (x+1)/2;
		one -= (x+1)/2;
	}else{
		zero -= ( x ) / 2  ;
		one -= ( x  ) / 2 + 1 ;
	}

	int f = 1 ;
	int tot = 0 ;
	if( one < 0 || zero < 0 ) f = 0;
	if( s[x] == '1' && zero ) f = 0;

	if( f ){
		while( one-- ){
			res[tot++] = 1;
		}
		for( int i = 0 ; i < tot ; i++ ){
			cout << res[i] ;
		}
		cout << s ;
		while( zero-- ){
			cout << 0 ;
		}
	}else{
		tot = 0;
		if( (x + 1) % 2 == 0 ){
			one2 -= (x+1)/2;
			zero2 -= (x+1)/2;
		}else{
			one2 -=  x/2  ;
			zero2 -= x/2 + 1  ;
		}
		while( zero2-- ){
			cout << 0 ;
		}
		cout << bb ;
	}
	return 0 ;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    int a,b,x;
    cin>>a>>b>>x;
    int target=a+b;

    if(x%2!=0)
    {
        int k=1;
        for(int i=1;i<=target;i+=2)
        {
            if(a>1 || b>1)
            {

                if(k%2!=0)
                {
                    cout<<0<<0;
                    a-=2;
                }
                else if(k%2==0)
                {
                    cout<<1<<1;
                    b-=2;
                }
            }
            else
                break;
            k++;
        }

        while(a>0)
        {
            cout<<0;
            a--;
        }
        while(b>0)
        {
            cout<<1;
            b--;
        }
    }
    else
    {
        for(int i=1;i<=target;i++)
        {
            if(a>0 && b>0)
            {
                if(i%2!=0)
                {
                    cout<<0;
                    a--;
                }
                else if(i%2==0)
                {
                    cout<<1;
                    b--;
                }
            }
            else
                break;
        }

        while(a>0)
        {
            cout<<0;
            a--;
        }

        while(b>0)
        {
            cout<<1;
            b--;
        }
    }

}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626
const int mod = 1000000007;
#define fo1(i,a,b) for(int i=a;i<=b;i++)
#define deb(x) cout<<x<<"\n";
#define deB(x,y) cout<<x<<" "<<y<<"\n";
#define Deb(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define YES cout<<"YES\n";
#define Yes cout<<"Yes\n";
#define NO cout<<"NO\n";
#define No cout<<"No\n";
#define all(v) (v).begin(),(v).end()
#define mk(arr,n,type)  type *arr=new type[n];

int main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    int a, b, x;
    cin >> a >> b >> x;
    int n = a + b;
    string s = "";
    if (x == n - 1) {
        bool flag = true;
        for (int i = 0; i < n; i++) {
            if (flag) {
                s += '1';
                flag = false;
            } else {
                s += '0';
                flag = true;
            }
        }
    } else {
        if (x == 1) {
            for (int i = 0; i < b; i++) {
                s += '1';
            }
            for (int i = 0; i < a; i++) {
                s += '0';
            }
        } else {
            if (x % 2) {
                int y = x / 2;
                int o_c = y + 1;
                int z_c = y + 1;
                int z = b - o_c;
                for (int i = 0; i < z; i++) {
                    s[i] += '1';
                }
                bool flag = true;
                for (int i = 0; i < o_c + z_c; i++) {
                    if (flag) {
                        s += '1';
                        flag = false;
                    } else {
                        s += '0';
                        flag = true;
                    }
                }
                int z1 = a - o_c;
                for (int i = 0; i < z1; i++) {
                    s += '0';
                }
            } else {
                bool flag = true;
                for (int i = 0; i < x; i++) {
                    if (flag) {
                        s += '0';
                        flag = false;
                    } else {
                        s += '1';
                        flag = true;
                    }
                }
                int y = x / 2;
                b -= y;
                for (int i = 0; i < b; i++) {
                    s += '1';
                }
                a -= y;
                for (int i = 0; i < a; i++) {
                    s += '0';
                }
            }
        }
    }

    cout << s << endl;

    return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define fl(i,j,n) for(ll i=j;i<n;i++)
#define fle(i,j,n) for(ll i=j;i<=n;i++)
#define rfl(i,j) for(ll i=j;i>=0;i--)
#define pb(n) push_back(n)
#define mp make_pair
#define be(a) sort(a.begin(),a.end())
#define rbe(a) sort(a.rbegin(),a.rend())
#define vec vector<ll>
#define si(s) s.size()
#define print(x) cout<<#x<<"="<<x<<" "
#define S second
#define F first
#define boost ios_base::sync_with_stdio(false);cin.tie(0)
using namespace std;
const ll ma=1e9+7;
using namespace std;

int main()
{
    clock_t tStart=clock(); boost;
    ll a,b,x; cin>>a>>b>>x;

    if(a>=b)
    {	ll flag=1;
    	while(x>0)
    	{
    	if(x>0 && flag==1)
    		{x--;a--;flag=0;cout<<0;}
    	else if(x>0 && flag==0)
    		{x--;b--;flag=1;cout<<1;}
    	else if(x==0) break;
    	}
    	if(a>0){
    		while(a>0) {a--; cout<<0;}
		}
  		if(b>0)
		{	while(b>0)
			{	b--; cout<<1; }
		}
	}
	else
	{	ll flag=0;
		while(x>0)
    	{
     		if(x>0 && flag==0)
    			{x--;b--;flag=1;cout<<1;}
    		else if(x>0 && flag==1)
    			{x--;a--;flag=0;cout<<0;}
    		else if(x==0) break;
    	}
    	if(b>0)
		{	while(b>0)
			{	b--; cout<<1; }
		}
    	if(a>0){
    		while(a>0) {a--; cout<<0;}
		}
    }
    return 0;
}

//! Bismillahi-Rahamanirahim.
/** ========================================**
 ** @Author: Md. Abu Farhad ( RUET, CSE'15)
 ** @Category:
/** ========================================**/

#include<bits/stdc++.h>
#include<stdio.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;

#define ll                  long long
#define scl(n)              scanf("%lld",&n)
#define scc(c)	            scanf("%c",&c)
#define fr(i,n)             for (ll i=0;i<n;i++)
#define fr1(i,n)            for(ll i=1;i<=n;i++)
#define pfl(x)              printf("%lld\n",x)
#define pb                  push_back
#define debug               cout<<"I am here"<<endl;
#define pno                 cout<<"NO"<<endl
#define pys                 cout<<"YES"<<endl

int main()
{
    ll m,n,a,b,c,d,i,j,k,x,y,z,l,q,r;
    string s,s1, s2, s3, s4;

    ll cnt=0,ans=0,sum=0;

    cin>>a>>b>>x;
    n=a+b;
    if(x==1){ fr(i, a)s+='0' ;fr(i, b)s+='1' ; cout<<s<<endl;}
    else
    {
        while(x>0)
        {
            s+='0', a-- , x-- , cnt=1;
            if(!x)break;
            s+='1', b-- , x-- , cnt=-1;
            if(!x)break;
        }
        if(cnt==-1)
        {
            fr(i, b)s+='1';
            fr(i, a)s+='0';
            cout<<s<<endl;
        }
        else
        {
        fr(i, a)s+='0';
        fr(i, b)s+='1';
        cout<<s<<endl;
        }
    }

return 0;
}

///Before submit=>
///    *check for integer overflow,array bounds
///    *check for n=1

#include<bits/stdc++.h>
using namespace std;
#pragma region atcoder
/*#include <atcoder/modint>
using namespace atcoder;*/
#pragma endregion
#pragma region macros
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vl = vector<ll>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rrep(i, n) for(int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#pragma endregion
#pragma region debug for var, v, vv
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cout << endl;int cnt = 0;for(const auto& v : vv){cout << cnt << "th : "; view(v); cnt++;} cout << endl;}
#pragma endregion

const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001;
const int MAX = 100005;

//using mint = modint998244353;
//using mint = modint1000000007;
//These are for segment tree
/*int op(int a, int b){return max(a, b);}
int e(){return -1;}
bool f(int v){ return v < target;}
*/

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

template<class T>bool chmax(T &a, const T b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T b) { if (b<a) { a=b; return 1; } return 0; }
ll modpow(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a % mod;} a = a * a % mod; p >>= 1;} return ret;}

/*--------------------------------------------------------------------------------------------------------------------------------*/
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int a, b, x; cin >> a >> b >> x;
	if(x == 1){
		for(int i = 0; i < a; i++) cout << 0;
		for(int i = 0; i < b; i++) cout << 1;
	}
	else{
		while(x > 1){
			cout << "01";
			x -= 2;
			a--;
			b--;
		}
		while(true){
			if(a > 0){
				cout << 0;
				a--;
			}
			else{
				cout << 1;
				b--;
			}
			if(b == 0 && a == 0) break;
		}
	}
}

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

int main()
{
    int a, b, x, indx,cnt=0;
    cin>>a>>b>>x;
    if(a>1 && b>1)x--;
    indx=a;

    string str="";
    cout<<str<<endl;
    for(int i=0; i<a; i++)str+="0";
    for(int i=0; i<b; i++)str+="1a";
    int n=str.size();

    for(int i=0; i<n; i++)
    {
        if(x==0)break;
        if(x==1)
        {

            swap(str[i], str[n-1]);
            x--;
        }
        else
        {
            for(int j=indx; j<n; j++)
            {
                if(str[j]=='a')
                {
                    swap(str[i], str[j]);
                    x=x-2;
                    indx=j+1;
                    break;
                }
            }
        }
    }
    for(int i=0; i<n; i++)
    {
        if(str[i]!='a')cout<<str[i];
    }

    return 0;
}

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

#define open freopen("in","r",stdin);
#define pb push_back
#define sz(a_) (int)a_.size()
#define EPS 1e-10
#define RESPEITA_O_PAI 0
#define inf 0x3f3f3f3f

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;

#define first F
#define second S

int main(){
	cout << setprecision(20) << fixed;
	cin.sync_with_stdio(0),cin.tie(0);

	int a,b,x;
	cin>>a>>b>>x;

	if(x == 2){
		string z = "0",u = "1";
		if(a < b) swap(z,u),swap(a,b);
		for(int i = 0 ; i < a/2 + a%2 ; ++i)	cout << z;
		for(int i = 0 ; i < b ; ++i)					cout << u;
		for(int i = 0 ; i < a/2 ; ++i)				cout << z;
		cout << endl;
		return 0;
	}

	deque<string> ans;
	if(a>b){
		ans.push_back("0");
		ans.push_back("1");
		a--;b--;
		for(int i = 0 ; i < x-1 ; ++i) ans.push_back((i%2 == 0? "0":"1")),i%2==0?a--:b--;
		for(int i = 0 ; i < a ; ++i) ans.push_front("0");
		if(ans.back() == "1")
		for(int i = 0 ; i < b ; ++i) ans.push_back("1");
		else{
				ans.pop_back();
				for(int i = 0 ; i < b ; ++i) ans.push_back("1");
				ans.push_back("0");
		}
	}
	else{
		ans.push_back("1");
		ans.push_back("0");
		a--;
		b--;
		for(int i = 0 ; i < x-1 ; ++i) ans.push_back((i%2 == 0? "1":"0")),i%2==0?b--:a--;
		for(int i = 0 ; i < a ; ++i) ans.push_front("1");
		if(ans.back() == "0")
			for(int i = 0 ; i < b ; ++i) ans.push_back("0");
		else{
				ans.pop_back();
				for(int i = 0 ; i < b ; ++i) ans.push_back("0");
				ans.push_back("1");
		}
	}

	for(auto i : ans) cout << i;
	cout << endl;
	return 0;
}

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

int main()
{
    int a,b,x;
    bool flag=false;
    cin>>a>>b>>x;
    if(a<b)
        ;
    else
    {
        flag=true;
    }
    int count=x/2,count1=x%2;
    if(count1)
    {
//奇数代表有一头是1
        for(int i=0; i<count; ++i)
        {
            putchar('0');
            putchar('1');
        }
        for(int i=0; i<a-count; ++i)
        {
            putchar('0');
        }
        for(int i=0; i<b-count; ++i)
        {
            putchar('1');
        }
        printf("\n");
    }
    else
    {
//向中间插入
        if(count==a||count==b)
        {
            for(int i=0; i<min(a,b); ++i)
            {
                if(flag)
                {
                    putchar('0');
                    putchar('1');
                }
                else
                {
                    putchar('1');
                    putchar('0');
                }
            }
            for(int i=0; i<max(a,b)-min(a,b); ++i)
            {
                if(flag)
                {
                    putchar('0');
                }
                else
                    putchar('1');
            }
            printf("\n");
        }
        else
        {
            //头上两边
            if(flag)
            {
                putchar('0');
                for(int i=0; i<count-1; ++i)
                {
                    putchar('1');
                    putchar('0');
                }

                for(int i=0; i<b-count; ++i)
                {
                    putchar('1');
                }
                for(int i=0; i<a-count+1; ++i)
                {
                    putchar('0');
                }

            }
            else
            {
                putchar('1');
                for(int i=0; i<count-1; ++i)
                {
                    putchar('0');
                    putchar('1');
                }
                for(int i=0; i<a-count+1; ++i)
                {
                    putchar('0');
                }
                for(int i=0; i<b-count+1; ++i)
                {
                    putchar('1');
                }

            }
            printf("\n");
        }

    }

    return 0;
}

#include <bits/stdc++.h>
#define ll long long int
#define fastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define nl "\n"
#define ff first
#define ss second
#define pb push_back
#define fl(i,a,b,c) for(int i=a;i<b;i+=c)
#define rl(i,a,b,c) for(int i=a;i>b;i-=c)
#define sn(a,l) fl(i,0,l,1) cin>>a[i];
#define pr(a,l) fl(i,0,l,1) cout<<a[i]<<' ';
#define all(a) a.begin(),a.end()
#define test() int t; cin>>t; while(t--)
const int INF = 1e9 + 1;
const int MOD = 1e9 + 7;
const int N = 200000;
using namespace std;

char ch1,ch2;
int a,b,x,na,nb;
string ans;

bool check()
{
    fl(i,0,x,1)
    {
        if(i & 1)
        {
            ans += ch1;
            na--;
        }
        else
        {
            ans += ch2;
            nb--;
        }
    }
    if(na<0 || nb<0)
        return false;
    if(ch1 == '0')
    {
    	if(nb && ans[x] == '0')
    		return false;
    	ans = string(na,'0') + ans + string(nb,'1');
    }
    else
    	ans = string(nb,'1') + ans + string(na,'0');
    return true;
}

void solve()
{
    cin>>a>>b>>x;
    ans.clear();
    ans += "0";
    ch1 = '0';
    ch2 = '1';
    na = a - 1;
    nb = b;
    if(check())
    {
        cout<<ans<<nl;
        return;
    }
    ans.clear();
    ans += "1";
    ch1 = '1';
    ch2 = '0';
    na = a;
    nb = b - 1;
    check();
    cout<<ans;
    cout<<nl;
}

int main()
{
    fastIO
    //test()
    solve();
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

#include <set>
#include <map>

using namespace std;

typedef long long ll;

const ll inf = 1e18;

int main() {
	ll a, b, c; cin >> a >> b >> c;

	ll cnt0 = 0, cnt1 = 0;

	string s = "";

	if(c % 2 == 0) {
	for(ll i = 0; i < c/2; i++) {
		s+="01";
		cnt0++;
		cnt1++;
	}

	for(ll i = 0; i < a - cnt0; i++)
			s.insert(s.end(),'0');

	for(ll i = 0; i < b - cnt1 ;i++)
		s.insert(s.begin(),'1');

	cout << s;
	return 0;

	} else {
		for(ll i = 0; i < c/2; i++) {
		s+="01";
		cnt0++;
		cnt1++;
	}
		if(s.size()>0) {
		if(s[s.size()-1]=='0'){
			s+='1';
			cnt1++;

			for(ll i = 0; i < a - cnt0; i++)
			s.insert(s.begin(),'0');

	for(ll i = 0; i < b - cnt1; i++)
		s.insert(s.end(),'1');

	cout << s;
	return 0;

		} else {
			s+='0';
			cnt0++;

			for(ll i = 0; i < a - cnt1; i++)
			s.insert(s.begin(),'1');

	for(ll i = 0; i < b - cnt0; i++)
		s.insert(s.end(),'0');

	cout << s;
	return 0;
		}
		} else {
			s+="01";
		cnt0++;
		cnt1++;
		}

	}
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mod7 1000000007
#define MX 1000007
const double PI=2*acos(0.0);
int n,m,a,b,c,k,x,y,z,ans=0,total=0;
int arr[20000]={0};

int main(void){
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  #ifdef DEBUG
    freopen("input.txt","r",stdin);
  #endif
    cin>>a>>b>>x;
  n=(a+b);
//  for(int i=0;i<a;i++)arr[i]=0;
//  for(int i=a;i<n;i++)arr[i]=1;
  vector<int> v;
  v.pb(0);
  v.pb(1);
  x--;
  while(x>0){
    if(v[v.size()-1]==1){
      v.pb(0);
    }else{
      v.pb(1);
    }
    x--;
  }
  for(int i=0;i<v.size();i++){
    if(v[i]==0){
      a--;
    }else{
      b--;
    }
  }
  for(int i=0;i<v.size();i++){
    if(v[i]==1 && b>0){
      while(b--){
        cout<<1;
      }
      cout<<v[i];
    }else if(v[i]==0 && a>0){
      while(a--){
        cout<<0;
      }
      cout<<v[i];
    }else{
      cout<<v[i];
    }
  }
  return 0;
}

// BinaryConstructing.cpp

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <unordered_map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <deque>
#include <bitset>
#include <climits>
#include <cstdio>
#include <list>
#include <iomanip>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long int
void solve()
{
	int z, o, idx;
	cin >> z >> o >> idx;
	int flag = 1;
	string temp = "01";

	if (z >= o)
	{

	} else
	{
		temp = "10";
		flag = 0;
	}

	int i = 1;
	int to = 1;
	int tz = 1;

	while (i < idx)
	{

		if (flag == 1)
		{
			temp += "0";

			tz++;
		} else
		{
			temp += "1";

			to++;
		}
		flag = 1 - flag;
		i++;

	}
	to = o - to;
	tz = z - tz;
	string aageki = "";
	while (tz > 0)
	{
		aageki += "0";
		tz--;
	}
	aageki += temp;

	while (to > 0)
	{
		aageki += "1";
		to--;
	}

	cout << aageki << endl;

	// cout << temp << endl;

}
int main() {
	fastIO

	solve();
	return 0;
}

#include <iostream>
using namespace std;
int a,b,x;
int main(){
    cin >> a >> b >> x;
    for(int i=0; i<x/2;i++){
        cout << "01";
        a--,b--;
    }
    if((x%2)){
        while(a--) cout << '0';
        while(b--) cout << '1';
    }
    else{
        while(a--) cout << '1';
        while(b--) cout << '0';
    }

}

#include <bits/stdc++.h>

using namespace std;

int main(){
  int a = 0, b = 0, x = 0;
  cin >> a  >> b >> x;
  string res = "";

  bool inside = true;
    if(a >= b){

    while(x > 0){
        if(inside){
          res += "0";
          a--;
        }
        else{
          res += "1";
          b--;
        }
        inside = !inside;
        x--;
      }
    }else{
      while(x > 0){
        if(inside){
          res += "0";
          b--;
        }
        else{
          res += "1";
          a--;
        }
          inside = !inside;
        x--;
      }
    }
  if(res[res.size() - 1] == '0'){
    for(int i = 0; i < a; i++)
      res += "0";

    for(int q = 0; q < b; q++)
      res += "1";
  }else{
      for(int i = 0; i < b; i++)
      res += "1";

    for(int q = 0; q < a; q++)
      res += "0";

  }
  cout << res << "\n";

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int a, b, x, k, n, m, p;
string str;

main() {
	cin>>a>>b>>x;
	if ( b == 1 && x >= 2 ) {
		str.push_back('0');
		str.push_back('1');
		str.push_back('0');
	}
	else {
		for ( int i = 0; i <= x; i ++ ) {
			if ( str[ str.size() - 1 ] != '1' ) {
				str.push_back('1');
			}
			else if ( str[ str.size() - 1 ] != '0' ) {
				str.push_back('0');
			}
		}
	}
	for ( int i = 0; i < str.size(); i ++ ) {
		if ( str[i] == '0' ) {
			k++;
			n = i;
		}
		else {
			p++;
			m = i;
		}
	}
	for ( int i = 0; i < a-k; i ++ ) {
		str.insert(n+i,"0");
	}
	for ( int i = 0; i < b-p; i ++ ) {
		str.insert(m+i,"1");
	}
	cout<<str;
}

#include<stdio.h>
int main()
{int a,b,x;
scanf("%d%d%d",&a,&b,&x);
int y=x/2;
if(x%2==1)
{for(int i=0;i<y;i++)
printf("01");
for(int i=0;i<a-y;i++)
	printf("0");
for(int i=0;i<b-y;i++)
	printf("1");}
else
{for(int i=0;i<y;i++)
printf("01");
for(int i=0;i<b-y;i++)
	printf("1");
for(int i=0;i<a-y;i++)
	printf("0");}}

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

#define loop() int t;cin>>t;while(t--)
#define ll long long
#define pll pair<ll,ll>
#define vll vector<ll>
#define vpll vector<pll>
#define um unordered_map<ll,ll>
#define mll map<ll,ll>
#define pq priority_queue<ll>
#define pql priority_queue<ll,vector<ll>,greater<ll>>

#define fr(i,b) for(i=0;i<b;i++)
#define fri(i,a,b) for(i=a;i<b;i++)

#define il(a) long long a;cin>>a;
#define il2(a,b) long long a,b;cin>>a>>b;
#define il3(a,b,c) long long a,b,c;cin>>a>>b>>c;
#define il4(a,b,c,d) long long a,b,c,d;cin>>a>>b>>c>>d;
#define il5(a,b,c,d,e) long long a,b,c,d,e;cin>>a>>b>>c>>d>>e;
#define id(a) double a;cin>>a;
#define id2(a,b) double a,b;cin>>a>>b;
#define id3(a,b,c) double a,b,c;cin>>a>>b>>c;
#define id4(a,b,c,d) double a,b,c,d;cin>>a>>b>>c>>d;
#define id5(a,b,c,d,e) double a,b,c,d,e;cin>>a>>b>>c>>d>>e;
#define ia(a,n) vll a(n);for( i=0;i<n;i++) cin>>a[i];
#define ian(a,n) ll n;cin>>n;vl a(n+3);for(ll i=0;i<n;++i)cin>>a[i];
#define ia2(a,m,n) ll m,n;cin>>m>>n;ll a[m+4][n+4];for(ll i=0;i<m;++i)for(ll j=0;j<n;++j)cin>>a[i][j];
#define is(s,n) string s;cin>>s;ll n;n=s.size();

#define pa(a,n) for(ll i=0;i<n;++i) cout<<a[i]<<" ";cout<<endl;
#define pa2(a,m,n) for(ll i=0;i<m;++i){for(ll j=0;j<n;++j)cout<<a[i][j]<<" ";cout<<endl;}
#define pd(z,k) cout<<fixed<<setprecision(k)<<z<<endl;

#define pb push_back
#define mp make_pair
#define all(c)    (c).begin(),(c).end()
#define allr(c)   (c).rbegin(),(c).rend()
#define ST(c)    sort((c).begin(),(c).end())
#define lb(c,x) lower_bound(all(c),x)-c.begin()
#define up(c,x) upper_bound(all(c),x)-c.begin()
#define F first
#define S second
#define mem(x,val) memset(x,val,sizeof(x))
#define v2d(type,v,m,n,val) vector<vector<type>>v(m,vector<type>(n,val));

#define spresent(c,x)    ((c).find(x) != (c).end())
#define present(c,x)   (find(all(c),x) != (c).end())
#define count1(a)    __builtin_popcountll(a)
#define power2(a)      (a)&(a-1)==0
#define sz(a)           (ll)((a).size())
#define MOD 10000009
const long long mod = 1e9+7;
const long long M = 1e6+5;
const double pi=acos(-1.);
const long long dx[]={1,0,-1,0,-1,-1,1,1};
const long long dy[]={0,1,0,-1,1,-1,1,-1};

long long a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,t,u,v,w,x,y,z,maxi,mini,ans,mid,low,high,sum,total;
string s1,s2;
/*
int cmp(pll a,pll b)
{
	if(a.first < b.first)
	return 1;
	else if(a.first==b.first)
	{
		if(a.second > b.second)
		return 1;
		return 0;
	}
	return 0;
}*/

int main()
{

	cin>>a>>b>>x;
	k=a+b;
	string s;

	if(a>b)
	s="0",a--;
	else
	s="1";b--;

	i=0;
	while(i<k-2)
	{
		i++;
		if(x>1)
		{
			if(s[i-1]=='0')
			s+="1",b--;
			else
			s+="0",a--;
			x--;
		}
		else if(s[i-1]=='0' && a>0)
		s+="0",a--;
		else if(s[i-1]=='1' && b>0)
		s+="1",b--;
		else if(s[i-1]=='0' )
		{
			s+="1";
			b--;
			x--;
		}
		else if(s[i-1]=='1')
		{
			s+="0";
			a--;
			x--;
		}

	}

	i++;

//	cout<<i<<endl;
	if(x==1)
	if(s[i-1]=='0')
	s+="1",b--;
	else
	s+="0",a--;

    else
    {
    	if(a>0)
    	s+="0",a--;
    	else
    	s+="1",b--;
	}
	//cout<<a<<" "<<b<<" "<<x<<endl;
	cout<<s;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 3e5 + 5;
vector<int> v[N];
int main()
{
    ios_base ::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    int a, b, k, flag2 = 0;
    cin >> a >> b >> k;
    int x = 1;
    if(a < b){
        flag2 = 1;
        swap(a, b);
    }
    for(int i = 0; i <= k; i++){
        v[i].push_back(x);
        if(x) a--;
        else b--;
        x ^= 1;
    }
    int flag = !a, flag1 = !b;
    for(int i = 0; i <= k; i++){
        if(flag && flag1)break;
        if(v[i][0] == 1){
            if(flag2){
                while(b--)
                    v[i].push_back(0);
                flag = 1;
            }
            else{
                while(a--)
                v[i].push_back(1);
                flag = 1;
            }
        }
        if(v[i][0] == 0){
            if(flag2){
                while(a--)
                v[i].push_back(1);
            }
            else{
                while(b--)
                v[i].push_back(0);
            }
            flag1 = 1;
        }
    }
    for(int i = 0; i <= k; i++){
        for(auto ii : v[i])
            if(flag2)cout << (1 - ii);
        else cout << ii;
    }
return 0;
}

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

#define Aloveg ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long int

int main() {
    Aloveg

    int a, g, ag;
    cin >> a >> g >> ag;
    string ans = a >= g ? "01" : "10";
    ag -= 1; a -= 1; g -= 1;
    int ch = a < g;
    while(ag) {
        ans += ('0'+ ch);
        ag -= 1;
        ch ? g -= 1 : a -= 1;
        ch ^= 1;
    }
    while(a) {
        ans = "0" + ans;
        a -= 1;
    }
    while(g) {
        ans += "1";
        g -= 1;
    }
    cout << ans << "\n";

    return 0;
}

#include <stdio.h>
#include <string>
#include <iostream>
using namespace std;
int x, a, b;

string s="1", ss="0";

int main()
{
    scanf("%d%d%d",&a,&b,&x);
    int aa=a, bb=b-1;
    int i;
    for (i=0; i<x; i++)
    {
        if (i&1) s+="1", bb--;
        else s+="0", aa--;
    }
    while (bb>0) s="1"+s, bb--, i++;
    if (s[i]!='0') i--;
    while (aa>0) s.insert(i,"0"), aa--;

    aa=a-1, bb=b;
    for (i=0; i<x; i++)
    {
        if (i&1) ss+="0", aa--;
        else ss+="1", bb--;
    }
    while (aa>0) ss="0"+ss, aa--, i++;
    if (ss[i]!='1') i--;
    while (bb>0) ss.insert(i-1,"1"), bb--;

    int c[2]={0,0};
    for (int i=0; i<a+b; i++)
        c[s[i]-'0']++;
    if (c[0]!=a || c[1]!=b) printf("%s\n",ss.c_str());
    else printf("%s\n",s.c_str());
    return 0;
}

#pragma comment(linker, "/STACK:268435456")
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <iomanip>
#include <stack>
#include <string>
#include <set>
#include <queue>
#include <functional>
#include <deque>
#include <cmath>
#include <sstream>
#include <bitset>
#define what_is(x) cerr << #x << " = " << x << endl;

using namespace std;

#define forn(i,n) for(int i = 0; i < n; i++)
#define forr(i,n) for(int i = n-1; i >= 0; i++)
#define ALL(x) x.begin(),x.end()
#define mp make_pair
#define sf(x,y) scanf("%" x,&y)
#define pf(x,y) printf("%" x,y)
#define sqr(x) (x)*(x)

typedef long long int64;
typedef long double ld;
#define int int64

typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;
typedef pair<double, double> pdd;
typedef vector<int> vint;
typedef vector<int64> vint64;
typedef vector<double> vd;

template <typename T1, typename T2> istream& operator >> (istream& in, pair<T1, T2>& t) { return in >> t.first >> t.second; }
template <typename T1, typename T2> ostream& operator << (ostream& out, pair<T1, T2>& t) { return out << t.first << " " << t.second << endl; }
template <typename T> istream& operator >> (istream& in, vector<T>& t) { for (int i = 0; i < t.size(); i++) in >> t[i]; return in; }
template <typename T> ostream& operator << (ostream& out, vector<T>& t) { for (int i = 0; i < t.size(); i++) out << t[i] << " "; return out; }

string tryi(int a, int b, int x, int i) {
	int n = a + b;
	string s(n, '0');
	int l = 0;
	for (; i < n; i += 2) {
		s[i] = '1';
		l++;
		if (i == 0 || i == n - 1) x -= 1;
		else x -= 2;
		if (x <= 0) break;
	}
	if (x != 0) return "";
	++i;
	for (; i < n && l != b; ++i) {
		s[i] = '1'; l++;
	}
	if (l == b) return s;
	return "";
}

signed main()
{
	int rrrr = 1e5;
#ifdef _SANYA
	freopen("abc.in", "r", stdin);
	freopen("abc.out", "w", stdout);
	rrrr = 150;
#else
#define T "rings"
	//freopen(T ".in", "r", stdin);
	//freopen(T ".out", "w", stdout);
#endif
	int a, b, x; cin >> a >> b >> x;
	string f = tryi(a, b, x, 0);
	string s = tryi(a, b, x, 1);
	if (f == "") cout << s;
	else cout << f;
	return 0;
}

#include<bits/stdc++.h>
#define int long long
#define maxn 1000005
using namespace std;
inline char get(){
	static char buf[30000],*p1=buf,*p2=buf;
	return p1==p2 && (p2=(p1=buf)+fread(buf,1,30000,stdin),p1==p2)?EOF:*p1++;
}
inline int read(){
	register char c=getchar();register int f=1,_=0;
	while(c>'9' || c<'0')f=(c=='-')?-1:1,c=getchar();
	while(c<='9' && c>='0')_=(_<<3)+(_<<1)+(c^48),c=getchar();
	return _*f;
}
int a,b,x;
signed main(){
	//freopen("1.txt","r",stdin);
	a=read(),b=read(),x=read();
	int tota=a,totb=b;
	if(a<=b)for(register int i=1;i<=x/2;i++)printf("10"),a--,b--;
	else for(register int i=1;i<=x/2;i++)printf("01"),a--,b--;
	if(a<=b){
		for(register int i=1;i<=a;i++)printf("1");
		for(register int i=1;i<=b;i++)printf("0");
	}
	else{
		for(register int i=1;i<=b;i++)printf("0");
		for(register int i=1;i<=a;i++)printf("1");
	}
	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
using namespace std;
typedef vector<int> vi ;
typedef long long ll;
#define pb push_back
#define all(x) (x).begin() , (x).end()
const long long N = 2e5+5,MOD=1e9+7 , MX=1e9+9;
int n , a , b , t , x ,y , xx , yy ,mx , cnt ;
ll sum ;
vector<int> v ;
map<int , int> freq;
string s,tmp;
int main(){
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout) ;
    scanf("%d%d%d",&a,&b,&x);
    cnt=a+b;
    int i=0 ;
    while(x--){
      if(i%2){
        cout<<1;
        b-- ;
      }
      else{
        cout<<0;
        a--;
      }
       i++;
    }
    while(a--)
      cout<<0;
    while(b--)
      cout<<1;
  return 0 ;
}

#include<bits/stdc++.h>
#define pf printf
#define sc scanf
#define INF (1<<30)-1+(1<<30)
typedef long long ll;
using namespace std;
#define fast()              ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
template<class T1> void deb(T1 e1)
{
	cout << e1 << endl;
}
template<class T1, class T2> void deb(T1 e1, T2 e2)
{
	cout << e1 << " " << e2 << endl;
}
template<class T1, class T2, class T3> void deb(T1 e1, T2 e2, T3 e3)
{
	cout << e1 << " " << e2 << " " << e3 << endl;
}
#define bug(x) cerr<<#x<<" is "<<x<<endl
#define all(x) (x).begin(), (x).end()
#define unik(v) (v).erase(unique(all(v)), v.end())
const ll MOD = 1000000007;

string s = "";
int main()
{
	fast();
	ll t, n, a, x, y, b, sum = 0, x1 = 0, x2 = 0, mx = -1, u = 1, mn = 1e9;
	cin >> a >> b >> x;
	sum = a + b;
	if (a > b) {for (int i = 0; i < a; i++) s += '0'; a = 0;}
	else {for (int i = 0; i < b; i++) s += '1'; b = 0;}
	while (b > 0 && x > 1)
		{
			int f = s.find("00");
			if (f < 0 || f >= s.size()) break;
			s.insert(s.begin() + f + 1, '1');
			b--;
			x -= 2;
		}
	while (a > 0 && x > 1)
		{
			int f = s.find("11");
			if (f < 0 || f >= s.size()) break;
			s.insert(s.begin() + f + 1, '0');
			a--;
			x -= 2;
		}
	while (b--) s += '1';
	while (a--) s += '0';
	deb(s);
}

#include <stdio.h>
#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;
int x[2000];
int main()
{
    int n,m,p;
    scanf("%d%d%d\n",&n,&m,&p);
    memset(x,0,sizeof(x));
    int sum=n+m,a1=p,a2=m;
    x[1]=1;
    a2=a2-1;
    for (int i=2;i<sum;)
    {
    	if (a1>=2 && a2>0)
    	{
    		if (x[i-1]==1 && x[i]==0)
    		{
    			i=i+1;
    			x[i]=1;
    			a1=a1-2;
    			a2=a2-1;
    			i=i+1;
    		}
    	}
    	else
    		if (a1==1 && a2==1)
    		{
    			x[i]=1;
    			a1=a1-1;
    			a2=a2-1;
    			break;
    		}
        else
        if (a1==2 && a2==0)
        {
        	for (int i=sum;i>=1;i--)
        	{
        		x[i]=x[i-1];
        	}
        	break;
        }
        else
        break;
    }
    for (int i=1;i<=sum;i++)
    {
    	printf("%d",x[i]);
    }
    printf("\n");
	return 0;
}

#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int a[5008],sum[5008];
int main()
{
    int n,lenth;
    double max_ave=0;
    scanf("%d%d",&n,&lenth);
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
    }
    sum[0]=0;
    for(int i=1;i<=n;i++)
        sum[i]=sum[i-1]+a[i];
    for(int j=lenth;j<=n;j++)
    {
        for(int i=1;i+j<=n+1;i++)
        {
            max_ave=max(max_ave,double(sum[i+j-1]-sum[i-1])/j);
        }
    }
    printf("%.15lf",max_ave);
    return 0;

}

#include<iostream>
#include<algorithm>
#include<fstream>
#include<utility>
#include<cstring>
#include<string>
#include<vector>
#include<math.h>
#include<cmath>
#include<cstdio>
#include<stdio.h>
#include<queue>
#include<map>
#include<set>

using namespace std;

int main() {

    int a,b,x;
    cin>>a>>b>>x;
    int n = a+b;
    bool ab = 0;
    string s = "01";

    a--;
    b--;
    x--;
    while(x>0){
        if(ab == 1){
            s = s+"1";
            b--;
        }else{
            s = s+"0";
            a--;
        }
        ab = !ab;
        x--;
    }
    while(a>0){
        s = "0"+s;
        a--;
    }

    while(b>0){
        if(s[s.length() - 1] == '0'){
            s.insert(s.length() - 1, 1, '1');
            b--;
        }else{
            s = s+"1";
            b--;
        }
    }
    cout<<s<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define debug(x)        cout<<#x<<" :"<<x<<endl;
#define ff              first
#define ss              second
#define ar              array
#define int             long long
#define ld              long double
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define f(i,n)          for(int i=0;i<n;i++)
#define MOD             1000000007
#define pi              3.14159265
#define umii            unordered_map<int,int>
#define umci            unordered_map<char,int>
#define umsi            unordered_map<string,int>
#define sz(s)           (int)s.size()
void k_007()
{
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#ifndef ONLINE_JUDGE
  freopen("ip1.txt", "r", stdin);
  freopen("op1.txt", "w", stdout);
#endif
}

bool sortbysec(const pair<int, int> &a, const pair<int, int> &b)
{
  return (a.second < b.second);
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int prime(int n) {
  int flag = 1;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {flag = 0; break;}
  }
  return flag;
}
int power(int x, int y)
{
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return ((power(x, y / 2) % MOD) * ( power(x, y / 2) % MOD)) % MOD;
  else
    return ((x % MOD) * (power(x, y / 2) % MOD) * (power(x, y / 2) % MOD)) % MOD;
}
int lcm(int a, int b)
{
  return (a * b) / gcd(a, b);
}
// int JUDGE_ONLINE = 1;
// if (fopen("ip1.txt", "r")) {
//  JUDGE_ONLINE = 0;
//  assert(freopen("ip1.txt", "r", stdin));
//  assert(freopen("op1.txt", "w", stdout));
// }

// if (!JUDGE_ONLINE) {
//  cout << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
// }

int32_t main()
{
  k_007();
  int a, b, x;
  cin >> a >> b >> x;
  string ans = "10";
  --x, --a, --b;
  int op = 1;
  while (x >= 2)
  {
    if (op)
      ans = '0' + ans + '1';
    else
      ans = '1' + ans + '0';
    op = op ^ 1;
    x -= 2;
    --a;
    --b;
  }
  // debug(ans);
  if (x == 1)
  {
    if (a > 0 && ans[0] == '1')
    {
      ans = '0' + ans;
      --a;
    }
    else if (a > 0 && ans[sz(ans) - 1] == '1')
    {
      ans = ans + '0';
      --a;
    }
    else if (b > 0 && ans[0] == '0')
    {
      ans = '1' + ans;
      --b;
    }
    else if (b > 0 && ans[sz(ans) - 1] == '0')
    {
      ans = ans + '1';
      --b;
    }
    x--;
  }

  bool la = false;
  bool fi = false;
  if (ans[0] == '0') fi = true;
  else if (ans[sz(ans) - 1] == '0') la = true;
  if(!fi && !la)
  {
    ++x;
    ++b;
    ans[sz(ans)-1]='0';
    la=true;
  }
  while (a--)
  {
    if (fi)
    {
      ans = '0' + ans;
    }
    else if (la)
    {
      ans = ans + '0';
    }
  }
  if(x == 1)
  {
    --b;
    --x;
    ans = ans + '1';
  }

  fi = false;
  la = false;
  if (ans[0] == '1') fi = true;
  else if (ans[sz(ans) - 1] == '1') la = true;

  if(!fi && !la)
  {
    ++a;
    ++x;
    ans[sz(ans)]='1';
    la=true;
  }
  while (b--)
  {
    if (fi)
    {
      ans = '1' + ans;
    }
    else if (la)
    {
      ans = ans + '1';
    }
  }

  if(x > 0)
  {
    --b;
    --x;
    ans = ans + '0';
  }
  cout << ans << endl;

}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back

// g++ -std=c++17 -Wshadow -Wall -g -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG -o

int main(){
 int a,b,x;
 cin>>a>>b>>x;
 swap(a,b);
 int cnt=1;
 string s="1";
 a--;
 while(cnt<=x){
  if(cnt&1 && b){
   s+='0';
   b--;
  }
  else if(cnt%2==0 && a){
   s+='1';
   a--;
  }
  cnt++;
 }
//  cout<<s<<" "<<a<<" "<<b<<"\n";
 if(a){
  reverse(s.begin(),s.end());
  while(a){
   s+='1';
   a--;
  }
 }
 if(b && x&1){
  if(s[0]=='0')reverse(s.begin(),s.end());
  while(b){
   s+='0';
   b--;
  }
 }
 else if(b && x%2==0){
  if(s[s.length()-2]=='1')reverse(s.begin(),s.end());
  s.back()='0';
  b--;
  while(b){
   s+=s+'0';
   b--;
  }
  s+='1';
 }
 cout<<s<<"\n";
 return 0;
}

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

typedef long long ll;
typedef vector<int > vi;
typedef pair<int, int> pi;
typedef vector<pi> vp;

#define PB push_back
#define MP make_pair
#define F first
#define S second
#define MOD 1000000007
#define EPS 1e-9
#define REP(i,a,b) for(ll i=a;i<=b;i++)

int main(){

	int a,b,x;
	cin>>a>>b>>x;

	string s="";

	int flag=0;

	if(a>b){
		for(int i=0;i<a+b;i++)
			s+='1';
		flag=1;
	}
	else{
		for(int i=0;i<a+b;i++)
		s+='0';
	}

	int n=a+b;

	if(flag){
		if(x==1){
			for(int i=0;i<b;i++){
				s[i]='0';
			}
		}
		else if(x==2 && b>1){
			for(int i=0;i<b-1;i++){
				s[i]='0';
			}
			s[n-1]='0';
		}
		else{
			int temp=x,bn=b;
			for(int i=0;i<n-2 && temp>1;i++){
				if(s[i]=='1' && s[i+1]=='1'&&s [i+2]=='1'){
					s[i+1]='0';
					temp-=2;
					bn--;
				}
			}
			if(temp==1){
				for(int i=n-1;i>=0 && bn>0;i--){
					s[i]='0';
					bn--;
				}
			}
		}
	}

	else{
		if(x==1){
			for(int i=0;i<a;i++){
				s[i]='1';
			}
		}
		else if(x==2 && a>1){
			for(int i=0;i<a-1;i++){
				s[i]='1';
			}
			s[n-1]='1';
		}
		else{
			int temp=x,an=a;
			for(int i=0;i<n-2 && temp>1;i++){
				if(s[i]=='0'&&s[i+1]=='0'&&s[i+2]=='0'){
					s[i+1]='1';
					temp-=2;
					an--;
				}
			}
			if(temp==1){
				for(int i=n-1;i>=0 && an>0;i--){
					s[i]='1';
					an--;
				}
			}
		}
	}

	cout<<s;

	return 0;
}

#include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main()
{
    int a, b, x;
    cin >> a >> b >> x;
    string s;
    if (a>=b){
        s.insert(0, "0");
        a--;
        int i=0;
        while (x-1){
            i++;
            if (i%2) s.push_back('1'), --b;
            else s.push_back('0'), a--;
            x--;
        }
        for (int i=0; i<a; ++i) s.push_back('0');
        for (int i=0; i<b; ++i) s.push_back('1');
    }
    else{
        s.insert(0, "1");
        b--;
        int i=0;
        while(x-1){
            i++;
            if (i%2) s.push_back('1'), b--;
            else s.push_back('0'), a--;
            x--;
        }
        for (int i=0; i<a; ++i) s.push_back('0');
        for (int i=0; i<b; ++i) s.push_back('1');
    }
    cout << s << endl;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define S scanf
#define P printf
#define G getline
#define SZ size()
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define FI first
#define SE second
#define PI acos(-1)
#define PS push
#define PP pop()
#define PSF push_front
#define PSB push_back
#define PPF pop_front()
#define PPB pop_back()
#define MP make_pair
#define LL long long int
#define ULL unsigned long long int
#define PII pair<int,int>
#define PSI pair<string,int>
#define PIS pair<int,string>
#define PLI pair<long long int,int>
#define PLL pair<long long int,long long int>
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define MLI map<long long int,int>
#define FAST() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

//int dx[]={-1,1,0,0};
//int dy[]={0,0,-1,1};
//int dx[]= {-1,0,1,-1,1,-1,0,1};
//int dy[]= {1,1,1,0,0,-1,-1,-1};

int main()
{
    FAST();

//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);

    int i,a,b,x;
    cin >> a >> b >> x;
    string s="01";
    a--,b--;
    for(i=1; i<x  &&  a  &&  b; i++)
    {
        if(i & 1)
            s+='0',a--;
        else
            s+='1',b--;
    }
    x-=(s.SZ-1);
    if(x)
    {
        if(a)
        {
            cout << s;
            while(a--)
                cout << '0';
        }
        else
        {
            if(s[s.SZ-1] == '0')
            {
                cout << s;
                while(b--)
                    cout << '1';
            }
            else
            {
                while(b--)
                    cout << '1';
                cout << s;
            }
        }
    }
    else
    {
        if(s[s.SZ-1] == '0')
        {
            s[s.SZ-1]='1';
            b--;
            while(a--)
                cout << '0';
            cout << s;
            while(b--)
                cout << '1';
            cout << '0';
        }
        else
        {
            while(a--)
                cout << '0';
            cout << s;
            while(b--)
                cout << '1';
        }
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
const ll d=1e9+7;
#define pb push_back
#define mp make_pair
#define sz(a) (ll)a.size()
#define inst(a) insert(a)
#define f first
#define s second
#define lpi(i,start,end,val) for(i=start;i<=end;i+=val)
#define lpr(i,start,end,val) for(i=start;i>=end;i-=val)
#define lp(i,n) for(i=0;i<n;i++)
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
	int a,b,x,i;
	cin>>a>>b>>x;
	bool flag=0;
	lp(i,x)
	{
		if(flag)
		{
			cout<<"1";
			b--;
			flag=0;
		}
		else
		{
			cout<<"0";
			a--;
			flag=1;
		}
	}
	if(flag)
	{
		lp(i,a)
			cout<<"0";
		lp(i,b)
			cout<<"1";
	}
	else
	{
		lp(i,b)
			cout<<"1";
		lp(i,a)
			cout<<"0";
	}
	cout<<endl;
	return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main(void)
{
	int i,a,b,x;
	scanf("%d%d%d",&a,&b,&x);
	if(x==0||x==1)
	{
		for(i=1;i<=a;++i)putchar('0');
		for(i=1;i<=b;++i)putchar('1');
		return 0;
	}
	for(i=1;i<=x/2;++i)
	{
		putchar('0');putchar('1');
		--a;--b;
	}
	while(a)putchar('0'),--a;
	while(b)putchar('1'),--b;
	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>

using namespace std;

int main()
{
	int a,b,x;
	cin >> a >> b >> x;
	string s;
	if(b > a)
	{
		for(int i = 0; i < b; i++)
		s += "1";
		if(x % 2 != 0)
		{
			s.insert(s.length(), "0");
			x--;
		}
		for(int i = s.length() - 1; x > 0, i > 0; i--)
		{
			if(x <= 0) break;
			s.insert(i, "0");
			x -= 2;
		}
		while(s.length() != a + b)
		{
			s.insert(s.length()-1, "0");
		}
	}
	else
	{
		for(int i = 0; i < a; i++)
			s += "0";
		if(x % 2 != 0)
		{
			 s.insert(s.length(), "1");
			 x--;
		}
		for(int i = s.length() - 1; x > 0, i > 0; i--)
		{
			if(x <= 0) break;
			s.insert(i, "1");
			x -= 2;
		}
		while(s.length() != a + b)
		{
			s.insert(s.length()-1, "1");
		}
	}
	cout << s;
}

#include<cstdio>
#define rep(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
using namespace std;
int a,b,x;
int main()
{
	scanf("%d%d%d",&a,&b,&x);
	int x2=(x-1)/2;
	int x1=(x-1)-x2;
	rep(i,1,a-x1)printf("1");
	rep(i,1,b-x2)printf("0");
	rep(i,1,x-1)if(i&1)printf("1");else printf("0");
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>

using namespace std;

int main()
{
	int a,b,x;
	cin >> a >> b >> x;
	string s1, s2;
	for(int i = 0; i < a; i++)
		s1 += "0";
	for(int i = 0; i < b; i++)
		s2 += "1";
	x--;
	while(x > 0)
	{
		s1.erase(s1.begin());
		s2 += "0";
		x--;
		if(x == 0) break;
		s2.erase(s2.begin());
		string temp = "1";
		s1 = temp + s1;
		x--;
		if(x == 0) break;
		s1.erase(s1.begin());
		s2 += "1";
		x--;
	}
	cout << s1 + s2;
}

/*
*	Author:Meet Prajapati
*	DAIICT,INDIA
*
*/
#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
#define mset(x,y) memset(x,y,sizeof(x))
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define ff first
#define ss second
#define mod 1000000007
#define inf LONG_MAX
#define pb push_back
#define mp make_pair
#define FIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

bool isPowerOfTwo(int x)
{
    // x will check if x == 0 and !(x & (x - 1)) will check if x is a power of 2 or not
    return (x && !(x & (x - 1)));
}
int main()
{
    FIO;
    ll a,b,x;
    cin>>a>>b>>x;
    if(x%2==0)
    {
        b=b-x/2;
        for(int i=0;i<b;i++)
        cout<<1;
        cout<<0;
        if(a==1)
        x--;
        for(int i=1;i<=x;i++)
        {
            if(i%2==0)
            cout<<0;
            else
            cout<<1;
        }
        a=a-x/2-1;
        for(int i=0;i<a;i++)
        cout<<0;
    }
    else
    {
        b=b-x/2;
        b--;
        for(int i=0;i<b;i++)
        cout<<1;
        for(int i=1;i<=x;i++)
        {
            if(i%2==0)
            cout<<0;
            else
            cout<<1;
        }
        a=a-x/2;
        for(int i=0;i<a;i++)
        cout<<0;
    }
}

#include <iostream>

using namespace std;

string ans = "";

void print(bool b, int x) {
    for (int i = 0; i < x; i++) ans += (b + '0');
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);
    int a, b, x; cin >> a >> b >> x;
    int n = a + b;
    bool y = 0;
    int a2 = a, b2 = b, x2 = x;
    while (a > 0 || b > 0) {
        if (x <= 1) {
            if (y) {
                if (b == 0) break;
                print(1, b);
                b = 0;
            } else {
                if (a == 0) break;
                print(0, a);
                a = 0;
            }
        } else {
            if (y) {
                if (b == 0) break;
                print(1, 1);
                b--;
            } else {
                if (a == 0) break;
                print(0, 1);
                a--;
            }
        }
        x--;
        y = !y;
    }
    a = a2; b = b2; x = x2;
    y = 1;
    string ans2 = ans;
    while (a > 0 || b > 0) {
        if (x <= 1) {
            if (y) {
                print(1, b);
                b = 0;
            } else {
                print(0, a);
                a = 0;
            }
        } else {
            if (y) {
                print(1, 1);
                b--;
            } else {
                print(0, 1);
                a--;
            }
        }
        x--;
        y = !y;
    }
    if (ans.size() == n) cout << ans << endl;
    else cout << ans2 << endl;
    return 0;
}

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>

using namespace std;

typedef long long ll;
const int inf = 0x7fffffff;

int main()
{
    int a,b,x;
    char s[3][105];

    cin >> a >> b >> x;

    s[1][0] = '0';
    s[1][1] = 0;
    a--;
    for(int i = 1 ; i <= x ; i++)
    {
        s[1][i] = (i % 2) + '0';
        s[1][i + 1] = 0;

        if(i % 2)
            b--;
        else
            a--;
    }

    s[0][0] = 0;
    for(int i = 0 ; i < a ; i++)
    {
        s[0][i] = '0';
        s[0][i + 1] = 0;
    }

    s[2][0] = 0;
    for(int i = 0 ; i < b ; i++)
    {
        s[2][i] = '1';
        s[2][i + 1] = 0;
    }

    cout << s[0] << s[1] << s[2] << endl;

    return 0;
}

/*
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>

using namespace std;

typedef long long ll;
const int inf = 0x7fffffff;

int main()
{

    return 0;
}
*/

#include <bits/stdc++.h>
#define MOD 1000000007
#define mod 1000003
#define ll long long
#define memset(X,Y) memset(X,Y,sizeof X)
#define F first
#define S second
#define all(X) X.begin(),X.end()
#define pb push_back
#define MP make_pair
#define REP(a,b) for (int i = a ; i < b ; i++)
#define PI 3.1415926536

using namespace std ;

int main(){

    ios_base::sync_with_stdio(0);
    int a, b ,x ;
    cin >> a >> b >> x ;
    int res = 0 ;
    string s = "0" ;
    a-- ;
    char last = '0' ;
    while (a&&b){
        if (x==1){
          break ;
        }
        else{
            if (last == '0'){
                a-- ;
                s+='1' ;
                last = '1' ;
                x-- ;
            }
            else{
                b-- ;
                s+='0' ;
                last = '0' ;
                x-- ;
            }
        }
    }
    if (last == '0'){

    }
    else{
        while (b--){
        s+='1' ;
     }
     while(a--){
        s+='0' ;
    }
    }

    cout << s ;
   return 0 ;
}

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

int main(){
    int a,b,x;
    cin>>a>>b>>x;
    int ara[100000];
    int v=1,c0=1,c1=0;
    if(x==1){
        for(int i=0;i<a;i++){
            printf("0");
        }
        for(int i=0;i<b;i++){
            printf("1");
        }
        return 0;
    }
    ara[0]=0;
    for(int i=1;i<=x;i++){
        ara[i]=1-ara[i-1];
        if(ara[i]==0)c0++;
        else c1++;
    }
    for(int i=0;i<=x;i++){
        printf("%d",ara[i]);
        if(i==0)
        for(int j=0;j<a-c0;j++){
            printf("0");
        }
        if(i==1){
            for(int j=0;j<b-c1;j++){
                printf("1");
            }
        }
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a,b,x; cin >> a >> b >> x;
    if ((a + b - 1) == x)  {
        for (int i=0; i<a+b; i++) cout << i % 2;
        return 0;
    }
    if (x == 2) {
        if (a == 1) {
            cout << 10;
            for (int i=0; i<b-1; i++) cout << 1;
            return 0;
        }
    }
    int z = a - x / 2;
    int o = b + 1 - x / 2 - x % 2;
    for (int i=0; i<z; i++) cout << 0;
    for (int i=0; i<o; i++) cout << 1;
    for (int i=0; i<a+b-z-o; i++) cout << i % 2;
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

void f (const int& x, char& y, string& z) {
    for (int i = 0; i < x; i++) {
        z += y;
    }
}

int main()
{
    int n = 0, m = 0, l = 0;
    char zero = '0', one = '1';
    string s = "";
    cin >> n >> m >> l;
    l /= 2;
    for (int i = 0; i < l; i++) {
        if (n > m) {
            s += "10";
        }
        else {
            s += "01";
        }
        n--;
        m--;
    }
    if (n > m) {
        f(n, one, s);
        f(m, zero, s);
    }
    else {
        f(m, zero, s);
        f(n, one, s);
    }
    cout << s;
}

#include <bits/stdc++.h>
#define pb push_back
#define x first
#define y second
#define vec vector
#define ll long long
#define mp make_pair
#define pii pair<ll ,ll>
#define dbl long double
#define dbg(vec) for(int i=0;i<vec.size();i++)cout<<vec[i]<<" ";cout<<endl;
using namespace std;
int main(){
	int a,b,x;
	cin>>a>>b>>x;
	string str = max(a,b)==b?"1":"0";
	max(a,b)==b?b--:a--;
	while(x>0){
		if(str[str.size()-1]=='1'){
			if(a){str+="0";x--;a--;}
			else str="1"+str;
		}
		else {
			if(b){str+="1";x--;b--;}
			else str="0"+str;
		}
	}
	while(b){
		if(str.back()=='0'){
			str.pop_back();
			str+="10"; b--;
		}
		else {
			str+="1"; b--;
		}
	}
	while(a){
		if(str[str.size()-1]=='1'){
			str.pop_back();
			str+="01"; a--;
		}
		else {
			str+="0"; a--;
		}
	}
    cout << str;
}

#include <iostream>
#include <string>

using namespace std;

int a, b, x, n;

string answ;

int main(){
  cin >> a >> b >> x;
  if ( x % 2 == 0){
    for (int i = 0; i < x/2 ; i++){
      answ = answ + "10";
      a -= 1;
      b -= 1;
    }
  } else {
    for (int i = 0; i < x/2 + 1; i++){
      answ = answ + "01";
      a -= 1;
      b -= 1;
    }
  }
  for (int i = 0; i < a; i++)
    answ = "0" + answ;
  for (int i = 0; i < b; i++)
    answ = answ + "1";
  cout << answ;
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int one, zero, ch, f=0, k=0;

    cin >> one >> zero >> ch;
    ch--;
    one--;
    zero--;

    list <char> s;
    list <char> :: iterator it;

    s.push_back('1');
    s.push_back('0');

    for(int i = 1; i <= ch; i++)
    {
        if(s.back()=='0' and one>0)
        {
            s.push_back('1');
            one--;
        }
        else if(s.front()=='0' and one>0)
        {
            s.push_front('1');
            one--;
        }
        else if(s.back()=='1' and zero>0)
        {
            s.push_back('0');
            zero--;
        }
        else if(s.front()=='1' and zero>0)
        {
            s.push_front('0');
            zero--;
        }
    }

    if(s.front()=='0' and s.back()=='0')
    {
        for(it = s.begin(); it != s.end(); it++)
        {
            if(*it=='1' and k ==0)
            {
                k=1;
                for(int i = 0; i < one; i++)
                {
                    s.insert(it, '1');
                }
                one=0;
            }
        }
        for(int i = 0; i < zero; i++)
        {
            s.push_back('0');
        }
        zero=0;
    }

    if(s.front()=='1' and s.back()=='1')
    {
        for(it = s.begin(); it != s.end(); it++)
        {
            if(*it=='0'and f==0)
            {
                f=1;
                for(int i = 0; i < zero; i++)
                {
                    s.insert(it, '0');
                }
                zero=0;
            }
        }
        for(int i = 0; i < one; i++)
        {
            s.push_back('1');
        }
        one=0;
    }

    if(s.back()=='1')
    {
       for(int i = 0; i < one; i++)
            s.push_back('1');
    }
    else if(s.front()=='1')
    {
        for(int i = 0; i < one; i++)
            s.push_front('1');
    }

    if(s.back()=='0')
    {
        for(int i = 0; i < zero; i++)
            s.push_back('0');
    }
    else if(s.front()=='0')
    {
        for(int i = 0; i < zero; i++)
            s.push_front('0');
    }

    for(it = s.begin(); it != s.end(); it++)
        cout << *it;

    return 0;
}

#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define ll long long int
#define mod 100000007
#define start int t;cin>>t;while(t--)
#define db(x) cout<<#x<<"="<<x<<"\n"
#define db2(a,b)cout<<#a<<": "<<a<<" , "<<#b<<": "<<b<< endl;
#define db3(a,b,c)cout<<#a<<": "<<a<<" , "<<#b<<": "<<b<<" , "<<#c<<": "<<c<<endl;
#define forr(i, n) for (int i = 0; i < n; i++)
#define fr(i, n) for (int i = 1; i <= n; i++)
#define en "\n"
#define vi vector<int>
#define vli vector<long long int>
#define pii pair<int,int>
#define mii map<int,int>
#define mpp make_pair
#define pb emplace_back
#define all(x) x.begin(),x.end()
#define sortv(x) sort(x.begin(),x.end())
#define sorta(x,n) sort(x,x+n)
#define print_all(x) for(auto t:x) cout<<t<<" ";cout<<en;
#define in(x) cin>>x
#define in2(x,y) cin>>x>>y
#define in3(x,y,z) cin>>x>>y>>z
#define oo(x) cout<<x<<endl
#define oo2(x,y) cout<<x<<" "<<y<<endl
#define oo3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
#define ood(n,x) cout<<fixed<<setprecision(n)<<x<<"\n"
#define sz(x) x.size()
#define ff first
#define ss second
using namespace std;
ll mod_pow(ll x, int n){
    if(n == 0)      return 1;

    ll res = 1;
    while(n > 0){
        if(n & 1)   res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return res;
}
vector<ll> allDivisors(ll n) {
    vector<ll> v;
    for (ll i=1; i<=sqrt(n); i++)
    {
        if (n%i == 0)
        {
            if (n/i == i)
                v.pb(i);

            else {
                v.pb(i);
                v.pb(n/i);
            }
        }
    }
    return v;
}
bool isPalin(string s){
    for(int i=0;i<s.size()/2;i++){
        if(s[i]!=s[s.size()-i-1]){
            return false;
        }
    }
    return true;
}

vi z_algo(string s){
    int n=sz(s);
    int l=0,r=0;
    vi z(n);
    for(ll i=1;i<n;i++){
        if(i>r){
            l=r=i;
            while(r<n && s[r]==s[r-l]){
                r++;
            }
            z[i]=r-l;
            r--;
        }
        else{
            ll index=i-l;
            if(i+z[index]<=r) z[i]=z[index];
            else{
                l=i;
                while(r<n && s[r]==s[r-l]){
                    r++;
                }
                z[i]=r-l;
                r--;
            }
        }
    }
    return z;
}

vi z_match(string str, string pat){
    string total=pat+"$"+str;
    vi z=z_algo(total);
    vi ans;
    forr(i,z.size()){
        if(z[i]==pat.size()){
            ans.pb(i-1-pat.size());
        }
    }
    return ans;

}

vi kmp(string s) {
    int n = (int)s.length();
    vector<int> pi(n);
    for (int i = 1; i < n; i++) {
        int j = pi[i-1];
        while (j > 0 && s[i] != s[j])
            j = pi[j-1];
        if (s[i] == s[j])
            j++;
        pi[i] = j;
    }
    return pi;
}

vi kmp_match(string str, string pat){
    string total=pat+"$"+str;
    int n=sz(total);
    vi ans=kmp(total);
    vi res;
    for(int i=pat.size()+1;i<n;i++){
        if(ans[i]==pat.size()){
           res.pb(i-2*pat.size());
        }
    }
    return res;
}

bool comp(const pair<ll, ll> &a, const pair<ll, ll> &b) {
    if (a.first == b.first) {
        return a.second < b.second;
    } else {
        return a.second < b.second;
    }
}

bool isPrime(ll n)
{
    int skip=0;
    if(n<2)
        return false;
    else if(n==2)
        return true;
    ll limit=sqrt(n);
    if(n%2==0)
        return false;
        for(int j=3; j<=limit; j+=2){
            if(n%j==0)
                return false;
            }
    return true;
}

ll fact(ll n){
    if(n==1) return 1;
    else return n*fact(n-1);
}

ll kadane(vli &a, int n){
    ll curr=a[0];
    ll ans=a[0];
    fr(i,n-1){
        curr+=a[i%n];
        ans=max(ans,curr);
        curr=max(curr,0LL);
    }
    return ans;
}

// Stay honest with yourself
bool fine=0;
//Read the constraints carefully Mridul
//You Can Do this

void solve(){
    int a,b,x;
    in3(a,b,x);
    if(a>=b){
        string s1="01";
        string s="";
        for(int i=1;i<=(x+1)/2;i++){
            s+=s1;
        }
        if(!(x&1)) s+="0";
        int zero=a-count(all(s),'0');
        int ones=b-count(all(s),'1');
        string fro(zero,'0');
        string last(ones,'1');
        if(x&1){
            string ans=fro+s+last;
            oo(ans);
            return;
        }
        else{
            string ans=fro+s;
            oo(ans);
            return;
        }
    }
    else{
        string s1="10";
        string s="";
        for(int i=1;i<=(x+1)/2;i++){
            s+=s1;
        }
        if(!(x&1)) s+="1";
        int zero=a-count(all(s),'0');
        int ones=b-count(all(s),'1');
        string fro(zero,'0');
        string last(ones,'1');
        if(x&1){
            string ans=last+s+fro;
            oo(ans);
            return;
        }
        else{
            string ans=last+s;
            oo(ans);
            return;
        }
    }

}

int main(){
    #ifndef ONLINE_JUDGE
     freopen("input.txt", "r", stdin);
     freopen("error.txt", "w", stderr);
      freopen("output.txt", "w", stdout);
     #endif
    fast;
   if(fine) {
        start{
            solve();
        }
   }
   else solve();
    return 0;
}

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

#define fast_io ios_base::sync_with_stdio(0); //cin.tie(0);
#define ll long long
#define ld long double
#define pb push_back
#define ins insert
#define in push
#define out pop
#define loop(i,n) for(i=1;i<=n;i++)
#define loon(i,n) for(i=n;i>0;i--)
#define vctr(x) vector< x >
#define pii(x,y) pair< x,y >
#define mkpr(x,y) make_pair(x,y)
#define ft first
#define sd second
#define MX 10000005
#define mod 1000000007
#define INF 10000000000000

int main()
{

    ll n,m,t,i,j,k,a,b,c,cs=1;

    //freopen(input.txt, r, stdin);
    //freopen(output.txt, w, stdout);

    cin>> a >> b >> k;
    n=a+b;
    c=k;
    vector<ll>str;
    k=(c+1)/2;
    i=1;
    while(k--){
        str.pb(1);
        str.pb(0);
        a--;
        b--;
        if(!a || !b)
            break;
    }

    if((c+1)%2){
        for(i=0;i<str.size();i++)
            cout<< str[i];
        while(a--){
            cout<< 0;
        }
        while(b--){
            cout<< 1;
        }
    }
    else{
        while(b--){
            cout<< 1;
        }
        for(i=0;i<str.size();i++)
            cout<< str[i];
        while(a--){
            cout<< 0;
        }
    }

    return 0;
}

#include<iostream>
#include<cstdio>
#include<fstream>
#include<set>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
#include<vector>
#include<iomanip>
#include<cstdlib>
#include<list>
#include<queue>
#include<stack>
#include<algorithm>
#define inf 0x3f3f3f3f
#define MOD 1000000007
#define mem0(a) memset(a,0,sizeof(a))
#define mem1(a) memset(a,-1,sizeof(a))
#define meminf(a) memset(a,inf,sizeof(a))
typedef long long ll;
using namespace std;
int main()
{
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  /*freopen("test.txt","r",stdin);
  freopen("output.txt","w",stdout);*/
  int n,m,k;
  cin>>n>>m>>k;
  int t=k/2;
  while(t--)
  {
    cout<<"01";
    n--;m--;
  }
  if(k%2)
  {
    for(int i=1;i<=n;i++)cout<<'0';
    for(int i=1;i<=m;i++)cout<<'1';
  }
  else
  {
    for(int i=0;i<=m;i++)cout<<'1';
    for(int i=0;i<=n;i++)cout<<'0';
  }
  cout<<endl;
  return 0;
}

#include <cstdio>
#include <cstring>
#include <ctype.h>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <stack>
#include <set>
#include <list>
#include <numeric>
#include <sstream>
#include <iomanip>
#include <limits>
#define MST(a, b) memset(a, b, sizeof a)
using namespace std;
typedef long long ll;
const int MAXN = 1000 + 100;
int main() {
    int a, b, x;
    cin >> a >> b >> x;
    for (int i = 0; i < a - x + x / 2; i++) cout << "0";
    for (int i = 0; i < x; i++) cout << i % 2;
    for (int i = 0; i < b - x / 2; i++) cout << "1";
    cout << endl;
}

#include<iostream>
#include<cstdio>
using namespace std;
int a,b,x,n[210];

void init(){
	scanf("%d%d%d",&a,&b,&x);
	int tp=0;
	for(int i=1;i<=x/2;++i){
		n[++tp]='1';
		n[++tp]='0';
		--a;
		--b;
	}
	for(int i=1;i<=a;++i){
		n[++tp]='0';
	}
	for(int i=1;i<=b;++i){
		n[++tp]='1';
	}
	for(int i=1;i<=tp;++i){
		printf("%c",n[i]);
	}
}

int main(){
	init();
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS

//#include <stdio.h>
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define nl << '\n'
#define sq << " " <<
#define all(x) for(auto i: x)
#define _all(x) for(auto j: x)
#define iter(x) x.begin(), x.end()
#define riter(x) x.rbegin(), x.rend()
#define pdeb(x) all(x) cout << i.first sq i.second nl;
#define ndeb(x) all(x) cout << i << " ";\
cout nl;

const ll inf = 2e18 + 9;
const ll mod = 1e9 + 7;
const ll eps = 1e-9;

mt19937 xx(time(0));
//uniform_int_distribution<ull> ullprng(0, LLONG_MAX);

#define IOBOOST
//#define IOFILE

void solve();

int main() {

    #ifdef IOBOOST
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    #endif

    #ifdef IOFILE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
    #endif

    solve();
}

void solve() {

    int a,b,c,d;
    cin >> a >> b >> c;
    d = a + b;

    int z=0;

    string s = "0";

    for(int i = 1; i < d; i++) {
        if(z < c) {
            s[0] == '0' ? a-- : b--;
            s = (s[0] == '0' ? "1" : "0") + s;
            z++;
        }
        else {
            if(a) {
                s += "0";
                a--;
            }
            else {
                s = "1" + s;
                b--;
            }
        }

    }

    cout << s;

}

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

int main()
{
    int zero,one,indices,i;
    cin>>zero>>one>>indices;

    if (indices%2==0)
    {
        if (zero>one)
        {
            int temp=indices/2;
            for (i=0;i<temp;i++) cout<<"01";
            for (i=0;i<zero-temp;i++) cout<<"0";
            for (i=0;i<one-temp;i++) cout<<"1";
        }
        else
        {
            int temp=indices/2;
            for (i=0;i<temp;i++) cout<<"10";
            for (i=0;i<one-temp;i++) cout<<"1";
            for (i=0;i<zero-temp;i++) cout<<"0";
        }

    }
    else
    {
        int temp=indices/2;
        for (i=0;i<temp;i++) cout<<"10";
        for (i=0;i<one-temp;i++) cout<<"1";
        for (i=0;i<zero-temp;i++) cout<<"0";
    }
    cout<<endl;
}

#include <iostream>
#include <cmath>
using namespace std;

int a, b, x;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);

	while(cin >> a >> b >> x){
		int length = a + b,
			MaxSlide = ceil((float)length / (x+1));

		int ans[length], j = 0, len = length;
		int turn = 1;
		while(j < length){
			//cout << j << " " << MaxSlide << endl;
			//system("pause");
			for(int i=j ; i<j+MaxSlide ; i++)
				ans[i] = turn;
			j += MaxSlide;
			len -= MaxSlide;
			x--;
			//cout << j << " " << len << " " << x << endl;
			while(ceil((float)len / MaxSlide) <= ceil((float)x/MaxSlide) && MaxSlide != 1) MaxSlide--;
			turn = (turn + 1) % 2;
		}
		for(int i=0 ; i<length ; i++)
			cout << ans[i];
		cout << endl;
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int one, zero, ch, f=0, k=0;

    cin >> one >> zero >> ch;
    ch--;
    one--;
    zero--;

    list <char> s;
    list <char> :: iterator it;

    s.push_back('1');
    s.push_back('0');

    for(int i = 1; i <= ch; i++)
    {
        if(s.back()=='0' and one>0)
        {
            s.push_back('1');
            one--;
        }
        else if(s.back()=='1' and zero>0)
        {
            s.push_back('0');
            zero--;
        }
    }

    if(s.front()=='0' and s.back()=='0')
    {
        for(it = s.begin(); it != s.end(); it++)
        {
            if(*it=='1' and k ==0)
            {
                k=1;
                for(int i = 0; i < one; i++)
                {
                    s.insert(it, '1');
                }
                one=0;
            }
        }
        for(int i = 0; i < zero; i++)
        {
            s.push_back('0');
        }
        zero=0;
    }

    if(s.front()=='1' and s.back()=='1')
    {
        for(it = s.begin(); it != s.end(); it++)
        {
            if(*it=='0'and f==0)
            {
                f=1;
                for(int i = 0; i < zero; i++)
                {
                    s.insert(it, '0');
                }
                zero=0;
            }
        }
        for(int i = 0; i < one; i++)
        {
            s.push_back('1');
        }
        one=0;
    }

    if(s.back()=='1')
    {
       for(int i = 0; i < one; i++)
            s.push_back('1');
    }
    else if(s.front()=='1')
    {
        for(int i = 0; i < one; i++)
            s.push_front('1');
    }

    if(s.back()=='0')
    {
        for(int i = 0; i < zero; i++)
            s.push_back('0');
    }
    else if(s.front()=='0')
    {
        for(int i = 0; i < zero; i++)
            s.push_front('0');
    }

    for(it = s.begin(); it != s.end(); it++)
        cout << *it;

    return 0;
}

/*
ID: richard124
PROB: kimbits
LANG: C++11
*/

#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <chrono>
#include <algorithm>
#include <bitset>
#include <iomanip>

using namespace std;
using namespace std::chrono;

typedef pair<int, int> pii;
#define pb push_back;

int a;
int b;
int x;

int main() {
    cin >> a >> b >> x;
    if (a < b && x%2 == 1) {
        int rep = x/2;
        string res = "";
        for (int i=0; i<rep; i++) {
            res += "10";
        }
        int needzeros = a-rep;
        int needones = b-rep;
        for (int i=0; i<needones; i++) {
            res += "1";
        }
        for (int i=0; i<needzeros; i++) {
            res += "0";
        }
        cout << res;
        return 0;
    }
    else if (a >= b && x%2 == 1) {
        int rep = x/2;
        string res = "";
        for (int i=0; i<rep; i++) {
            res += "01";
        }
        int needzeros = a-rep;
        int needones = b-rep;
        for (int i=0; i<needzeros; i++) {
            res += "0";
        }
        for (int i=0; i<needones; i++) {
            res += "1";
        }
        cout << res;
        return 0;
    }
    else if (a < b && x%2 == 0) {
        int rep = x/2;
        string res = "";
        for (int i=0; i<rep; i++) {
            res += "01";
        }
        int needzeros = a-rep;
        int needones = b-rep;
        for (int i=0; i<needones; i++) {
            res += "1";
        }
        for (int i=0; i<needzeros; i++) {
            res += "0";
        }
        cout << res;
        return 0;
    }
    else if (a>=b && x%2 == 0) {
        int rep = x/2;
        string res = "";
        for (int i=0; i<rep; i++) {
            res += "01";
        }
        int needzeros = a-rep;
        int needones = b-rep;
        for (int i=0; i<needzeros; i++) {
            res += "0";
        }
        for (int i=0; i<needones; i++) {
            res += "1";
        }
        cout << res;
        return 0;
    }

	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
  int a = 0, b = 0, x = 0;
  cin >> a  >> b >> x;
  string res = "";

  bool inside = true;
    if(a >= b){

    while(x > 0){
        if(inside){
          res += "0";
          a--;
        }
        else{
          res += "1";
          b--;
        }
        inside = !inside;
        x--;
      }
    }else{
      while(x > 0){
        if(inside){
          res += "0";
          b--;
        }
        else{
          res += "1";
          a--;
        }
          inside = !inside;
        x--;
      }
    }
  if(res[res.size() - 1] == '0'){
    for(int i = 0; i < a; i++)
      res += "0";

    for(int q = 0; q < b; q++)
      res += "1";
  }else{
      for(int i = 0; i < b; i++)
      res += "1";

    for(int q = 0; q < a; q++)
      res += "0";

  }
  cout << res << "\n";

    return 0;
}

#include <bits/stdc++.h>
#define N 5005
#define ll long long
#define mem(a, b) memset(a, b, sizeof(a))
using namespace std;
int main() {
    // freopen("in.txt", "r", stdin);
	int a, b, x;
	scanf("%d%d%d", &a, &b, &x);
	string t, ans;
	if (a > b)	t = "01";
	else		t = "10";
	// x个不同需要 x+1个 “01” 串
	++x;
	int sum = x / 2;
	for (int i = 0; i < sum; ++i) {
		ans += t;
	}
	a -= sum;
	b -= sum;
	if (x % 2) {
		if (t == "01")	ans += "0", --a;
		else 			ans += "1", --b;
	}
	int len = ans.size();
	int l = ans.find('0'), r = ans.find('1');
	if (a)	ans.insert(l, a, '0');
	if (b)	ans.insert(r, b, '1');
	cout << ans << endl;
}

#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long LL;
int main()
{
    int a,b,x;
    int cnt=0;
    while(scanf("%d%d%d",&a,&b,&x)!=EOF)
    {
        int tot=a+b;
        for(int i=0;i<tot;i++)
        {
            if(cnt<x)
            {
                if(i&1)
                {
                    printf("0");
                    a--;
                }
                else
                {
                    printf("1");
                    b--;
                }
            }
            else
            {
                if(a)
                {
                    printf("0");
                    a--;
                }
                else
                {
                    printf("1");
                    b--;
                }
            }
        }
        printf("\n");
    }
    return 0;
}

#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <cassert>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#pragma comment(linker, "/stck:1024000000,1024000000")
#define lowbit(x) (x&(-x))
#define max(x,y) (x>=y?x:y)
#define min(x,y) (x<=y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.1415926535897932384626433832
#define ios() ios::sync_with_stdio(true)
#define INF 0x3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
int n,m,x,c;
char s[106];
int main()
{
	scanf("%d%d%d",&n,&m,&x);
	int ok=n>m;
	for(int i=1;i<=x;i++)
	{
		if(ok)
		{
			if(i&1) s[i]='0',n--;
			else s[i]='1',m--;
		}
		else
		{
			if(i&1) s[i]='1',m--;
			else s[i]='0',n--;
		}
	}
	if(ok)
	{
		if(x&1)
		{
			printf("%s",s+1);
			for(int i=0;i<n;i++)
				printf("0");
			for(int i=0;i<m;i++)
				printf("1");
		}
		else
		{
			printf("%s",s+1);
			for(int i=0;i<m;i++)
				printf("1");
			for(int i=0;i<n;i++)
				printf("0");
		}
	}
	else
	{
		if(x&1)
		{
			printf("%s",s+1);
			for(int i=0;i<m;i++)
				printf("1");
			for(int i=0;i<n;i++)
				printf("0");
		}
		else
		{
			printf("%s",s+1);
			for(int i=0;i<n;i++)
				printf("0");
			for(int i=0;i<m;i++)
				printf("1");
		}
	}
	return 0;
}

#include<bits/stdc++.h>
void cambiar(char *c)
{
    if(*c=='0')
        *c='1';
    else
        *c='0';
}
int main()
{
    std::ios_base::sync_with_stdio(0);
    std::cin.tie(0);
    std::cout.tie(0);
    int a,b,x,i=0,j=0,k=0,kk,jj;
    std::string s="",primeros="",segundos="";
    char cambio='1',c=cambio;
    std::cin>>a>>b>>x;
    if(a>=b)
        c=cambio='0';
    else
        std::swap(a,b);
    s+=c;
    for(i=1;i<=x;i++)
    {
        cambiar(&c);
        s+=c;
    }
    j=(x+2)/2;
    k=(x+1)/2;
    jj=a+1-j;
    kk=a+1-k;
    for(i=0;i<jj;i++)
        primeros+=cambio;
    cambiar(&cambio);
    for(i=0;i<kk;i++)
        segundos+=cambio;
    std::cout<<primeros<<segundos;
    if(x>2)
        std::cout<<s.substr(2,x-1);
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i,a,b,c) for(ll i=a;i<b;i+=c)
#define r(i,a,b,c) for(ll i=a;i>=b;i-=c)
#define mod 1000000007

int main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    ll a,b,x; cin >> a >> b >> x;
    ll fa = 0;
    ll fb = 0;
    string bin = "";
    f(i,0,x,1){
    	if(i%2==0){
    		bin += '1';
    		fb++;
    	}
    	else{
    		 bin += '0';
    		 fa++;
    	}
    // 	cout << x << " ";
    }
     f(i,0,b-fb,1) bin += '1';
    f(i,0,a-fa,1) bin += '0';
    cout << bin;
    return 0;
}

#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int main() {
    int a, b, x;
    cin >> a;
    cin >> b;
    cin >> x;
    int n = a + b;
    char ar[n];
    int i;
    if (x  > 1) {
        if (a > b) {
            ar[0] = '0';
            a--;
        }
        else {
            ar[0] = '1';
            b--;
        }
        i = 1;
    }   else {
        i = 0;
    }

    while (x > 1) {
        if (ar[i - 1] == '0') {
            ar[i] = '1';
        }   else {
            ar[i] = '0';
        }
        x--;
        i++;
    }
    while (a--) {
        ar[i] = '0';
        i++;
    }
    while (b--) {
        ar[i] = '1';
        i++;
    }

    for (int j = 0; j < n; j++) {
        cout << ar[j];
    }
    cout << endl;
    return 0;
}

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>

using namespace std;

#define i64 long long
#define pb push_back
#define mp make_pair
#define ii pair<int, int>
#define fillchar(a, b) memset(a, b, sizeof a)
#define FOR(i,x,y)  for(int i = x ; i<= y ; i++)
#define FORD(i,x,y)  for(int i = x ; i>= y ; i--)
#define ui64 unsigned long long
#define str string
#define se second
#define fi first
#define endl '\n'

const long double PI = 3.141592653589793116;
const i64 INF = 1e18;
const i64 _INF = -1e18;
typedef vector <i64> vint;
typedef vector <str> vstr;
typedef priority_queue <int> heap;

//Struct....................................
/*
	struct data {
    int fi, se, th;
    double f;
    _make(int fi, int se, int th): fi(fi), se(se), th(th){
        //...
    }
} ;
*/

//Bitwise Fuctions..........................
int getbit(int x, int i) {return (x >> i) & 1;}
int onbit(int x, int i) {return (x | (1 << i));} //return the value of x after turn bit i on
int offbit(int x, int i) {return (1 & ~(x >> i));}
//Global Variable...........................
int a, b, x;
vint res;

//Extra functions...........................

//Main functions............................
void Input(){
    cin >> a >> b >> x;
}

void Solve(){
    int flag;
    if (b >= a)
    {
        res.pb(1);
        b--;
        flag = 0;
    }
    else{
        res.pb(0);
        a--;
        flag = 1;
    }
    while (x > 0 && b > 0 && a > 0){
        if (flag == 0){
            res.pb(0);
            a--;
            x--;
            flag = 1;
        }
        else{
            res.pb(1);
            b--;
            x--;
            flag = 0;
        }
    }
    if (x == 1){
        if (flag == 0){
            FOR(i, 1, b) res.pb(1);
            FOR(i, 1, a) res.pb(0);
        }
        else{
            FOR(i, 1, a) res.pb(0);
            FOR(i, 1, b) res.pb(1);
        }
    }
    else
    if (flag == 0){
        if (a > 0){
            swap(res[res.size() - 1],res[res.size() - 2]);
            FOR(i, 1, a) res.pb(0);
            FOR(i, 1, b) res.pb(1);
        }
        else{
            FOR(i, 1, b) res.pb(1);
        }
    }
    else{
        if (b > 0){
            swap(res[res.size() - 1], res[res.size() - 2]);
            FOR(i, 1, b) res.pb(1);
            FOR(i, 1, a) res.pb(0);
        }
        else{
            FOR(i, 1, a) res.pb(0);
        }
    }
    FOR(i, 0, res.size() - 1) cout << res[i];
}
//..........................................
int main() {
	ios_base::sync_with_stdio(0); cin.tie(0);
	//freopen("filename.inp", "r", stdin);
	//freopen("filename.out", "w", stdout);
	Input();
	Solve();
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int a, b, x;
string ans;

int main(){
    scanf("%d %d %d", &a, &b, &x);
    if (x%2==0){
        if (a>b){
            for (int i=0;i<x/2;i++)
                ans.insert(ans.size(), "01");
            ans.insert(ans.size(), b-(x/2), '1');
            ans.insert(ans.size(), a-(x/2), '0');
        } else{
            for (int i=0;i<x/2;i++)
                ans.insert(ans.size(), "10");
            ans.insert(ans.size(), a-(x/2), '0');
            ans.insert(ans.size(), b-(x/2), '1');
        }
    } else{
        if (a>b){
            for (int i=0;i<floor(x/2);i++)
                ans.insert(ans.size(), "01");
            ans.insert(ans.size(), b-floor(x/2), '1');
            ans.insert(ans.size(), a-floor(x/2), '0');
        } else{
            for (int i=0;i<floor(x/2);i++)
                ans.insert(ans.size(), "10");
            ans.insert(ans.size(), b-floor(x/2), '1');
            ans.insert(ans.size(), a-floor(x/2), '0');
        }
    }
    cout << ans;
    printf("\n");
    return 0;
}