CF1829A.Love Story

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Love Story

Timur loves codeforces. That's why he has a string ss having length 1010 made containing only lowercase Latin letters. Timur wants to know how many indices string ss differs from the string "codeforces".

For example string s=s = "coolforsez" differs from "codeforces" in 44 indices, shown in bold.

Help Timur by finding the number of indices where string ss differs from "codeforces".

Note that you can't reorder the characters in the string ss.

Input

The first line contains a single integer tt (1t10001 \leq t \leq 1000) — the number of test cases.

Each test case is one line and contains the string ss, consisting of exactly 1010 lowercase Latin characters.

Output

For each test case, output a single integer — the number of indices where string ss differs.

Samples

5
coolforsez
cadafurcie
codeforces
paiuforces
forcescode
4
5
0
4
9

在线编程 IDE

建议全屏模式获得最佳体验