This code finds every path that forms a word in the puzzle. Please checkout the examples in the input.
To compile, please run:
javac Main.java
End then execute the Main script:
java Main inputs/puzzle1
And the results will be shown in the terminal.