#K851. String Keyword Checker
String Keyword Checker
String Keyword Checker
You are given a string s
. Your task is to check whether the string contains certain keywords and print an appropriate message.
The rules are as follows:
- If the string contains the substring
hello
, printPresent
. - If the string does not contain
hello
but contains the substringworld
, printAbsent
. - If the string contains neither
hello
norworld
, printNot Found
.
Note that if the string contains both hello
and world
, the presence of hello
takes precedence and the output should be Present
.
Input/Output: The input will be provided via standard input and the output should be printed to standard output.
Make sure to follow the rules exactly to pass all the test cases.
inputFormat
The input is a single string s
provided via standard input. The string may contain spaces and punctuation.
outputFormat
Print one of the following messages to standard output based on the conditions:
Present
Absent
Not Found
hellothere
Present
</p>