Count how many times the 19 character string welcome to code jam appears as a subsequence of a given text.
To be precise, let t be the text and consider an index sequence s with s[0]<s[1]<⋯<s[18]. Count the sequences s for which concatenating t[s[0]], t[s[1]], ..., t[s[18]] in that order gives exactly welcome to code jam. Two sequences that pick the same letters from different positions count separately.
The answer can be huge, so print only its last four digits.