m='' while~0:m=map(max,m,raw_input());print`m`[2::5]