#include <iostream>
#include <bitset>

using namespace std;

int rotate(int num);
long rotate(long num);

int main(){
	int num = 256;
	for (int i = 0; i < 32; i++){
		cout << static_cast<bitset<32> >(num) << std::endl;
		num = rotate(num);
	}
	
	cout << endl;
	
	int lnum= 256;
	for (int i = 0; i < 32; i++){
		cout << static_cast<bitset<32> >(lnum) << std::endl;
		lnum = rotate(lnum);
	}
	
	return 0;
}
	

int rotate(int num)
{
	return (num & (1 << (sizeof(int) * 8 - 1)) ? 1:0) | (num << 1);
}

long rotate(long num)
{
	return (num & (1 << (sizeof(long) * 8 - 1) ? 1:0)) | (num << 1);
}
