Find parts of a 2d grid matching a 2d word.
Illustrate the matching areas of the haystack by printing a grid of the same size. In locations that are part of at least one match, print the original character from the haystack. In other cases, print a full-stop "." character.
3 3ghilmnqrs5 5abcdefghijklmnopqrstuvwxy
..... .ghi. .lmn. .qrs. .....
1 2ab6 4abbabaababbabaababbabaab
ab.. ..ab ab.. ..ab ab.. ..ab
4 1nana7 6ananannananaananannananaananannananabatman
.n.n.n nanana ananan nanana ananan .a.ana ....a.
2 2oooo5 5xoooooxoooooxoooooxooooox
..ooo ..ooo oo.oo ooo.. ooo..