CF1915D.Unnatural Language Processing

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

Unnatural Language Processing

Lura was bored and decided to make a simple language using the five letters a, b, c, d, e. There are two types of letters:

  • vowels — the letters a and e. They are represented by V\textsf{V}.
  • consonants — the letters b, c, and d. They are represented by C\textsf{C}.

There are two types of syllables in the language: CV\textsf{CV} (consonant followed by vowel) or CVC\textsf{CVC} (vowel with consonant before and after). For example, ba, ced, bab are syllables, but aa, eda, baba are not.

A word in the language is a sequence of syllables. Lura has written a word in the language, but she doesn't know how to split it into syllables. Help her break the word into syllables.

For example, given the word bacedbab, it would be split into syllables as ba.ced.bab (the dot . represents a syllable boundary).

Input

The input consists of multiple test cases. The first line contains an integer tt (1t1001 \leq t \leq 100) — the number of test cases. The description of the test cases follows.

The first line of each test case contains an integer nn (1n21051 \leq n \leq 2 \cdot 10^5) — the length of the word.

The second line of each test case contains a string consisting of nn lowercase Latin characters  — the word.

All words given are valid words in the language; that is, they only use the letters a, b, c, d, e, and each word is made up of several syllables.

The sum of nn over all test cases does not exceed 21052 \cdot 10^5.

Output

For test case, output a string denoting the word split into syllables by inserting a dot . between every pair of adjacent syllables.

If there are multiple possible splittings, output any of them. The input is given in such a way that at least one possible splitting exists.

Samples

6
8
bacedbab
4
baba
13
daddecabeddad
3
dac
6
dacdac
22
dababbabababbabbababba
ba.ced.bab
ba.ba
dad.de.ca.bed.dad
dac
dac.dac
da.bab.ba.ba.bab.bab.ba.bab.ba

在线编程 IDE

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