unittest
{
//	assert( [ "3 3 1 1" ].parse.expand.solve == "100\n010\n001" );
	assert( [ "3 3 1 1" ].parse.expand.solve == "011\n100\n100" );
//	assert( [ "1 5 2 0" ].parse.expand.solve == "01010" );
	assert( [ "1 5 2 0" ].parse.expand.solve == "11000" );
	
	assert( [ "4 3 1 2" ].parse.expand.solve == "011\n011\n100\n100" );					// 追加ケース
	assert( [ "4 4 1 2" ].parse.expand.solve == "0111\n0111\n1000\n1000" );				// 追加ケース
	assert( [ "5 4 1 1" ].parse.expand.solve == "0111\n1000\n1000\n1000\n1000" );		// 追加ケース
}

import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto hwab = input.front.split.to!( long[] );
	return tuple( hwab[ 0 ], hwab[ 1 ], hwab[ 2 ], hwab[ 3 ] );
}

auto solve( long h, long w, long a, long b )
{
	const CS = [ '0', '1' ];
	auto mss = new char[][]( h, w );
	foreach( y, ref ms; mss )
	{
		foreach( x, ref m; ms )
		{
			m = CS[ ( y < b ) ^ ( x < a ) ];
		}
	}
	return mss.join( "\n" );
}
