11 lines
214 B
Python
11 lines
214 B
Python
|
import re
|
||
|
import sys
|
||
|
|
||
|
pattern = re.compile(r"(^.*( )[Pp]ies( ).*$)|(^[pP]ies( ).*$)|(^.*( )[pP]ies$|(^pies$))")
|
||
|
|
||
|
|
||
|
for line in sys.stdin:
|
||
|
x = re.findall(pattern, line)
|
||
|
if x:
|
||
|
print(line.rstrip('\n'))
|