i:0;9K.times{c:stdin.get_s(1);i+=c>" "?1:0;c>" "&&i%10<1||print(c);}