#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i,m;string a,b;
	ofstream out("Beat.bin",ios::app);
	cin>>a;
	for(i=0;i<a.size();i++){
		b="";
		n=a[i];
		while(n){
			b+=('0'+n%2);
			n/=2;
		}
		reverse(a.begin(),a.end());
		out<<b<<" ";
		for(n=0;n<b.size();n++){
			printf("%c",b[n]);
		}
		putchar(' ');
	}
	out<<"end";
	return 0;
}
//1.2