[Question]
  [
Using only [printable ASCII](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters) (hex codes 20 to 7E), write a square N×N *core* program **without comments** that is surrounded by 4 more *[layers](https://www.youtube.com/watch?v=_bMcXVe8zIs)*, creating a (N+8)×(N+8) square program (N > 0). For N = 3 the layout (to be replaced by actual code) looks like this:
```
44444444444
43333333334
43222222234
43211111234
4321CCC1234
4321CCC1234
4321CCC1234
43211111234
43222222234
43333333334
44444444444
```
* The C's represent the core 3×3 program.
* The 1`s represent the first layer, the 2's represent the second layer, etc.
The program always takes a string of space separated integers such as `0 -1 31 -1 2 2 2` via stdin or similar (it should just be the plain numbers, no quotes or brackets or anything). The output depends on what parts of the layout were run.
There are five ways to run the program (newlines are included in the run). Each does something different to the list:
1. Run just the core:
```
CCC
CCC
CCC
```
This computes the maximum of the absolute values of the input list elements, and prints `CORE` on a new line that many times. If the max is 0 nothing is output (a newline is fine).
	* The output for `0 -1 31 -1 2 2 2` would be
	
	
	
	```
	CORE
	CORE
	...
	
	```
	
	31 times.
2. Run the core with layer 1:
```
11111
1CCC1
1CCC1
1CCC1
11111
```
This outputs the average ([arithmetic mean](http://en.wikipedia.org/wiki/Arithmetic_mean)) of the list values to standard floating point precision.
	* The output for `0 -1 31 -1 2 2 2` would be 35 / 7 = `5` (`5.0` is fine).
3. Run the core with layers 1 and 2:
```
2222222
2111112
21CCC12
21CCC12
21CCC12
2111112
2222222
```
This outputs a space separated list of the input list reversed.
	* The output for `0 -1 31 -1 2 2 2` would be `2 2 2 -1 31 -1 0`.
4. Run the core with layers 1, 2, and 3 (the pattern should be obvious).  
This outputs a space separated list of the sorted input list.
	* The output for `0 -1 31 -1 2 2 2` would be `-1 -1 0 2 2 2 31`.
5. Run the core with layers 1, 2, 3, and 4.  
This outputs a space separated list of the input list with duplicates removed, the ordering doesn't matter.
	* The output for `0 -1 31 -1 2 2 2` could be `-1 0 2 31`.
All output is to stdout or a similar alternative.
Only these 5 layout combinations have specified behavior.
### Notes
* **Comments are not allowed** in the core or layers or combinations thereof. Code that is a no-op or does nothing constructive does not count as a comment.
* Remember that the core can have any (positive) N×N dimensions, but the layers are only one character thick.
* You may assume the input has no leading or trailing spaces and exactly one space between numbers. It will always contain at least one number. (The output lists should be formatted like this too.)
* You may assume the list and calculations necessary for output won't have values that overflow (or underflow) your integers (as long as their max is something reasonable like 216).
# Scoring
Writing this program normally would be easy. Writing it with a small core is hard.
The program with the smallest core size (the smallest N) wins. In case of ties the winner is the full program (the (N+8)×(N+8) square) with the fewest distinct characters (not counting newlines).
Please report your N value at the top of your answer.
  
[Answer]
# Python 2 - N = 17, 53 characters
Oh I love source-layout challenges with Python...
```
i=4                     ;
ii=3                    ;
iii=2                   ;
iiii=1                  ;
iiiii=0;R=raw_input     ;
iiiii;w=R().split()     ;
iiiii;n=map(int,w)      ;
iiiii;S=set(n);M=max    ;
iiiii;s=sorted(n)       ;
iiiii;J="\n".join       ;
iiiii;j=" ".join        ;
iiiii;k=M(map(abs,n))   ;
iiiii;A=J(["CORE"]*k)   ;
iiiii;B=sum(n)/len(n)   ;
iiiii;C=j(w[::-1])      ;
iiiii;D=j(map(str,s))   ;
iiiii;E=j(map(str,S))   ;
iiiii;P=A,B,C,D,E       ;
iiiii;print P[i]        ;
iiiii;" /__----__\  "   ;
iiiii;"|/ (')(') \| "   ;
iiii;"  \   __   /  "   ;
iii;"   ,'--__--'.   "  ;
ii;"   /    :|    \   " ;
i;"   (_)   :|   (_)   ";
```
There's still some unused whitespace, though.
I could still improve the unique character count, but I'll stick with better readability - if there is any at all.
**Edit:** Oh, it's Stan [again](https://codegolf.stackexchange.com/a/36602/30372)!
[Answer]
## CJam, N = 5, 27 (26) unique characters
It's 26 characters if I don't count the spaces. The program could actually be converted to one that doesn't use spaces, by just filling up all empty spaces with no-ops (e.g. `_;` which duplicates the top stack element and then discards, or by sorting the array again and again), but it would just distract from the actual code.
```
l~]_|S*      
{l~]$S*      
 {l~]W%S*    
  {l~]_,\    
   {l~]{z    
    }%$W=    
    "CORE    
    "*       
         }   
   ;:+d\/ }  
  ;        } 
 ;          }
