/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;
	if(!a && !b && !c && !d){
		cout << "0" << endl;
		return 0;
	}

	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	if(one==-1 || zero==-1 || (c+b)!= zero*one){
		cout << "Impossible" << endl;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}
	cout << ans << endl;

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;

	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	if(one==-1 || zero==-1 || (c+b)!= zero*one){
		cout << "Impossible" << endl;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}
	cout << ans << endl;

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;

	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1 ){
		cout << "Impossible" << endl;
		//assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}
	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		assert(flag==0) ;
	}
	else flag=1 , cout << ans << endl ;

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;

	if(a==0 && b==0 && c==0 && d==0){
		cout << "0" << endl;
		return 0;
	}
	one = sqrt(d*2) ;
	if((one*(one+1)) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if((zero*(zero+1)) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1){
		cout << "Impossible" << endl;
		//cout << "here" << endl;
		assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}

	LL zero_till =0 ,one_till = 0;
	LL zero_zero =0 , zero_one = 0 , one_zero =0 , one_one =0 ;
	for(i=0;i<one+zero;i++){
		if(ans[i] == '0'){
			zero_till ++ ;
			zero_zero += zero_till-1 ;
			one_zero += one_till ;
		}
		else if(ans[i]=='1'){
			one_till++;
			one_one += one_till-1 ;
			zero_one += zero_till ;
		}
		else assert(1==0);
	}
	if(one_one!=d || zero_one!=b || one_zero!=c || zero_zero!=a){
		cout << "Impossible" << endl;
		return 0;
	}
	if(!ans.size()){
		cout << "Impossible" << endl;
		return 0;
	}

	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		return 0;
	}
	else flag=1 , cout << ans << endl ;
	assert(ans.size()<=1000000);

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;
	if(a==0 && b==0 && c==0 && d==0){
		cout << "Impossible" << endl;
		return 0;
	}
	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1){
		cout << "Impossible" << endl;
		//cout << "here" << endl;
		assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}

	LL zero_till =0 ,one_till = 0;
	LL zero_zero =0 , zero_one = 0 , one_zero =0 , one_one =0 ;
	for(i=0;i<one+zero;i++){
		if(ans[i] == '0'){
			zero_till ++ ;
			zero_zero += zero_till-1 ;
			one_zero += one_till ;
		}
		else if(ans[i]=='1'){
			one_till++;
			one_one += one_till-1 ;
			zero_one += zero_till ;
		}
		else assert(1==0);
	}
	if(one_one!=d || zero_one!=b || one_zero!=c || zero_zero!=a){
		cout << "Impossible" << endl;
		return 0;
	}

	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		return 0;
	}
	else flag=1 , cout << ans << endl ;
	assert(ans.size()<=1000000);

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;
	if(a==0 && b==0 && c==0 && d==0){
		cout << "Impossible" << endl;
		return 0;
	}
	one = sqrt(d*2) ;
	if((one*(one+1)) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if((zero*(zero+1)) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1){
		cout << "Impossible" << endl;
		//cout << "here" << endl;
		assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}

	LL zero_till =0 ,one_till = 0;
	LL zero_zero =0 , zero_one = 0 , one_zero =0 , one_one =0 ;
	for(i=0;i<one+zero;i++){
		if(ans[i] == '0'){
			zero_till ++ ;
			zero_zero += zero_till-1 ;
			one_zero += one_till ;
		}
		else if(ans[i]=='1'){
			one_till++;
			one_one += one_till-1 ;
			zero_one += zero_till ;
		}
		else assert(1==0);
	}
	if(one_one!=d || zero_one!=b || one_zero!=c || zero_zero!=a){
		cout << "Impossible" << endl;
		return 0;
	}

	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		return 0;
	}
	else flag=1 , cout << ans << endl ;
	assert(ans.size()<=1000000);

	return 0;

}


