P13687 [CodeChef] sislove
NOI
题目描述

Neha is a cute little sweet girl and considers herself as one of the luckiest girls in the world for having a caring and supporting family especially her cute little younger sister Shreya. But one fine day, due to the harsh side of fate, she loses her family in a car accident.
She stays depressed and sadistic for days and days. Then one day she finally realizes that she has responsibilities in life, to keep her sister happy and make her a successful person. She decides to get a job to be able to pay for her kindergarten fees and basic amenities in their lives.
But the sad part is that she has just started her job so she cannot devote her much time. So she decided to teach Shreya the basic number names in free time. Before leaving for her job everyday, she gives her homework daily and evaluates it at night after coming back from her job.
Shreya is an intelligent girl but still since no one is perfect, she makes exactly one mistake in every single digit number name she writes.
Considering yourself as Neha. Your task is to correct all the words and print them preserving the order for the same.Assume that the word length is always correct. It is guaranteed that each letter she wrote is in lower-case, having exactly one mistake, and has a unique interpretation.

Input

The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
Next T lines consist of a word W that Shreya writes in her homework notebook.

Output

For each test case, print the numerical value of the CORRECTED word.

Example
Input:
3
owe
seren
rix

Output:
1
7
6

Explanation
Example case 1.
Consider the word owe . The correct spelling corresponds to one and the numerical value is 1.
Example case 2.
Prior to the previous example, seren correspond to seven which is numerically represented 7.

输入格式

见题面

输出格式

见题面

样例输入
3 owe seren rix
样例输出
1 7 6