<s> """<STR_LIT>""" <EOL> import random <EOL> def randomWords ( words , n ) : <EOL> ret_val = [ ] <EOL> for word in words : <EOL> prefix = word [ : n ] <EOL> suffix = list ( word [ n : ] ) <EOL> random . shuffle ( suffix ) <EOL> ret_val . append ( prefix + '<STR_LIT>' . join ( suffix ) ) <EOL> return ret_val <EOL> def main ( ) : <EOL> while True : <EOL> line = raw_input ( '<STR_LIT>' ) <EOL> words = line . split ( ) <EOL> if len ( words ) == <NUM_LIT:0> : <EOL> break <EOL> max_len = max ( [ len ( w ) for w in words ] ) <EOL> for n in range ( max_len ) : <EOL> print '<STR_LIT>' % ( n , '<STR_LIT:U+0020>' . join ( randomWords ( words , n ) ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) <EOL> print '<STR_LIT>' </s>
