This page is still under construction.

Parts of this page are still being built. What you see may change.

Trident

Time limit1sMemory limit128 MB

Summary
Print an ASCII trident with t tine rows, a crossbar, and h handle rows, using spacing s between the tines.
Level

Easy2 of 10

Topics
Implementation, String, Simulation, Brute force
Solved
No attempts yet

Problem

A trident is a fork with three tines (prongs). A simple picture of a trident can be drawn using only asterisks (*) and spaces:

*  *  *
*  *  *
*  *  *
*******
   *
   *
   *
   *

In this picture each tine is a vertical column of 3 asterisks, and consecutive tines are separated by 2 spaces. The handle is a vertical column of 4 asterisks below the middle tine.

By changing three values tt, ss, and hh you can draw tridents of different shapes: tt is the height of the tines, ss is the spacing between tines, and hh is the length of the handle. The picture above corresponds to t=3t = 3, s=2s = 2, and h=4h = 4.

Write a program that prints the trident described by tt, ss, and hh.

Input

Three integers tt, ss, and hh are given, one per line, in this order. Each of the three values is between 0 and 10, inclusive.

Output

Print the trident described by tt, ss, and hh. From top to bottom it consists of tt tine rows, a single crossbar row that joins the tines, and hh handle rows.

  • A tine row: 3 asterisks, each adjacent pair separated by ss spaces.
  • The crossbar row: 2s+32s + 3 asterisks.
  • A handle row: s+1s + 1 spaces followed by a single asterisk (below the middle tine).

Do not print any trailing spaces after the last asterisk on a line.

Examples3

  1. Example 1

    Input
    4
    3
    2
    
    Expected output
    *   *   *
    *   *   *
    *   *   *
    *   *   *
    *********
        *
        *
    
  2. Example 2

    Input
    3
    2
    4
    
    Expected output
    *  *  *
    *  *  *
    *  *  *
    *******
       *
       *
       *
       *
    
  3. Example 3

    Input
    5
    0
    5
    
    Expected output
    ***
    ***
    ***
    ***
    ***
    ***
     *
     *
     *
     *
     *