Problem C

면접 대비

시간 제한1초메모리 제한2048 MB

요약
각 단어에서 c를 뒤에 오는 글자에 따라 k 또는 s로 바꾸고, ch는 c로 바꾼다.
난이도

쉬움10점 중 3점

유형
문자열, 구현, 시뮬레이션
정답자
아직 제출이 없습니다

문제

The English language is infamous for having an inconsistent spelling system. One feature in the spelling system that you are interested in is the usage of the letter c. The letter c can be pronounced in multiple different ways, which might be confusing for the speaker. However, there are some simplified patterns to help speakers determine which pronunciation to use.

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

You are given NN words: S_1,S_2,…,S_NS\_1, S\_2, \dots , S\_N. For each given word, simplify the spelling system by replacing every occurence of c into k or s (for the sound ⟨k⟩ and ⟨s⟩ respectively) according to the patterns above and every occurence of ch into c.

입력

The first line consists of an integer NN (1≤N≤1001 ≤ N ≤ 100).

Each of the next NN lines consists of a string S_iS\_i. String S_iS\_i consists of only lowercase English letters, and its length is between 11 and 100100.

출력

For each word, output a single line containing a string that represents the simplified spelling system of string S_iS\_i according to the patterns above.

예제3

  1. 예제 1

    입력
    10
    cyan
    circle
    ceramic
    coccyx
    delicacy
    chacha
    coach
    blackjack
    church
    hiccup
    
    예상 출력
    syan
    sirkle
    seramik
    koksyx
    delikasy
    caca
    koac
    blakkjakk
    curc
    hikkup
    
  2. 예제 2

    입력
    6
    caesar
    cillian
    celtic
    character
    chef
    echelon
    
    예상 출력
    kaesar
    sillian
    seltik
    carakter
    cef
    ecelon
    
  3. 예제 3

    입력
    4
    cacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczc
    abdefghijklmnopqrstuvwxyz
    cchh
    cc
    
    예상 출력
    kakbkkkdsekfkgcsikjkkklkmknkokpkqkrksktkukvkwkxsykzk
    abdefghijklmnopqrstuvwxyz
    kch
    kk