Angry Grammar Stickler

No attempts yetTime limit1sMemory limit256 MB

Problem

Your friend spends his days correcting other people's English on internet forums. He has a short temper, and badly written sentences set him off. To stop him from breaking another keyboard, you told him to put the page down and count out loud from 1 to 10 every time he gets angry. Each fit of anger therefore costs him exactly ten spoken numbers.

He gets angry at the following.

  • The word u or the word ur, written instead of you or your.
  • The two words would of or should of in a row, written instead of would have or should have.
  • Any word that contains lol as a substring, written instead of haha.

Each word is judged on its own. A word that contains lol more than once still angers him only once. The two-word rule applies once for every position where would or should is immediately followed by of.

Write a program that reads sentences one by one and reports, for each sentence, how many numbers your friend speaks while reading it.

Input

The first line contains the number of sentences TT. Each of the next TT lines contains one sentence, made of one or more words separated by single spaces.

  • 0<T500 < T \le 50
  • A sentence is at most 100 characters long, spaces included.
  • A word consists only of lowercase letters from a to z.
  • Two adjacent words are separated by exactly one space, and a sentence has no leading or trailing space.

Output

For each sentence, print on its own line how many numbers your friend speaks while reading it. That value is ten times the number of fits of anger.