Given two rectangular arrays, A and B, let's say that A is embedded in B if A can be obtained from B by deleting some (or none) of the rows and columns of B.
Write a program with the following I/O:
Input: two arbitrary rectangular arrays of letters (a-z), as a string from stdin.
Output: the number of embeddings of the first array in the second array, followed by a "text picture" of each embedding (showing deleted elements replaced by dots).
(This is a two dimensional generalization of my old question Is string X a subsequence of string Y?)
abb aba ababb aabba babab abbaa
output (if I haven't missed any):
5 a..bb a..ba ..... ..... ab.b. ..... ..... ab.a. ab..b ..... ..... ab..a ..... a.bb. ..... a.ba. ..... .abb. .aba. .....
The winner is the shortest such program (least number of characters).