<s> import sys <EOL> import signal <EOL> class TimeError ( Exception ) : pass <EOL> def handler ( signum , frame ) : <EOL> raise TimeError ( ) <EOL> count = <NUM_LIT:0> <EOL> while True : <EOL> try : <EOL> signal . signal ( signal . SIGALRM , handler ) <EOL> signal . alarm ( <NUM_LIT:4> ) <EOL> line = sys . stdin . readline ( ) <EOL> sys . stderr . write ( '<STR_LIT>' % line . strip ( ) ) <EOL> sys . stderr . flush ( ) <EOL> except TimeError : <EOL> print '<STR_LIT>' <EOL> sys . stdout . flush ( ) <EOL> print >> sys . stderr , '<STR_LIT>' <EOL> sys . stderr . flush ( ) </s>
