<s> import re <EOL> def get_pars ( text ) : <EOL> pars = re . findall ( r'<STR_LIT>' , text ) <EOL> pars = [ p . strip ( ) for p in pars ] <EOL> return pars <EOL> def get_claims ( text ) : <EOL> claims = re . findall ( r'<STR_LIT>' , text , re . IGNORECASE ) <EOL> return claims <EOL> def get_claim_body ( text ) : <EOL> match = re . search ( r'<STR_LIT>' , text , re . IGNORECASE | re . MULTILINE ) <EOL> try : <EOL> claim = match . string [ match . span ( ) [ <NUM_LIT:0> ] : ] <EOL> claim = claim . replace ( '<STR_LIT:*>' , '<STR_LIT>' ) <EOL> return claim <EOL> except ( AttributeError ) : <EOL> return '<STR_LIT:none>' <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import sys <EOL> text = sys . stdin . read ( ) <EOL> for p in get_pars ( text ) : <EOL> print '<STR_LIT>' <EOL> print p <EOL> for p in get_claims ( text ) : <EOL> print '<STR_LIT>' <EOL> print p <EOL> print '<STR_LIT>' <EOL> print get_claim_body ( text ) </s>
