// Fresh Peach Heart Shower
#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define MP std::make_pair
#define ALL(x) (x).begin(),(x).end()
#define mem(x,y) memset(x,y,sizeof(x))
#ifdef _LOCAL_
#define dprintf(x...) fprintf(stderr,x)
#else
#define dprintf(x...) 42
#endif
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,b,a) for(int i=(b);i>=(a);--i)
typedef std::vector<int > poly;
typedef std::pair<int,int > pii;
void setIn(std::string s){freopen(s.c_str(),"r",stdin);}
void setOut(std::string s){freopen(s.c_str(),"w",stdout);}
void setIO(std::string s){setIn(s+".in"),setOut(s+".out");}
template <class t> inline bool ckmin(t&x,t y){if(x>y)return x=y,1;return 0;}
template <class t> inline bool ckmax(t&x,t y){if(x<y)return x=y,1;return 0;}
inline int lowbit(int x){return x&(-x);}
std::random_device RDS;
std::mt19937_64 rnd(RDS());
int getrand(int l,int r)
{
	assert(l<=r);
	return rnd()%(r-l+1)+l;
}
signed main(void)
{
#ifndef _LOCAL_
	std::ios::sync_with_stdio(false),std::cin.tie(0);
#endif
	
	setOut("plant.in");

	int t=5;
	std::cout<<t<<' '<<1<<'\n';
	while(t--)
	{
		int n=1000,m=1000;
		std::cout<<n<<' '<<m<<' '<<1<<' '<<1<<'\n';
		rep(i,1,n)
		{
			rep(j,1,m)std::cout<<(getrand(0,9)<8?0:1);
			std::cout<<'\n';
		}
	}

	return 0;
}


