|A rectangular table of strings is formed by giving
each row and each column a label. Each label consists
of one or more uppercase letters. The
string in any row and column of the table is just
the column label
appended to the row label. Here is an example with
2 rows and 3 columns
X XX XXX
ABC ABCX ABCXX ABCXXX
D DX DXX DXXX
The problem is that we are given the table entries, but
don't know what the row and column labels are.
Given a String table, return a String containing
the column labels in left to right order, followed by the row labels in top to bottom order.
If there is no way to assign non-empty labels to the table,
or if there are multiple ways to assign them,
return a String with just one element,
"none" or"multiple" (in lowercase, without the quotes).
The i-th element of table will give the i-th row of the table (i=0 is
the top row), with
adjacent entries separated by one or more spaces. It may have leading
or trailing spaces.