local read, write = io.read, io.write local num, nl = '*n', '\n' local t t = read(num) while t > 0 do t = t-1 local str str = read(num) write(str[0]) end