#include <bits/stdc++.h>
using namespace std;
string m = "0123456789ABCDEF";
void change(int num)
{
cout << m[num / 16] << m[num % 16] << " ";
}
int main()
{
unsigned long long n;
cin >> n;
if (!n)
cout << "00";
else
{
while (n)
{
int num = n % 128;
n /= 128;
if (n == 0)
change(num);
else
change(num + 128);
}
}
return 0;
}