#include <iostream>
#include <iomanip>
using namespace std;
int main() {
unsigned long address = 0;
char c;
cout << hex << setfill('0');
while( cin.good() )
{
int nread;
char buf[16];
for( nread = 0; nread < 16 && cin.get(buf[nread]); nread++ );
if( nread == 0 ) break;
// Show the address
cout << setw(8) << address;
// Show the hex codes
for( int i = 0; i < 16; i++ )
{
if( i % 8 == 0 ) cout << ' ';
if( i < nread )
cout << ' ' << setw(2) << (unsigned)buf[i];
else
cout << " ";
}
cout << " ";
for( int i = 0; i < nread; i++)
{
if( buf[i] < 32 ) cout << '.';
else cout << buf[i];
}
cout << "\n";
address += 16;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIHVuc2lnbmVkIGxvbmcgYWRkcmVzcyA9IDA7CiAgICBjaGFyIGM7CiAgICAKICAgIGNvdXQgPDwgaGV4IDw8IHNldGZpbGwoJzAnKTsKICAgIHdoaWxlKCBjaW4uZ29vZCgpICkKICAgIHsKICAgICAgICBpbnQgbnJlYWQ7CiAgICAgICAgY2hhciBidWZbMTZdOwogICAgICAgIAogICAgICAgIGZvciggbnJlYWQgPSAwOyBucmVhZCA8IDE2ICYmIGNpbi5nZXQoYnVmW25yZWFkXSk7IG5yZWFkKysgKTsKICAgICAgICBpZiggbnJlYWQgPT0gMCApIGJyZWFrOwogICAgICAgIAogICAgICAgIC8vIFNob3cgdGhlIGFkZHJlc3MKICAgICAgICBjb3V0IDw8IHNldHcoOCkgPDwgYWRkcmVzczsKCiAgICAgICAgLy8gU2hvdyB0aGUgaGV4IGNvZGVzCiAgICAgICAgZm9yKCBpbnQgaSA9IDA7IGkgPCAxNjsgaSsrICkKICAgICAgICB7CiAgICAgICAgICAgIGlmKCBpICUgOCA9PSAwICkgY291dCA8PCAnICc7CgkgICAgICAgIGlmKCBpIDwgbnJlYWQgKQogICAgICAgICAgICAgICAgY291dCA8PCAnICcgPDwgc2V0dygyKSA8PCAodW5zaWduZWQpYnVmW2ldOwogICAgICAgICAgICBlbHNlIAogICAgICAgICAgICAgICAgY291dCA8PCAiICAgIjsKICAgICAgICB9CgogICAgICAgIGNvdXQgPDwgIiAgIjsKICAgICAgICBmb3IoIGludCBpID0gMDsgaSA8IG5yZWFkOyBpKyspCiAgICAgICAgewogICAgICAgICAgICBpZiggYnVmW2ldIDwgMzIgKSBjb3V0IDw8ICcuJzsKICAgICAgICAgICAgZWxzZSBjb3V0IDw8IGJ1ZltpXTsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgY291dCA8PCAiXG4iOwogICAgICAgIGFkZHJlc3MgKz0gMTY7CiAgICB9CglyZXR1cm4gMDsKfQ==