;            
```
[Test it here.](http://cjam.aditsu.net/)
The core is 
```
l~]{z
}%$W=
"CORE
"*
```
(Plus an empty line.)
I'm fairly sure that `N = 4` can't be done in CJam (and I'm sure Dennis will convince me otherwise :D). The above has 17 characters, and while it might be possible to get it down to 16 (e.g. if CJam didn't have a bug to choke on `:z`, which requires `{z}%`, or by using ARGV), I don't think you can fit it in the layout without introducing a line break within `CORE`.
All of the implementations are very straightforward solutions to the given tasks. All of them start with `l~]` which reads STDIN, evaluates it, and puts it in an array.
The previous layer is always surrounded in `{...}`, which makes it a block that isn't automatically executed. And instead of executing it, I just discard it from the stack with `;`, so no layer depends on code in the previous layer. In the Layer 1, the code didn't fit into the first line, so I continued it after discarding the core block.
Now for the actual programs:
* Core:
```
{z}%$W="CORE
"*
```
Map `abs` onto the list, sort it, take the last element, repeat `CORE` (and a line break) that many times.
* Layer 1:
```
_,\:+d\/
```
Duplicate the list, take the length, swap the stack elements, get the sum, cast to `double`, swap the stack elements, divide. I think this can be shorter, but there's no incentive to do so.
* Layer 2:
```
W%S*
```
Reverse the array, riffle with spaces.
* Layer 3:
```
$S*
```
Sort the array, riffle with spaces.
* Layer 4:
Duplicate, take set union, riffle with spaces.
Some other optimisations are also possible, like reusing the `;` and `*S` of Layer 2, but again, but it doesn't affect the score.
[Answer]
# Python 3: N=11, 40 distinct characters
```
if 1:              
 if 1:             
  if 1:            
   if 1:           
    p=print;R=0    
    a=input()      
    b=a.split()    
    m=map;a=abs    
    E=max;l=len    
    n=m(int,b);    
    C=['CORE']     
   "R=E(m(a,n))"   
   OO=C*R;s=sum    
   "x='\n'.join"   
   "p(x(O))    "   
  "p(s(n)/l(b)) "  
 "p(*b[::-1])    " 
"p(*sorted(n))    "
p(*set(n))         
```
Thanks to @Falko for being my muse. This works, because Python does not create a new scope for each if statement, so the variables persist in the outer `print` statements. One annoying thing was that a `map` object (in our case `n`) can be used only once. So it was necessary to string out the `R=E(...)` line, but then `R` was not defined. Therefore I was lucky that there were four spaces left in the first line!
The output can be solved by providing multiple elements `*b[::-1]` instead of the list. The alternative `' '.join(...)` would have been too long.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), N = 15, 47 unique characters
Assumes `sizeof(int) == 4` and `sizeof(int*) >= sizeof(int)`.
```
;                     ;
 ;                   ; 
  ;                 ;  
   ;           float   
    s;c(a,b)int*a,*    
    b;{b=*b-*a;}i,n    
    ,*f;*q,*R,C,E ;    
    main(a){for(;0<    
    scanf("%i",&a);    
    i=i<abs(a)?a:i,    
    s+=f[n-!0]=a)f=    
    realloc(f,++n*4    
    );qsort(f,n*C,4    
    ,c);for(i=q?R?n    
    :!0:i;i--;a=f[i    
    ])!E|n-i<2|a!=f    
    [i]&&printf(q?R    
    ?R:q:"CORE\n",!    
    q+R?f[i]:s/n);}    
   ;*q="%f";       ;   
  ;*R="%.0f ";      ;  
 ;C=!0;              ; 
