Under construction

Still being built. Things may change

Censor

Interview

Time limit1sMemory limit128 MB

Summary
Read n lines of space-separated words and replace every word of exactly four letters with ****, printing a blank line between consecutive output lines.
Level

Easy3 of 10

Topics
String, Implementation, Simulation
Solved
No attempts yet

Problem

In a chat window, any user can type lines of text, and what they type is transmitted to every other user. To keep the conversation clean, every four-letter word must be filtered out of each transmitted line.

Write a program that reads several lines of text and replaces every four-letter word (a word made of exactly four letters) with four asterisks (****).

Input

The first line contains a single integer nn, the number of text lines that follow.

Each of the next nn lines contains words separated by spaces. Every word consists only of letters of the alphabet, exactly one space separates adjacent words, and there are no spaces before the first word or after the last word. No line exceeds 80 characters.

Output

Print the nn processed lines, with every four-letter word replaced by ****. Separate consecutive output lines with a single blank line.

As shown in the sample, each word - including the last word on a line - is followed by a single space, so every output line ends with a trailing space.

Examples3

  1. Example 1

    Input
    2
    The quick brown fox jumps over the lazy dog
    Now is the time for all good people to come to the aid of the party
    
    Expected output
    The quick brown fox jumps **** the **** dog 
    
    Now is the **** for all **** people to **** to the aid of the party 
    
  2. Example 2

    Input
    1
    this word test only fear
    
    Expected output
    **** **** **** **** **** 
    
  3. Example 3

    Input
    1
    I am the big cat
    
    Expected output
    I am the big cat