14 lines
316 B
Python
14 lines
316 B
Python
import re
|
|
import sys
|
|
|
|
startLowerPattern = r'\b[a-ząćęłńóśźż]\w*\b'
|
|
startUpperPattern = r'\b[A-ZĄĆĘŁŃÓŚŹŻ]\w*\b'
|
|
|
|
for line in sys.stdin:
|
|
line = line.strip()
|
|
lower = re.findall(startLowerPattern, line)
|
|
upper = re.findall(startUpperPattern, line)
|
|
|
|
print(f"{len(lower)} {len(upper)}")
|
|
|