;E=!0;                ;
```
[4 Layers](https://tio.run/##bdFBb8IgFAfwu5@CNtEUClt1O/VJemh6XtKr6@GVjOUljq6tN/Wzd6iRZlFIOPz@8CA8o76NmSZgzwYs2LMA2II9Cbws2P/A7js8sJuzEUyCsuXkDgKlYHdv4dhq0SqBcCbpgkthQfRS1LKU1a3s1X@QXIL8aLshgWwbfDTobBIvKZYr5PN@0rTFdvRHCsxJzvtTbXdORVmjkVsdfPjC/b4ziZVp6sR7cA792A0H706UcnZpOFzeQrov6mJ@fx5lOQEpBegvouANj6qTU7TdnDDSNviOmtXqd/DfYxNfKXhR530elx919eliGQXv07rwdZt8fHUcznf3f6bjpY1hbsu1X6L2/JJZdk@u/YJSRxk89BeqR/bBNGVMrdnb@rJuLvMP "C (gcc) – Try It Online")
[3 layers](https://tio.run/##ZdGxboMwEAbgPU9hkBJhc25J2omLxYAyV2JNGQ4rrixRUyBbkmenpjGV2tiSh0@nO@s/LT@0niZkjwdX7JGRrdgfNm1HZzYrG1EnBA237iwIBLtrg5dGiUYKwpsFFxSEQdGDqKCEw0/DWT/JuoT4xXRDgtk@6KjJmSRe2xg2xJdaq@yemtGXF5RbWGpTZY5ORlmtiBsVdDhR23Y6MZCmTrwG5diP3XD26kQJi4LmOM@3qi@qYvlvHmW5RSslkh9gg9Y8OlydtPvdlSJlgh5tvdl8DT4Gk/geQYsq7/O4fKsO7y6GKGifVoXvV@fjs@N4u6tPRsVrE@Nv6F5RVB6fMsMW97vAUkXZvy3hNGVMbtnLdn538/0G "C (gcc) – Try It Online")
[2 layers](https://tio.run/##XdCxasMwEAbgPU8hGxIs@dQ6aSdfhIeQueA19XAWUTlI5drOluTZXVkmUCqBho/TfzpZ/WXtNKH4v3Al/qK7dHQVKyFGtBlBK9lfFYESs7V4a41qtSJ8MPhooByqHlQNBzjOUcG@iX1G8ua6IcNiH2205F2WrjmFDcmljg3vqR1DaUUlw1KXG3fyOikaQ9KZaMOZLpfOZg7y3Kv3aBL7sRuuwbw6wGJgJc492fRVXS3vK5OiZGStkUIwR2tkcrx7zfvdnRLjop242Wx@hjCuy8LtaFVd9mV6@KiPnz6FJFqf11XIacrx1Ut8zBbmN@napc9/RLFCVQd6KZx4Kk5TIfRWvG3nczfvXw "C (gcc) – Try It Online")
[1 layer](https://tio.run/##RdA9a8MwEAbgPb9CNiRY8ok6aSdfhAeTueA19XAWVTlI5fpjS/Lb3dNQKoGGh/d0Onn75f22ofpf4TbSulML@oJg0BxXQ2DUTg14H5wZrCF8MkQRMAHNBKaDFi4KRb6JY0H6Hsa5wOossniKocj3nMOBdMqw4zMNi8QaqhlSpnThGm1W9Y50cCLzJ91uoy8ClGU0byIap2WcV5FoWkgCXmPqw25quia9p86qmpGtRZILWaTX2eURLZ9PD8pcELlyfzj8zDJWKKROpOnqqc7b9@7yEXPIRKaya6S@r5eXqPGpdjKly/ch//sn3LZK2aN6PabzlPYv "C (gcc) – Try It Online")
[Core](https://tio.run/##FY5Ba4QwFITv71eoUEniC3W3e0oMHsRzwevWwzM05cE2VrO33f3tVhkYGJhvGK9/vN@2ZL0gnCTHuyJUMNnH5NSkFdkXYwRUwaoF1YAd9pmFX@IoSD7CvApbN5A8xSCKNy6wJGmBHTc0pb3SkmGEVLlwjTqvR0cyOFi/6XabvQhYVVFdQNolzet9z1F1eAH00h7b7JZ2aCOYvDZsWWtL@xDDKPP@GTU35yflLsCVx7L8W/f7QewEtINZTNF9Dv1XLDCHpRranRtNeo/SvratzvQp@zgdfj70Dw "C (gcc) – Try It Online")
[Answer]
# [Runic Enchantments](https://github.com/Draco18s/RunicEnchantments/tree/Console), ~~N=9~~ N=8, 38 Characters
```
/ o/\  \     \S\
" //RiU\      \}
@            q "
"        }+1\r @
}   ^U \    {q "
     \{\?)}\+  }
  o\/'|A:{:/R' S
 //r/Ril2=?\?R :
   ,A~/"OC"/=? {
   @| \"RE"\3= =
 D$\' /rqka/l2S?
    i \*@   il\/
   'R1i     Ui ~
 R$/Rak      U \
 ?!D  Rlril1-{=
R   R: }S:{=?\~
```
[Try it online!](https://tio.run/##TY5BawMhEIXv/opXCSxtGqZuboK4oem54LK3oRBykkhDhJ6M@9e3Y7aHPkXk4828l3@@43lZCFdiQK6IR1YaRCFOKwBXNeCfbtDi@FPdGs4YVJX/17TuKM2xjhb2z5W34hNwZeruB1sshQ6jkpAsMal3nn2AbSOvh5n057sm51EaGO5gHT407x2cwnHDHSjfLidK/egfKRH80grGxNRAF0x8pE8Rs0LYUDhd1rZSUME/HYGQckxmV5wKwoNFHW2RIvOyvGFnsDft7dv5BQ "Runic Enchantments – Try It Online")
Turns out [I was wrong](https://codegolf.stackexchange.com/questions/40689/onion-programming#comment425999_40689), I forgot I had an explicit s`o`rt command already, due to having encountered the "sort a list" problem before. This does, however, limit the size of inputs that the final program can take (8 values) due to the internal costs of the sort command. [A slight tweak](https://tio.run/##LY7BasMwDIbvfoq/phC2bqhOWTvCglPWnQcOuYlB2cnUrMSwk@u8eian08GSPyS@P/7@@O95JlyJAabc04rASoPI@UFYKdaqw/8IEEZ0sgEMb/LkjeEIrbLMXwOWkzQiq/t@YvuQeQP0Aq5M1e3YpIZchUaJJIom1K1l65DKydNxIv35rqm1aAvobuJ3H5p3bW8VTmuuQHG8nCnUTIvFgx9LQB8wFVA54xf7IE3BrcmdL/f8ElDBrk6AC9EH85xa5YS7BrlvkgSZ5nkLgxo7bPGCPQ54lZ8RaGDqPw) can increase the input size to 13 at the cost of 1 unique character or to [19](https://tio.run/##LY7LasMwEEX3@oobETBtWiaTNI@aunJosi7IeDcUQlcipsGGrhT5192xU2105zDDud3vT/geBsKVBBBKFc0IYiyIfKiVjU@sKfEfAUKLUjfwXr8pSQuWDtYkzV81ppPYIpn7fhT3kGQBVAquQtntkMecfIbcqKRTTbMqnDiPOJ48HXqynx@WCodiBOVN/f5kZV1UzuA4lwzUtZczNSuhyRIgj2PB0KAfQeY5TPZaPwM/J3@@3PtrQQM3OwK@6ULDz7EwXrnPkao8apF@GJZgrLDGEhtsscNeJ1bIYA0v4A14C96B9@DXPw) for two unique characters (all additional characters are on Layer 1 and added at the same time, but the increased capacity of the IP's stack isn't needed until Layer 3, as C, L1, and L2 can perform their calculations without holding the entire input in memory).
Core: [Try it online!](https://tio.run/##KyrNy0z@/z8uVCFGAQi4FGKqY@w1a2O49NVrHK2qrfS59IMyc4xs7WO4HOv0lfydlfS5avRilIJclWK41PX0iwqzE/W5MvVitByA2v//N1DQNVQwNgSRRiAIAA "Runic Enchantments – Try It Online")
Layer 1: [Try it online!](https://tio.run/##HY2xCsIwGIT3/ymOLEGr/KbdCqUt4iwEuh2COAWLYMApra8eTe/gg1u@i59XeOSMLWvlKLhNYFlJACb2u5WVUO0ytqlVL1F9mOuuZy@H8avmejbaybCAxl8MG6GFxvfzrrMggPvhLwtivQvby5TzCUeHxhXWpT8 "Runic Enchantments – Try It Online")
Layer 2: [Try it online!](https://tio.run/##JU5NC4MwFLu/XxGKUDY33qo3QaqMnQcFb4@B7FQUh4Wd1P31zo8EAiGQJHwH/44ROwRgjHQYLKmRsJpXswXAtCcyiT0tkoI@wnqui6lgp4kDO99npRXrCJf6x@p5V1xaQjVDlHsoyUtKRIPD2LXcZ2ubh5yrtdT3BO2M33cbTwm7tjteNDHecDXIzabZxj8 "Runic Enchantments – Try It Online")
Layer 3: [Try it online!](https://tio.run/##TY5BC4JAEIXv@yteIkiZTKs3QVbJzsGGtyGQTotL4UIntb9urkX0Bmb4mMfjuefd3OYZRNo0jFUs8KceP5xiyW7Fa4PVPHy/PLDaThxjwQdTNFb5kJOOIIjcEm3TQrHS3ryvXhScjwEVymM5ggN9CjgrIOqQI5Dru5ZsevHJBrwr/bW@VaSlWZs0BkKHpNvu06yBUJsa0NYZK5OhmOcDEolM@p36eQM "Runic Enchantments – Try It Online")
Layer 4: [Try it online!](https://tio.run/##TY5BawMhEIXv/opXCSxtGqZuboK4oem54LK3oRBykkhDhJ6M@9e3Y7aHPkXk4828l3@@43lZCFdiQK6IR1YaRCFOKwBXNeCfbtDi@FPdGs4YVJX/17TuKM2xjhb2z5W34hNwZeruB1sshQ6jkpAsMal3nn2AbSOvh5n057sm51EaGO5gHT407x2cwnHDHSjfLidK/egfKRH80grGxNRAF0x8pE8Rs0LYUDhd1rZSUME/HYGQckxmV5wKwoNFHW2RIvOyvGFnsDft7dv5BQ "Runic Enchantments – Try It Online")
Further compression is highly unlikely, due to the smaller space necessitating an increase in the number of flow control characters. I found an arrangement that gave 9 empty spaces in the core program, but that is not enough, as we need (a correctly arranged) 15.
Explaining how any of these programs work is difficult without a visual map of the path the IP takes, which is cumbersome and time consuming to construct. The initial entry point is the upper left corner of the Core program (`^`) which allows for consistent flow control as new layers are added, as each layer has an opportunity to intercept on the newly added line at the top or the bottom.
Layers 1 and 2 intercept at the bottom (so that the top line remains empty for future layers) and then perform their operations along the right hand edge (a loop arranged vertically). Layer 1 is slightly too long and takes 3 characters along the top edge as well, but the diagonal reflector (`\`) in the top right realigns the IP with the next loop iteration.
Layer 3 intercepts along the top edge in order to grab the first input value before redirecting to the bottom edge (Layer 4 leaves a NOP in this column on its bottom line) and reads the full input using the bottom edge loop, redirecting on the Down command (`D`) in the lower left. From there the IP bounces a few times before ending up in an output (`$`) loop in the lower left in order to space-separate the values.
Layer 4 utilizes all of the functionality of layer 3 (hence the blank space), but intercepts on its own new top edge (upper left) in order to perform its own functionality at the end of Layer 3's processing. The top left corner inserts a string `"@"` which is used to denote the end of the array before entering the processing loop along the bottom. If a duplicate value is found, it's popped (`~`, lower right corner) otherwise the branch is taken that consumes the new right hand edge. This side branch checks to see if the end of the array has been reached, and if so, break out and head to the same space-separated output loop from Layer 3. Otherwise use the blank space on Layer 3 to return back to the main loop.
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~N=14, C=44~~ N=13, C=40
```
    (s,a=s.split
    ` `)=>[[`CORE
    `.repeat(Math
    .max(...a.map
    (Math.abs)))]
    ,a.reverse(),
    [a.reduce((i,
    j)=>i- -j,2-2
    )/a.length],[
    ...new Set(a)
    ],[...a].sort
    ((i,j)=>i-j)]
[[[[[2-2].join` `
   - -2].join` `
  -2/2].join` `
 - -2-2/-2].join` `
-2/2].join` `
```
[Try it online!](https://tio.run/##1ZPNbpwwEMfvPMWIk50Fk6WtKoVuLlWPVaVUPQESruPsGhFDbUNXW/XZt2M7UbKofYAahOE3X/Z/TM8XboVRk8v1eC/PD7MWTo0aJjM@To5Q@JWAkW42AQlpLeNmv9RlWyW/k@LqnOAAHMRmfGeZnQblAuigo7vbuu4@frn7FAkzcpLckc/cHQJhj/xIGGMcX6aYxtsY/24ppW0gGcewRRorCc0CqT25n4UkREXSYyWVQ95nZV4GQgvOBqn37tBmdazFmJY/4at0hNNA0OJrt8yOJq7ZJ4y5eqxe@4EJW9aPSuN@vA9WuQB5Wbz@9mZEr30uPM5XRbJwAwLVhh1a/yVf0@EdBGxeFGz@bwnDni5FfEYvIj2RlZCRrry6KnkYDRAv6AnVvK5w@gDvcNpswtENUqPFyx3F7RrdeanIEXa3cGR2UKjCW6x3ymD7HjZwovSvNLYQw6sE82k7DpIN454IugJpo@@knQd3k65NcuEDBpD0GvItvNn6Z@mvlK5dqf/BLtJ@0@rHLEEcuOHCYTtv0gyeG@L7IPzpGDiuvGh0sc8gTWmLm1EnSavzHw "JavaScript (Node.js) – Try It Online")
# JavaScript (Browsers), N=15, C=52
Full program.
The TIO uses `process.argv[2]` for `prompt()`
```
(r=4)?r:
 (r=3)?r:
  (r=2)?r:
   (r=1)?r:
    r=0;p=prompt().
    split` `;m=p.
    reduce((i,j)=>i
    - -j)/p.length
    v=p.reverse().
    join` `;t=[...p
    ].sort((i,j)=>i
    -j).join` `;s
    =new Set(p);
    console.log(
((((r==0?Array(Math
    .max(...p.map(
    Math.abs)))
    .fill(`CORE`)
    .join`\n`:``)  +
   (r==1?m:``))     +
  (r==2?v:``))       +
 (r==3?t:``))         +
[...s].join` `)
```
[Try it online!](https://tio.run/##vZRNj9owEEDv@RUjTvYChsD20KReVFU9VpW26mmDZDcY1ig4rm1SStXfntoOafnooYdVEykePQ8Tj5/DljfclkZqN1b1SrTrvSqdrBVoU@@0Qxh@JGCE25uISmEt4WbTPM2WefIzmdy1yNB7vDBZAj6ad1EIZ6cwxGkfg6HTXNO@OInM6ko6BizfUd0RI1b7UiAkR1tMH2RkYxhv8USTSqiNe46o8flGNMJY0dfa1lKFUo4@EUJ0ZEtia@Ouqm0x6XNtJFSJb/BJOKRxHkFZK1tXglT1BiXIX4bS6eKtMfw7@sBPSyA7fkDhTT7QKKIwR/gXizHuUtayqhB79/HxPTuR@OZCsYwxDDA87RJNF7tAcMiJNMDZovkDIw50vnDnNPDQsF32XeH2bpI03Pg2VgIosBfyVDAoXsxUV@xfXXXZ/8VWEXUV574KVhT@kfnxRlpkt9rO8IW4C36lLjaJWZ6sawMoCDx6e9PcD2/glR@Gw/hNRrV@Jugl3RfkD1Ts6wD0AQ7EVtKbufc6jiNIX8MQjhj/lf4@j34rz/exxFdgUKhHYfeVywZhSjS8uk3C4Y/h4leflfy6F1A@c8NL5w9BNhhBLzD0XvrDoSvuFzYp1GQzgsEAL/1a5VHgvG2nME5hnobnLNy/AA "JavaScript (Node.js) – Try It Online")
[Answer]
# [TlanG](https://github.com/tuddydevelopment/TlanG) 177 bytes N=4 (\*3)
```
############
############
############
####CORE####
####||||####
####CORE####
############
############
############
```
prints `CORE`
Explaination on the github linked in title
Not quite the requested but i think its fine!
]