#include<bits/stdc++.h> using namespace std; int main(){ int n,b,g,s; cin>>n; b=n/100; s=n%100/10; g=n%10; cout<<g<<" "<<s<<" "<<b; return 0; }