var s="0"*8 while(1>0)println{s=(s,readLine).zipped.map(_ max _);s}