var n,p:word=100;begin repeat read(n);writeln(n mod(p*p*p)div(p*p),^`,n mod p,^`,n div(p*p*p),^`,n mod(p*p)div p)until 1=0end.