By Elder Sobrinho, UFTM Brazil
In Algelandia, the favorite pastime is the Word Search puzzles. One of these has the following characteristics:
In this context, the figure below demonstrates how the words “workshop”, “videogame” and “scanner” can occur in the game.
The first line contains three integers: 1) N that represents the number of words that we will check if there are in the game, limited by [1,100]; 2) M that represents the number of lines in the matrix, limited by [10,1000]; 3) P that represents the number of columns in the matrix, limited by [10,1000]. In addition, each N-words follows the limit: [6,100].
Depending on the existence of each N-word, inform:
Where X is the searched word, moreover, X must be in lower case.
Input Sample | Output Sample |
3 20 20 |
4 Palavra "google" inexistente |