The Goldilocks principle states that something must fall within certain margins, as opposed to reaching extremes. When the effect of this principle is observed, it is referred to as the Goldilocks effect.
The Goldilocks principle is derived from the children's story "The Three Bears1" in which a little girl named Goldilocks finds a house owned by three bears. Each bear has its own preference of food and beds. After testing all three examples of both items, Goldilocks determines that one of them is always too much in one extreme (too hot or too large), one is too much in the opposite extreme (too cold or too small), and one is "just right".
The Goldilocks principle has applications across many disciplines like chemistry, biology, astrobiology, development psychology, …
Five lines containing in the following order: a value, a lower boundary, an upper boundary, a quality of values that are too low and a quality of values that are too high. You may assume that the first three values are integers and that the lower bound is less than the upper bound.
An observation that can be made about the given value. Each value in between the lower and upper bound is considered to be "just right", including the lower and upper bound themselves.
Input:
20
10
30
cold
hot
Output:
just right
Input:
10
20
30
cold
hot
Output:
too cold
Input:
30
10
20
small
large
Output:
too large