#K80792. Valid Paragraph Checker

    ID: 35609 Type: Default 1000ms 256MiB

Valid Paragraph Checker

Valid Paragraph Checker

You are given a paragraph as a single line string. Your task is to determine whether the paragraph is valid according to the following rules:

1. The paragraph must contain at least two sentences.
2. Each sentence must start with an uppercase letter.
3. Each sentence must end with one of the following punctuation marks: period (.), question mark (?), or exclamation point (!).
4. There must be at least one space between sentences (i.e. after the punctuation of one sentence before the next sentence begins).

Formally, if we denote the set of punctuation marks as (P = {.,\ ?,\ !}), then for every sentence (s) in the paragraph, it must satisfy:
(s[0] \in \text{Uppercase Letters}) and (s[|s|-1] \in P).

Output True if the paragraph meets all the conditions, otherwise output False.

inputFormat

A single line input containing the paragraph string.

outputFormat

Output a single line: True if the paragraph is valid; otherwise, output False.## sample

Hello.
False