#include <iostream>
using namespace std;

template <class T>
void binaryDump(T num, T mask)
{
	if (mask)
	{
		cout << ((num&mask) ? "1" : "0");
		binaryDump(num, abs(mask >> 1));
	}
	else
		cout << endl;
}

int main() {
	union {
		float flt;
		long lng;
	} x;
	union {
		double dbl;
		long long lng;
	} y;

	cin >> x.flt;
	cout << x.flt << " is\n31      23      15      7      0" << endl;
	binaryDump(x.lng, 1L << 31);

	cout << endl;

	cin >> y.dbl;
	cout << y.dbl << " is\n63      55      47      39      31      23      15      7      0" << endl;
	binaryDump(y.lng, 1LL << 63);

	return 0;
}