17 lines
349 B
Plaintext
17 lines
349 B
Plaintext
|
#!/usr/bin/python3
|
||
|
|
||
|
import sys
|
||
|
import re
|
||
|
|
||
|
for input in sys.stdin.readlines():
|
||
|
answer = re.findall('([\W]|^)[a-ząćęłńóśźż][\w]*',input)
|
||
|
if answer:
|
||
|
print(str(len(answer))+" ", end="")
|
||
|
else:
|
||
|
print("0 ", end="")
|
||
|
answer = re.findall('([\W]|^)[A-ZĄĆĘŁŃÓŚŹŻ][\w]*',input)
|
||
|
if answer:
|
||
|
print(str(len(answer)))
|
||
|
else:
|
||
|
print("0")
|