Under construction

Still being built. Things may change

Problem C

Interview

Time limit1sMemory limit2048 MB

Summary
Given N words, replace each c with k or s by its English pronunciation rule, and replace each ch with c.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

The English language is notorious for its inconsistent spelling system. This problem focuses on the letter c. The letter c can be pronounced in several ways, which can confuse learners. Still, a few simple patterns help speakers choose the right pronunciation.

  • It is pronounced as ⟨k⟩ if it is followed by a, o, or u, if it is followed by a consonant letter other than h and y, or if it is at the end of a word. Consonant letters are the English letters other than the vowel letters a, e, i, o, and u.
  • It is pronounced as ⟨s⟩ if it is followed by e, i, or y.
  • The adjacent pair ch has a unique sound ⟨c⟩.

You are given NN words S1,S2,…,SNS_1, S_2, \dots, S_N. For each word, replace every c with k or s according to the patterns above, and replace every ch with c.

Input

The first line contains an integer NN (1≤N≤1001 \le N \le 100). Each of the next NN lines contains a string SiS_i. SiS_i consists of only lowercase English letters, and its length is between 1 and 100.

Output

For each word, output one line containing the simplified spelling of SiS_i under the patterns above.

Examples3

  1. Example 1

    Input
    10
    cyan
    circle
    ceramic
    coccyx
    delicacy
    chacha
    coach
    blackjack
    church
    hiccup
    
    Expected output
    syan
    sirkle
    seramik
    koksyx
    delikasy
    caca
    koac
    blakkjakk
    curc
    hikkup
    
  2. Example 2

    Input
    6
    caesar
    cillian
    celtic
    character
    chef
    echelon
    
    Expected output
    kaesar
    sillian
    seltik
    carakter
    cef
    ecelon
    
  3. Example 3

    Input
    4
    cacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczc
    abdefghijklmnopqrstuvwxyz
    cchh
    cc
    
    Expected output
    kakbkkkdsekfkgcsikjkkklkmknkokpkqkrksktkukvkwkxsykzk
    abdefghijklmnopqrstuvwxyz
    kch
    kk