#include <iostream>
#include <iomanip>
#include <algorithm>
#include <bitset>

using namespace std;


int main(int argc, char * argv[])
{
    string s;
    cin >> s;
    if (s.size() != 8)
    {
        cerr << "Wrong length\n";
        return 1;
    }
    unsigned long long x = *reinterpret_cast<const unsigned long long*>(s.c_str());

    // Если в обратном порядке:

    reverse(s.begin(),s.end());
    unsigned long long y = *reinterpret_cast<const unsigned long long*>(s.c_str());

    // Шестнадцатеричная

    cout << hex << x << "  " << y << endl;

    // Десятичная:
    
    cout << dec << x << "   " << y << endl;

    // Двоичная:
    
    cout << bitset<64>(x) << "   " << bitset<64>(y) << endl;

}
