Application List

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

요약
프로그램 이름 목록이 주어질 때 a부터 z까지 각 글자로 시작하는 이름이 있는지 표시하고, 그 결과를 5행 6열 격자로 출력한다.
난이도

쉬움10점 중 2점

유형
문자열, 구현, 배열
정답자
아직 제출이 없습니다

문제

In a distant land, there lived a wise elder who was the keeper of all computer programs that ever existed. One day, the ruler of the land decreed to create a list all the programs, and the elder decided to do it by creating an Application List that would display the presence or absence of various applications.

He turned to you for help in this important task. You are given a list of programs with names consisting of lowercase English letters.

Your task is to fill a table of five rows and six columns. The first 26 cells of the table correspond to letters "a", "b", ..., "z" in alphabetic order. The last four cells are empty. Each cell contains the corresponding letter if there is at least one program in the list whose name starts with that letter. If there are no such programs, a dot should be placed instead.

입력

The first line contains an integer nn: the number of programs (0≤n≤1000 \le n \le 100). Next, there are nn lines listing the program names. Each name contains from 11 to 2020 lowercase English letters.

출력

Output the Application List in the format described above: five lines with letters and dots, without spaces between them. The first four lines must contain six characters each. The last line must contain two characters.

예제1

  1. 예제 1

    입력
    10
    apple
    banana
    cherry
    date
    eggplant
    fig
    grape
    kiwi
    lemon
    mango
    
    예상 출력
    abcdef
    g...kl
    m.....
    ......
    ..