for(;l=readline().replace(/V/g,123).length;print())for(;l>1;)putstr(l-->4?(l-=4)?'V':'IV':'I')