Given a dictionary of words and a pair of words.
For the pair, display the possible word chain using the input as the starting and ending words.
Print all words in upper case, except the one letter that has changed between words.
If either word is not in the dictionary or there is no chain of words, print an appropriate error message.
Two words are connected if there is one letter that differs and the rest are the same.
For example, MALE connects to MILE (second letter, A to I), but not LIME (first and third letters are different).
Here is a sample word ladder for MALL to BENT:
MALL
BALL
BELL
BELT
BENT
For determining connected words and finding a word chain, describe the runtime for each operation in terms of number of words (N) and letters (L).
This is a classic Word Ladder problem: given a dictionary and a start/end pair, find a valid chain where each step changes exactly one letter, or report an error if the words are missing or no chain exists. The natural approach is to model words as graph nodes and use BFS to find a path, with adjacency defined by one-letter difference. The complexity discussion centers on the number of words N and word length L, especially for neighbor checks and graph traversal.