#include <iostream>
using namespace std;

#define H1 (10)
#define H2 (10*10)
#define H3 (10*10*10)
#define H4 (10*10*10*10)
#define H5 (10*10*10*10*10)

int n;

int main() {
    cin >> n;

    cout << n/H5 << " ";
    cout << ((n/H4)%10) << " ";
    cout << ((n/H3)%10) << " ";
    cout << ((n/H2)%10) << " ";
    cout << ((n/H1)%10) << " ";
    cout << (n%10) << endl;
}