/*
	Nikhil Daliya
	IIIT Hyderabad
*/
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define SET(a,b) memset(a,b,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define SL(n) scanf("%lld",&n)
#define PL(n) printf("%lld\n",n)
#define SI(n) scanf("%d",&n)
#define PI(n) printf("%d\n",n);
#define SD(n) scanf("%lf",&n);
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;

template<class T> void print_array(T a[], int size) { for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
template<class T> void print_array_v(T &a) { int size = a.size(); for(int i=0; i<size; i++) cout<<a[i]<<" "; cout<<endl; }
typedef long long int LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<VL> VVL;
typedef pair<LL,LL> PLL;
typedef pair<int ,int> II;
typedef vector<II> VII;
#define mod 1000000007
#define MAXN 100005
#define LOGMAXN 17

int main()
{
	LL i,j,a,b,c,d, one=0,zero=0 ;
	cin >> a >> b >> c >> d ;

	one = sqrt(d*2) ;
	if(one*(one+1) == d*2)
		one++;
	else one=-1 ;

	zero = sqrt(a*2) ;
	if(zero*(zero+1) == 2*a)
		zero++;
	else zero = -1 ;
	if(d==0 && b==0 && c==0)
		one = 0 ;
	if(a==0 && b==0 && c==0)
		zero =0 ;
	//cout << one << " " << zero << endl;
	bool flag = 0 ;
	if(one==-1 || zero==-1){
		cout << "Impossible" << endl;
		assert(flag==0) ;
		return 0 ;
	}
	string ans ;
	LL s = c , zero_rem = zero , one_rem = one ;
	for(i=0;i<one+zero;i++){
		if(s >= zero_rem)
			s-= zero_rem , ans+= '1' , one_rem-- ;
		else  ans+='0' , zero_rem--;
	}

	LL zero_till =0 ,one_till = 0;
	LL zero_zero =0 , zero_one = 0 , one_zero =0 , one_one =0 ;
	for(i=0;i<one+zero;i++){
		if(ans[i] == '0'){
			zero_till ++ ;
			zero_zero += zero_till-1 ;
			one_zero += one_till ;
		}
		else if(ans[i]=='1'){
			one_till++;
			one_one += one_till-1 ;
			zero_one += zero_till ;
		}
		else assert(1==0);
	}
	if(one_one!=d || zero_one!=b || one_zero!=c || zero_zero!=a){
		cout << "Impossible" << endl;
		return 0;
	}

	if(zero_rem!=0 || one_rem!=0){
		cout << "Impossible" << endl;
		return 0;
	}
	else flag=1 , cout << ans << endl ;

	return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	// if(a==0&&b==0)
	int sol1 = 0, sol2 = 0;
	for(int i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	// if(sol1 == -1 || sol2 == -1) {
	// 	cout<<"Impossible"<<endl;
	// 	return 0;
	// }
	if(b == 0 && c == 0){
		if(sol1 == 1) sol1 = 0;
		if(sol2 == 1) sol2 = 0;
	}
	if((lli)(sol1*sol2)!=(lli)(b+c)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// sol2 2*i + j + k = c, i+j+k=sol2
	lli x = 0, ind = 0;
	for (lli i = 1; i <= sol1; ++i)
	{
		lli temp = b/i;
		// cout<<temp<<endl;
		if(temp <= sol2){
			x = temp;
			ind = i;
			break;
		}
	}
	x = sol2 - x;
	// cout<<x<<" "<<ind<<endl;
	for (int i = 0; i < x; ++i)
	{
		cout<<"1";
	}
	for (int i = x; i < x+ind; ++i)
	{
		cout<<"0";
	}
	for (int i = 0; i < sol2-x; ++i)
	{
		cout<<"1";
	}
	for (int i = ind; i < sol1; ++i)
	{
		cout<<"0";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(c==0&&b==0) {
		if(a == 0) sol1 = 0;
		else sol2 = 0;
	}
	if(((sol1*sol2) != b+c) || (sol1==0&&sol2==0) || (sol1 * (sol1-1)/2 != a)||(sol2 * (sol2-1)/2 != d)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// cout<<sol1*sol2<<endl;
	// return 0;
	while(sol1+sol2 > 0) {
		// 0 1
		if(b >= sol2) {
			printf("0");
			b-=sol2;
			sol1--;
		} else {
			printf("1");
			c-=sol1;
			sol2--;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(c==0&&b==0) {
		if(a == 0) sol1 = 0;
		else sol2 = 0;
	}
	if(sol1*sol2 != b+c) {
		cout<<"Impossible";
		return 0;
	}
	while(sol1+sol2 > 0) {
		// 0 1
		if(b >= sol2) {
			printf("0");
			b-=sol2;
			sol1--;
		} else {
			printf("1");
			c-=sol1;
			sol2--;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	int sol1 = 0, sol2 = 0;
	for(int i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(sol1 == -1 || sol2 == -1) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	if((lli)sol1*sol2!=(lli)b+c) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// sol2 2*i + j + k = c, i+j+k=sol2
	lli x = 0, ind = 0;
	for (lli i = 1; i <= sol1; ++i)
	{
		lli temp = b/i;
		// cout<<temp<<endl;
		if(temp <= sol2){
			x = temp;
			ind = i;
			break;
		}
	}
	x = sol2 - x;
	// cout<<x<<" "<<ind<<endl;
	for (int i = 0; i < x; ++i)
	{
		cout<<"1";
	}
	for (int i = x; i < x+ind; ++i)
	{
		cout<<"0";
	}
	for (int i = 0; i < sol2-x; ++i)
	{
		cout<<"1";
	}
	for (int i = ind; i < sol1; ++i)
	{
		cout<<"0";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(c==0&&b==0) {
		if(a == 0) sol1 = 0;
		else sol2 = 0;
	}
	if(((sol1*sol2) != b+c) || (sol1==0&&sol2==0) || (sol1 * (sol1-1)/2 != a)||(sol2 * (sol2-1)/2 != d)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// cout<<sol1*sol2<<endl;
	return 0;
	while(sol1+sol2 > 0) {
		// 0 1
		if(b >= sol2) {
			printf("0");
			b-=sol2;
			sol1--;
		} else {
			printf("1");
			c-=sol1;
			sol2--;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(c==0&&d==0) {
		if(a == 0) sol1 = 0;
		else sol2 = 0;
	}
	if(sol1*sol2 != b+c) {
		cout<<"Impossible";
		return 0;
	}
	while(sol1+sol2 > 0) {
		// 0 1
		if(b >= sol2) {
			printf("0");
			b-=sol2;
			sol1--;
		} else {
			printf("1");
			c-=sol1;
			sol2--;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(c==0&&b==0) {
		if(a == 0) sol1 = 0;
		else sol2 = 0;
	}
	if(sol1*sol2 != b+c) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	while(sol1+sol2 > 0) {
		// 0 1
		if(b >= sol2) {
			printf("0");
			b-=sol2;
			sol1--;
		} else {
			printf("1");
			c-=sol1;
			sol2--;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	if(a==0&&b==0&&c==0&&d==0) {
		cout<<1<<endl;
		return 0;
	}
	// if(a==0&&b==0)
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	cout<<sol1<<endl;
	return 0;
	// if(sol1 == -1 || sol2 == -1) {
	// 	cout<<"Impossible"<<endl;
	// 	return 0;
	// }
	if(b == 0 && c == 0){
		if(sol1 == 1) sol1 = 0;
		if(sol2 == 1) sol2 = 0;
	}
	if((lli)(sol1*sol2)!=(lli)(b+c)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// sol2 2*i + j + k = c, i+j+k=sol2
	lli x = 0, ind = 0;
	for (lli i = 1; i <= sol1; ++i)
	{
		lli temp = b/i;
		// cout<<temp<<endl;
		if(temp <= sol2){
			x = temp;
			ind = i;
			break;
		}
	}
	x = sol2 - x;
	// cout<<x<<" "<<ind<<endl;
	for (lli i = 0; i < x; ++i)
	{
		cout<<"1";
	}
	for (lli i = x; i < x+ind; ++i)
	{
		cout<<"0";
	}
	for (lli i = 0; i < sol2-x; ++i)
	{
		cout<<"1";
	}
	for (lli i = ind; i < sol1; ++i)
	{
		cout<<"0";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	if(c==0&&b==0) {
		if(a == 0) sol1 = 0;
		else sol2 = 0;
	}
	if(sol1*sol2 != b+c || (sol1==0&&sol2==0)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	while(sol1+sol2 > 0) {
		// 0 1
		if(b >= sol2) {
			printf("0");
			b-=sol2;
			sol1--;
		} else {
			printf("1");
			c-=sol1;
			sol2--;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	if(a==0&&b==0&&c==0&&d==0) {
		cout<<1<<endl;
		return 0;
	}
	// if(a==0&&b==0)
	int sol1 = 0, sol2 = 0;
	for(int i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	// if(sol1 == -1 || sol2 == -1) {
	// 	cout<<"Impossible"<<endl;
	// 	return 0;
	// }
	if(b == 0 && c == 0){
		if(sol1 == 1) sol1 = 0;
		if(sol2 == 1) sol2 = 0;
	}
	if((lli)(sol1*sol2)!=(lli)(b+c)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// sol2 2*i + j + k = c, i+j+k=sol2
	lli x = 0, ind = 0;
	for (lli i = 1; i <= sol1; ++i)
	{
		lli temp = b/i;
		// cout<<temp<<endl;
		if(temp <= sol2){
			x = temp;
			ind = i;
			break;
		}
	}
	x = sol2 - x;
	// cout<<x<<" "<<ind<<endl;
	for (int i = 0; i < x; ++i)
	{
		cout<<"1";
	}
	for (int i = x; i < x+ind; ++i)
	{
		cout<<"0";
	}
	for (int i = 0; i < sol2-x; ++i)
	{
		cout<<"1";
	}
	for (int i = ind; i < sol1; ++i)
	{
		cout<<"0";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main(int argc, char const *argv[])
{
	lli a,b,c,d;
	cin>>a>>b>>c>>d;
	if(a==0&&b==0&&c==0&&d==0) {
		cout<<1<<endl;
		return 0;
	}
	// if(a==0&&b==0)
	lli sol1 = 0, sol2 = 0;
	for(lli i = 1; i < 1000001; i++) {
		if(((lli)(i-1)*(i))/(lli)2 == a ) sol1 = i;
		if(((lli)(i-1)*(i))/(lli)2 == d ) sol2 = i;
	}
	// cout<<sol1<<endl;
	// return 0;
	// if(sol1 == -1 || sol2 == -1) {
	// 	cout<<"Impossible"<<endl;
	// 	return 0;
	// }
	if(b == 0 && c == 0){
		if(sol1 == 1) sol1 = 0;
		if(sol2 == 1) sol2 = 0;
	}
	if((lli)(sol1*sol2)!=(lli)(b+c)) {
		cout<<"Impossible"<<endl;
		return 0;
	}
	// sol2 2*i + j + k = c, i+j+k=sol2
	lli x = 0, ind = 0;
	for (lli i = 1; i <= sol1; ++i)
	{
		lli temp = b/i;
		// cout<<temp<<endl;
		if(temp <= sol2){
			x = temp;
			ind = i;
			break;
		}
	}
	x = sol2 - x;
	// cout<<x<<" "<<ind<<endl;
	for (lli i = 0; i < x; ++i)
	{
		cout<<"1";
	}
	for (lli i = x; i < x+ind; ++i)
	{
		cout<<"0";
	}
	for (lli i = 0; i < sol2-x; ++i)
	{
		cout<<"1";
	}
	for (lli i = ind; i < sol1; ++i)
	{
		cout<<"0";
	}
	return 0;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[2000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	/*if(a!=0&&d!=0&&b+c==0){
		printf("Impossible\n");
		return 0;
	}*/
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	if(c+b!=0){
 	a=ok(a);
	d=ok(d);
    }
    else{
    	if(a==0) d=ok(d);
    	else a=ok(a);
	}
	//if(a+d>1e6) while(1);

	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[9000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	/*if(a!=0&&d!=0&&b+c==0){
		printf("Impossible\n");
		return 0;
	}*/
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	if(c+b!=0){
 	a=ok(a);
	d=ok(d);
    }
    else{
    	if(a==0) d=ok(d);
    	else a=ok(a);
	}
	//if(a+d>1e6) while(1);

	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;
char ans[1000003];
int ok(int y);
int main(){
	int a=0,b=0,c=0,d=0;
	int temp01=0;
	int temp10=0;
	scanf("%d%d%d%d",&a,&b,&c,&d);
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
		//cout<<ans<<endl;
		//cout<<temp01<<endl;
	}
	printf("%s\n",ans);

	return 0;
}
int ok(int y){
	y*=2;
	int temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[2000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	if(a+d>1e6) while(1);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[5000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	if(a+b+d+c==0){
		printf("0\n");
		return 0;
	}
	if(a!=0&&d!=0&&c+b==0){
		printf("Impossible\n");
		return 0;
	}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);

	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[20000030];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	//if(a+d>1e6) while(1);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[5000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	f(a+b+d+c==0){
		printf("0\n");
		return 0;
	}
	if(a!=0&&d!=0&&c+b==0){
		printf("Impossible\n");
		return 0;
	}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);

	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[5000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(a!=0&&d!=0&&c+b==0){
		printf("Impossible\n");
		return 0;
	}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);

	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[9000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(a!=0&&d!=0&&b+c==0){
		printf("Impossible\n");
		return 0;
	}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk"<<endl;
	if(c+b!=0){
 	a=ok(a);
	d=ok(d);
    }
    else{
    	//cout<<"mk"<<endl;
    	if(a==0) d=ok(d);
    	else a=ok(a);
	}
	//if(a+d>1e6) while(1);
	cout<<"mk"<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[9000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(a!=0&&d!=0&&b+c==0){
		printf("Impossible\n");
		return 0;
	}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk"<<endl;
	if(c+b!=0){
 	a=ok(a);
	d=ok(d);
    }
    else{
    	//cout<<"mk"<<endl;
    	if(a==0) d=ok(d);
    	else a=ok(a);
	}
	//if(a+d>1e6) while(1);
	//cout<<"mk"<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[2000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	if(c+b!=0){
 	a=ok(a);
	d=ok(d);
    }
    else{
    	if(a==0) d=ok(d);
    	else a=ok(a);
	}
	//if(a+d>1e6) while(1);

	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[1000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	//cout<<"mk";
	a=ok(a);
	d=ok(d);
	//cout<<a<<" "<<d<<endl;
	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);

	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include<iostream>
#define ll long long
#include<cstring>
#include<cmath>
using namespace std;
char ans[2000003];
ll ok(ll y);
int main(){
	ll a=0,b=0,c=0,d=0;
	ll temp01=0;
	ll temp10=0;
	scanf("%I64d%I64d%I64d%I64d",&a,&b,&c,&d);
	//if(a+b+d+c==0){
	//	printf("\n");
	//	return 0;
	//}
	if(a!=0&&d!=0&&b+c==0){
		printf("Impossible\n");
		return 0;
	}
	if(!(ok(a)!=-1&&ok(d)!=-1)){
		printf("Impossible\n");
		return 0;
	}
	if(c+b!=0){
 	a=ok(a);
	d=ok(d);
    }
    else{
    	if(a==0) d=ok(d);
    	else a=ok(a);
	}
	//if(a+d>1e6) while(1);

	for(int i=0;i<a;i++) ans[i]='0';
	for(int i=a;i<a+d;i++) ans[i]='1';
	ans[a+d]='\0';
	//cout<<ans<<endl;
	temp01=a*d;
	if(temp01!=b+c){
		printf("Impossible\n");
		return 0;
	}
	int op=0;
	while(temp01!=b){
		if(b+a<=temp01){
			ans[op]='1';
			ans[a+op]='0';
			temp01-=a;
			op++;
		}else{
			int mu=temp01-b;
			ans[a+op]='0';
			ans[a-mu+op]='1';
			temp01=b;
		}
	}
	printf("%s\n",ans);
	return 0;
}
ll ok(ll y){
	y*=2;
	ll temp=sqrt(1+4*y);
	if(temp*temp==1+4*y&&temp&1) return (1+temp)/2;
	return -1;
}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    else return false;
}

int main(){
    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    double tmp1=(1+sqrt(1+8*a0))/2;
    double tmp2=(1+sqrt(1+8*a3))/2;
    int zero=round(tmp1), one=round(tmp2);
    if (!de(round(tmp1),tmp1) || !de(round(tmp2),tmp2)){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero+one){
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*(ptr2-ptr1);
            b2=(ptr2-ptr1)*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }

        if (!found){
            int ptr3=ptr2+(a1-b1);
            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2-1;i++){
                printf("1");
            }
            for(int i=ptr2;i<=ptr3-1;i++){
                printf("0");
            }
            printf("1");
            for(int i=ptr3+1;i<=len;i++){
                printf("0");
            }
        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<int,int> m;

int main(){

    int tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

      if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
     else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                for(int i=ptr3+1;i<=saveLen;i++,saveLen--){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        break;
                    }

                }
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            if (last!=-1){
                for(int i=ptr2+1;i<last;i++){
                    printf("0");
                }
                printf("1");
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");
            }

        }
        else {
               // cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    else return false;
}

int main(){
    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    double tmp1=(1+sqrt(1+8*a0))/2;
    double tmp2=(1+sqrt(1+8*a3))/2;
    int zero=round(tmp1), one=round(tmp2);
    if (!de(round(tmp1),tmp1) || !de(round(tmp2),tmp2)){
           // cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
     else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*(ptr2-ptr1);
            b2=(ptr2-ptr1)*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }

        if (!found){
            int ptr3=ptr2+(a1-b1);
            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2-1;i++){
                printf("1");
            }
            for(int i=ptr2;i<=ptr3-1;i++){
                printf("0");
            }
            printf("1");
            for(int i=ptr3+1;i<=len;i++){
                printf("0");
            }
        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    else return false;
}

int main(){
    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    double tmp1=(1+sqrt(1+8*a0))/2;
    double tmp2=(1+sqrt(1+8*a3))/2;
    int zero=round(tmp1), one=round(tmp2);
    if (!de(round(tmp1),tmp1) || !de(round(tmp2),tmp2)){
           // cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
       // cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*(ptr2-ptr1);
            b2=(ptr2-ptr1)*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }

        if (!found){
            int ptr3=ptr2+(a1-b1);
            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2-1;i++){
                printf("1");
            }
            for(int i=ptr2;i<=ptr3-1;i++){
                printf("0");
            }
            printf("1");
            for(int i=ptr3+1;i<=len;i++){
                printf("0");
            }
        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[499928010]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0!=0 && a1!=0 && a2!=0 && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 && a1!=0 && a2!=0 && a3!=0){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0!=0 && a1==0 && a2==0 && a3==0){
        for(int i=1;i<=m[a0];i++){
            printf("0");
        }
    }
    else if (a0==0 && a1==0 && a2==0 && a3!=0){
         for(int i=1;i<=m[a3];i++){
            printf("1");
        }
    }
    else if (a0==0 && a1==1 && a2==0 && a3==0){
        printf("01");
    }
     else if (a0==0 && a1==0 && a2==1 && a3==0){
        printf("10");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<int,int> m;

int main(){

    int tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];
    if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
     else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*(ptr2-ptr1);
            b2=(ptr2-ptr1)*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }

        if (!found){
            int ptr3=ptr2+(a1-b1);
            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2-1;i++){
                printf("1");
            }
            for(int i=ptr2;i<=ptr3-1;i++){
                printf("0");
            }
            printf("1");
            for(int i=ptr3+1;i<=len;i++){
                printf("0");
            }
        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[1000000000]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0!=0 && a1!=0 && a2!=0 && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 && a1!=0 && a2!=0 && a3!=0){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0!=0 && a1==0 && a2==0 && a3==0){
        if (!m[a0])
            cout<<"Impossible\n";
        for(int i=1;i<=m[a0];i++){
            printf("0");
        }
    }
    else if (a0==0 && a1==0 && a2==0 && a3!=0){
         if (!m[a3])
            cout<<"Impossible\n";

         for(int i=1;i<=m[a3];i++){
            printf("1");
        }
    }
    else if (a0==0 && a1==1 && a2==0 && a3==0){
        printf("01");
    }
     else if (a0==0 && a1==0 && a2==1 && a3==0){
        printf("10");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[499928010]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0!=0 && a1!=0 && a2!=0 && a3==0){
        zero++;
        m[a3]=1;
    }
    if (a0==0 && a1!=0 && a2!=0 && a3!=0){
        one++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
    else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[1000000000]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a1!=0 || a2!=0) && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 &&( a1!=0 || a2!=0)){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
   /* else if (a0!=0 && a1==0 && a2==0 && a3==0){
        if (!m[a0])
            cout<<"Impossible\n";
        for(int i=1;i<=m[a0];i++){
            printf("0");
        }
    }
    else if (a0==0 && a1==0 && a2==0 && a3!=0){
         if (!m[a3])
            cout<<"Impossible\n";

         for(int i=1;i<=m[a3];i++){
            printf("1");
        }
    }
    else if (a0==0 && a1==1 && a2==0 && a3==0){
        printf("01");
    }
     else if (a0==0 && a1==0 && a2==1 && a3==0){
        printf("10");
    }*/

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool dp[15000][15000];
int a0,a1,a2,a3;
bool found=false;
string call(int index, int zero, int one, int b0, int b1, int b2, int b3){
    //cout<<"call index = "<<index<<endl;
    if (index==1000000)
        return "";

    if (dp[zero][one]==1)
        return "";

    int tmp0=b0+zero;
    int tmp1=b1;
    int tmp2=b2+one;
    int tmp3=b3;

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
        dp[zero][one]=1;
         return "0";
    }

    if (!(tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)){
        string s1=call(index+1,zero+1,one,tmp0,tmp1,tmp2,tmp3);
        if (found){
                 dp[zero][one]=1;
            return s1+"0";
        }
    }
    else {
         dp[zero][one]=1;
         return "";
    }

    tmp0=b0;
    tmp1=b1+zero;
    tmp2=b2;
    tmp3=b3+one;

    if (tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3){
         dp[zero][one]=1;
         return "";
    }

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         dp[zero][one]=1;
         return "1";
    }

    string s2=call(index+1,zero,one+1,tmp0,tmp1,tmp2,tmp3);

    if (found){
             dp[zero][one]=1;
        return s2+"1";
    }
     dp[zero][one]=1;
    return "";

}

int main(){
    memset(dp,0,sizeof(dp));
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    string s=call(0,0,0,0,0,0,0);

    if (s.length()==0){
        cout<<"Impossible"<<endl;
    }

    else {
        reverse(s.begin(),s.end());
        cout<<s<<endl;
    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<int,int> m;

int main(){

    int tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

      if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
     else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                for(int i=ptr3+1;i<=saveLen;i++,saveLen--){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        break;
                    }

                }
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            if (last!=-1){
                for(int i=ptr2+1;i<last;i++){
                    printf("0");
                }
                printf("1");
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");
            }

        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[499928010]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0!=0 && a1!=0 && a2!=0 && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 && a1!=0 && a2!=0 && a3!=0){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
    else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<int,int> m;

int main(){

    int tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

      if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
     else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*(ptr2-ptr1);
            b2=(ptr2-ptr1)*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }

        if (!found){
            int ptr3=ptr2+(a1-b1);
            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2-1;i++){
                printf("1");
            }
            for(int i=ptr2;i<=ptr3-1;i++){
                printf("0");
            }
            printf("1");
            for(int i=ptr3+1;i<=len;i++){
                printf("0");
            }
        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

//bool dp[15000][15000];
int a0,a1,a2,a3;
bool found=false;
string call(int index, int zero, int one, int b0, int b1, int b2, int b3){
    //cout<<"call index = "<<index<<endl;
    if (index==1000000)
        return "";

    int tmp0=b0+zero;
    int tmp1=b1;
    int tmp2=b2+one;
    int tmp3=b3;

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         return "0";
    }
    if (!(tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)){
        string s1=call(index+1,zero+1,one,tmp0,tmp1,tmp2,tmp3);
        if (found){
            return s1+"0";
        }
    }

    tmp0=b0;
    tmp1=b1+zero;
    tmp2=b2;
    tmp3=b3+one;

    if (tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)
        return "";
    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         return "1";
    }

    string s2=call(index+1,zero,one+1,tmp0,tmp1,tmp2,tmp3);

    if (found){
        return s2+"1";
    }

    return "";

}

int main(){

    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    string s=call(0,0,0,0,0,0,0);

    if (s.length()==0){
        cout<<"Impossible"<<endl;
    }

    else {
        reverse(s.begin(),s.end());
        cout<<s<<endl;
    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){

    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[4950]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
    else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                for(int i=ptr3+1;i<=saveLen;i++,saveLen--){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        break;
                    }

                }
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            if (last!=-1){
                for(int i=ptr2+1;i<last;i++){
                    printf("0");
                }
                printf("1");
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool dp[15000][15000];
int a0,a1,a2,a3;
bool found=false;
string call(int index, int zero, int one, int b0, int b1, int b2, int b3){
    //cout<<"call index = "<<index<<endl;
    if (zero== 15000 || one==15000){
        return "";
    }

    if (dp[zero][one]==1)
        return "";

    int tmp0=b0+zero;
    int tmp1=b1;
    int tmp2=b2+one;
    int tmp3=b3;

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
        dp[zero][one]=1;
         return "0";
    }

    if (!(tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)){
        string s1=call(index+1,zero+1,one,tmp0,tmp1,tmp2,tmp3);
        if (found){
                 dp[zero][one]=1;
            return s1+"0";
        }
    }
    else {
         dp[zero][one]=1;
         return "";
    }

    tmp0=b0;
    tmp1=b1+zero;
    tmp2=b2;
    tmp3=b3+one;

    if (tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3){
         dp[zero][one]=1;
         return "";
    }

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         dp[zero][one]=1;
         return "1";
    }

    string s2=call(index+1,zero,one+1,tmp0,tmp1,tmp2,tmp3);

    if (found){
             dp[zero][one]=1;
        return s2+"1";
    }
     dp[zero][one]=1;
    return "";

}

int main(){
    memset(dp,0,sizeof(dp));
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    string s=call(0,0,0,0,0,0,0);

    if (s.length()==0){
        cout<<"Impossible"<<endl;
    }

    else {
        reverse(s.begin(),s.end());
        cout<<s<<endl;
    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[499928010]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
    else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        break;
                    }

                }

            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    else return false;
}

int main(){
    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    double tmp1=(1+sqrt(1+8*a0))/2;
    double tmp2=(1+sqrt(1+8*a3))/2;
    int zero=round(tmp1), one=round(tmp2);
    if (!de(round(tmp1),tmp1) || !de(round(tmp2),tmp2)){
            cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
       // cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*(ptr2-ptr1);
            b2=(ptr2-ptr1)*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }

        if (!found){
            int ptr3=ptr2+(a1-b1);
            for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2-1;i++){
                printf("1");
            }
            for(int i=ptr2;i<=ptr3-1;i++){
                printf("0");
            }
            printf("1");
            for(int i=ptr3+1;i<=len;i++){
                printf("0");
            }
        }
        else {
             for(int i=1;i<=ptr1;i++){
                printf("0");
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");
            }
        }

    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[1000000000]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if ((a1!=0 || a2!=0) && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 &&( a1!=0 || a2!=0)){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
   /* else if (a0!=0 && a1==0 && a2==0 && a3==0){
        if (!m[a0])
            cout<<"Impossible\n";
        for(int i=1;i<=m[a0];i++){
            printf("0");
        }
    }
    else if (a0==0 && a1==0 && a2==0 && a3!=0){
         if (!m[a3])
            cout<<"Impossible\n";

         for(int i=1;i<=m[a3];i++){
            printf("1");
        }
    }
    else if (a0==0 && a1==1 && a2==0 && a3==0){
        printf("01");
    }
     else if (a0==0 && a1==0 && a2==1 && a3==0){
        printf("10");
    }*/

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[499928010]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0!=0 && a1!=0 && a2!=0 && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 && a1!=0 && a2!=0 && a3!=0){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0!=0 && a1==0 && a2==0 && a3==0){
        for(int i=1;i<=m[a0];i++){
            printf("0");
        }
    }
    else if (a0==0 && a1==0 && a2==0 && a3!=0){
         for(int i=1;i<=m[a3];i++){
            printf("1");
        }
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[499928010]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0==1 && a1==0 && a2==0 && a3==0){
        printf("00");
    }
    else if (a0==0 && a1==0 && a2==0 && a3==1){
        printf("11");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
      //  cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool de(double a, double b){
    if (abs(a-b)<0.00001)
        return true;
    if (max(a,b)/min(a,b)<1.00001)
        return true;
    else return false;
}

map<ll,ll> m;

int main(){
    int zc=0,oc=0;
    ll tmp=1, gap=2, index=2;
    while(tmp<=1000000000){
        m[tmp]=index;
       // cout<<"tmp = "<<tmp<<" - "<<m[tmp]<<endl;
        tmp+=gap;
        gap++;
        index++;
    }

    //cout<<m[1000000000]<<endl;

    int a0,a1,a2,a3;
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    int zero=m[a0], one=m[a3];

    if ((a0!=0 || a1!=0 || a2!=0) && a3==0){
        one++;
        m[a3]=1;
    }
    if (a0==0 &&( a1!=0 || a2!=0 || a3!=0)){
        zero++;
        m[a0]=1;
    }

    if (a0==0 && a1==0 && a2==0 && a3==0){
        printf("0");
    }
    else if (a0!=0 && a1==0 && a2==0 && a3==0){
        if (!m[a0])
            cout<<"Impossible\n";
        for(int i=1;i<=m[a0];i++){
            printf("0");
        }
    }
    else if (a0==0 && a1==0 && a2==0 && a3!=0){
         if (!m[a3])
            cout<<"Impossible\n";

         for(int i=1;i<=m[a3];i++){
            printf("1");
        }
    }
    else if (a0==0 && a1==1 && a2==0 && a3==0){
        printf("01");
    }
     else if (a0==0 && a1==0 && a2==1 && a3==0){
        printf("10");
    }

    else if (m[a0]==0 || m[a3]==0){
          //  cout<<"first if"<<endl;
        cout<<"Impossible"<<endl;
    }
    else if (a1+a2!=zero*one){
        //cout<<"zero "<<zero<<" one "<<one<<endl;
        cout<<"Impossible"<<endl;
    }
    else {
        bool found=false;
        int len=zero+one;
        int ptr1=zero, ptr2=zero+one;
        int b1=zero*one,b2=0;
        while(b1>a1){
            ptr1--;
            ptr2--;
            b1=ptr1*one;
            b2=one*(len-ptr2);
            if (b1==a1){
                found=true;
                break;
            }
        }
        if (b1==a1)
            found=true;
        int saveLen=len;
        if (!found){
            int last=-1;
            while(b1!=a1){
                int ptr3=ptr2;
                ptr2--;
                bool done=false;
                for(int i=ptr3+1;i<=saveLen;i++){
                    b1++;
                    if (b1==a1){
                        if (i==saveLen){
                            saveLen--;
                        }
                        else last=i;
                        done=true;
                        break;
                    }
                }
                if (!done)
                    saveLen--;
            }

            for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            if (last!=-1){
                  //  cout<<"last yes\n";
                for(int i=ptr2+1;i<last;i++){
                    printf("0");zc++;
                }
                printf("1");oc++;
                for(int i=last+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }
            else {
                for(int i=ptr2+1;i<=saveLen;i++){
                    printf("0");zc++;
                }
            }

            for(int i=saveLen+1;i<=len;i++){
                printf("1");oc++;
            }

        }
        else {
                //cout<<"last else\n";
             for(int i=1;i<=ptr1;i++){
                printf("0");zc++;
            }
            for(int i=ptr1+1;i<=ptr2;i++){
                printf("1");oc++;
            }
            for(int i=ptr2+1;i<=len;i++){
                printf("0");zc++;
            }
        }

    }

    //cout<<"zeroes = "<<zc<<" ones = "<<oc<<endl;

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

//bool dp[15000][15000];
int a0,a1,a2,a3;
bool found=false;
string call(int index, int zero, int one, int b0, int b1, int b2, int b3){
    //cout<<"call index = "<<index<<endl;
    if (index==1000000)
        return "";

    int tmp0=b0+zero;
    int tmp1=b1;
    int tmp2=b2+one;
    int tmp3=b3;

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         return "0";
    }
    if (!(tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)){
        string s1=call(index+1,zero+1,one,tmp0,tmp1,tmp2,tmp3);
        if (found){
            return s1+"0";
        }
    }

    tmp0=b0;
    tmp1=b1+zero;
    tmp2=b2;
    tmp3=b3+one;

    if (tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)
        return "";
    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         return "1";
    }

    string s2=call(index+1,zero,one+1,tmp0,tmp1,tmp2,tmp3);

    if (found){
        return s2+"1";
    }

    return "";

}

int main(){

    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    string s=call(0,0,0,0,0,0,0);

    if (s.length()==0){
        cout<<"impossible"<<endl;
    }

    else {
        reverse(s.begin(),s.end());
        cout<<s<<endl;
    }

}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

bool dp[15000][15000];
int a0,a1,a2,a3;
bool found=false;
string call(int index, int zero, int one, int b0, int b1, int b2, int b3){
    //cout<<"call index = "<<index<<endl;
    if (zero== 15000 || one==15000){
        dp[zero][one]=1;
        return "";
    }

    if (dp[zero][one]==1)
        return "";

    int tmp0=b0+zero;
    int tmp1=b1;
    int tmp2=b2+one;
    int tmp3=b3;

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
        dp[zero][one]=1;
         return "0";
    }

    if (!(tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3)){
        string s1=call(index+1,zero+1,one,tmp0,tmp1,tmp2,tmp3);
        if (found){
                 dp[zero][one]=1;
            return s1+"0";
        }
    }
    else {
         dp[zero][one]=1;
         return "";
    }

    tmp0=b0;
    tmp1=b1+zero;
    tmp2=b2;
    tmp3=b3+one;

    if (tmp0>a0 || tmp1>a1 || tmp2>a2 || tmp3>a3){
         dp[zero][one]=1;
         return "";
    }

    if (tmp0==a0 && tmp1==a1 && tmp2==a2 && tmp3==a3){
        found=true;
         dp[zero][one]=1;
         return "1";
    }

    string s2=call(index+1,zero,one+1,tmp0,tmp1,tmp2,tmp3);

    if (found){
             dp[zero][one]=1;
        return s2+"1";
    }
     dp[zero][one]=1;
    return "";

}

int main(){
    memset(dp,0,sizeof(dp));
    scanf("%d %d %d %d",&a0, &a1, &a2, &a3);

    string s=call(0,0,0,0,0,0,0);

    if (s.length()==0){
        cout<<"Impossible"<<endl;
    }

    else {
        reverse(s.begin(),s.end());
        cout<<s<<endl;
    }

}