This page is still under construction.

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

Printing Snails - Square

Interview

Time limit1sMemory limit512 MB

Summary
Given N, print a hollow N by N square outline of snail symbols, N+2 snails on the top and bottom lines and two snails per middle line.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

Print N+2N+2 snails on the first line and on line N+2N+2.

For lines 2 through N+1N+1, print 22 snails and NN spaces.

Input

The first line gives an integer NN (1≤N≤1001 \leq N \leq 100).

Output

Print snails in order from line 1 through line N+2N+2.

Examples2

  1. Example 1

    Input
    1
    
    Expected output
    @@@
    @ @
    @@@
    
  2. Example 2

    Input
    3
    
    Expected output
    @@@@@
    @   @
    @   @
    @   @
    @@@@@