push@d,($\+=$d[-$`])%=998244353for<>!~$"..($`>++$\)*$';print