print(""++io.Source.stdin replaceAll("(...)( .[^ o] ) "," $2$1"))