Programming contests

ACM ICPC programozó csapatverseny, házi forduló, 2018. október 31.

October 31, 2018, 10:10 AM – October 31, 2018, 3:10 PM

Vera and ABCDE

When Vera was learning English, she had 5 types of toy blocks, one for each of the first 5 uppercase letters. A block can be represented as a 5 × 3 grid with characters . and *. The 5 types of blocks look like the following:

*** *** *** *** ***
*.* *.* *.. *.* *..
*** *** *.. *.* ***
*.* *.* *.. *.* *..
*.* *** *** *** ***

Vera has a word S with N letters and wonders what the corresponding sequence of blocks look like when arranged in a row.

Input Specification

Line 1 contains integer N (1 ≤ N ≤ 2017).

Line 2 contains string S of length N and consists of only letters A, B, C, D, E.

Output Specification

Print 5 lines, each with 3N characters, the corresponding sequence of blocks.

Sample Input 1

  1. 5
  2. ABCDE
download as text file

Output for Sample Input 1

  1. ***************
  2. *.**.**..*.**..
  3. *******..*.****
  4. *.**.**..*.**..
  5. *.*************
download as text file

Sample Input 2

  1. 10
  2. ECADBECADB
download as text file

Output for Sample Input 2

  1. ******************************
  2. *..*..*.**.**.**..*..*.**.**.*
  3. ****..****.********..****.****
  4. *..*..*.**.**.**..*..*.**.**.*
  5. *******.**************.*******
download as text file
University of Debrecen; Faculty of Informatics; v. 09/30/2024