Graph Statistic by Dingledooper

S=sorted
while 1:z=map(set,zip(*[iter(raw_input()[::2])]*2));[x.update(y)for x in z*2for y in z if x&y];A=S(map(''.join,map(S,z)),key=len);print A[0],A[-1]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page