{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"Brain Station-23 will give you a string x and there will be z queries. Queries can be two types: \u003cbr\u003e\n\nType 1: 1 a p \u003cbr\u003e\nType 2: 2 m n k \u003cbr\u003e\n\nIn Type 1: a-th character will be turned into p.\u003cbr\u003e\nIn Type 2: Output the number of times k happens in x as a substring of x starting from m to n inclusive. "}},{"title":"Input","value":{"format":"HTML","content":"First line will contain x(1 ≤ |x| ≤ 10^5).\u003cbr\u003e\nSecond line will contain z(1 ≤ z ≤ 10^5).\u003cbr\u003e\nNext z lines will contain any of two types queries.\u003cbr\u003e\u003cbr\u003e\n\n1 ≤ a ≤ |x|\u003cbr\u003e\n1 ≤ m ≤ n ≤ |x|\u003cbr\u003e\u003cbr\u003e \n\nThe sum of all |k| is at most 10^5\u003cbr\u003e\nEvery string is 1-indexed"}},{"title":"Output","value":{"format":"HTML","content":"For each type 2, show the output in separate lines."}},{"title":"Sample 1","value":{"format":"HTML","content":"abcdcbc\u003cbr\u003e\n5\u003cbr\u003e\n2 1 7 bc\u003cbr\u003e\n1 4 b\u003cbr\u003e\n2 4 7 bc\u003cbr\u003e\n1 2 a\u003cbr\u003e\n2 1 4 aa\u003cbr\u003e"}},{"title":"Sample 2","value":{"format":"HTML","content":"2\u003cbr\u003e\n2\u003cbr\u003e\n1\u003cbr\u003e"}}]}