q = io.read("*n", "*l") for iq = 1, q do s = io.read():match("Hitsuji ga (%d+) hiki") s = tonumber(s) + 1 print("Hitsuji ga " .. s .. " hiki") end