#include <iostream>
using namespace std;
int main()
{
long long n;
int Z, L, A;
cin >> n;
n /= 1000000;
n %= 1000000;
Z = n % 100;
n /= 100;
L = n % 100;
n /= 100;
A = n;
if(A < 10)
cout << 0;
cout << A << " ";
if(L < 10)
cout << 0;
cout << L << " ";
if(Z < 10)
cout << 0;
cout << Z;
return 0;
}