#include <iostream>
using namespace std;
int main()
{
int a,b,setw();
cin>>a>>b;
cout<<left<<showbase<<hex<<setw(8)<<a<<dec<<a<<oct<<a<<endl;
cout<<hex<<b<<dec<<b<<oct<<c<<endl;
return 0;
}
using namespace std;
int main()
{
int a,b,setw();
cin>>a>>b;
cout<<left<<showbase<<hex<<setw(8)<<a<<dec<<a<<oct<<a<<endl;
cout<<hex<<b<<dec<<b<<oct<<c<<endl;
return 0;
}