[Question]
  [
# Task
Given one non-whitespace printable character, make a 3x3 square representation of that input. For example, if the input is `#`, then the output is:
```
###
# #
###
```
# Rules
* The output format is strict, although a trailing newline is allowed. It means that the space in the middle is required, and also that the two newline characters separating the three lines are required.
# Testcases
Input: `#`
Output:
```
###
# #
###
```
Input: `A`
Output:
```
AAA
A A
AAA
```
Input: `0`
Output:
```
000
0 0
000
```
# Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"). Shortest answer in bytes wins.
## Leaderboard
Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.
```
/* Configuration */
var QUESTION_ID = 120052; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.
/* App */
var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;
function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}
function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}
function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}
function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });  
}
getAnswers();
var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;
var OVERRIDE_REG = /^Override\s*header:\s*/i;
function getAuthorName(a) {
  return a.owner.display_name;
}
function process() {
  var valid = [];
  
  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
    });
    
    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });
    
  });
  
  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });
  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;
    
    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);
    var lang = a.language;
    if (/<a/.test(lang)) lang = jQuery(lang).text();
    
    languages[lang] = languages[lang] || {lang: a.language, user: a.user, size: a.size, link: a.link};
  });
  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);
  langs.sort(function (a, b) {
    if (a.lang > b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });
  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }
}
```
```
body { text-align: left !important}
#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}
#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}
table thead {
  font-weight: bold;
}
table td {
  padding: 5px;
}
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">
<div id="answer-list">
  <h2>Leaderboard</h2>
  <table class="answer-list">
    <thead>
      <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr>
    </thead>
    <tbody id="answers">
    </tbody>
  </table>
</div>
<div id="language-list">
  <h2>Winners by Language</h2>
  <table class="language-list">
    <thead>
      <tr><td>Language</td><td>User</td><td>Score</td></tr>
    </thead>
    <tbody id="languages">
    </tbody>
  </table>
</div>
<table style="display: none">
  <tbody id="answer-template">
    <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
</table>
<table style="display: none">
  <tbody id="language-template">
    <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
</table>
```
  
[Answer]
# [Carrot](https://github.com/kritixilithos/Carrot/), 11 bytes
```
###
# #
###
```
[Try it online!](http://kritixilithos.github.io/Carrot/)
The program is in caret-mode, where `#`s are replaced with the input.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~5~~ 3 bytes
```
Ｂ³Ｓ
```
[Try it online!](https://tio.run/nexus/charcoal#@/9@z6JDm9/v2fz/vzIA "Charcoal – TIO Nexus") Edit: Saved 40% thanks to @carusocomputing. Explanation:
```
Ｂ   Draw a box
³   3×3 (second dimension is implicit if omitted)
Ｓ   Using the input character
```
[Answer]
# [Python 2](https://docs.python.org/2/), 32 bytes
```
lambda s:s+s.join(s+'\n \n'+s)+s
```
[Try it online!](https://tio.run/nexus/python2#S7ON@Z@TmJuUkqhQbFWsXayXlZ@Zp1GsrR6TpxCTp65drKld/L@gKDOvRCFNQ11ZXfM/AA "Python 2 – TIO Nexus")  
For `s='a'` : the middle `s+'\n \n'+s` generates `a\n \na` and `s.join` turns it in `a**a**\n**a** **a**\n**a**a` (bold `a`s are the ones that `.join` adds), because `.join` accepts a string as an iterable, then it is surrounded with the two missing characters
[Answer]
# [MATL](https://github.com/lmendo/MATL), 5 bytes
```
3Y6*c
```
[Try it online!](https://tio.run/nexus/matl#@28caaaV/P@/uqM6AA "MATL – TIO Nexus")
### Explanation
```
3Y6   % Push predefined literal: [true true true; true false true; true true true]
*     % Implicitly input a character. Multiply element-wise by its code point
c     % Convert to char. Implicitly display. Char 0 is displayed as space
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 8 bytes
```
4×ð«û3ô»
```
[Try it online!](https://tio.run/nexus/05ab1e#ARcA6P//MzBiw7tUScOwwqvigKEzw7TCu///WA "05AB1E – TIO Nexus")
```
INPUT    # ['R']                 | Implicit Input: 'R'
---------#-----------------------+-------------------------------
4×       # ['RRRR']              | Repeat string 4 times.     
  ð      # ['RRRR',' ']          | Push space onto top of stack.
   «     # ['RRRR ']             | Concatenate last 2 items.
    û    # ['RRRR RRRR']         | Palindromize.
     3ô  # [['RRR','R R','RRR']] | Split into 3 pieces.
       » # ['RRR\nR R\nRRR']     | Join with newlines
---------#-----------------------+-------------------------------
OUTPUT   # RRR                   | Implicitly print the top
         # R R                   | of the stack on exit.
         # RRR                   |
```
---
Original idea using 30 as a binary number (unfinished, someone else try this in another lang):
# [05AB1E](https://github.com/Adriandmen/05AB1E), 12 bytes
```
30bûTIð«‡3ô»
```
[Try it online!](https://tio.run/nexus/05ab1e#ARcA6P//MzBiw7tUScOwwqvigKEzw7TCu///WA "05AB1E – TIO Nexus")
[Answer]
# [Python 3.6](https://docs.python.org/3.6/), 33 bytes
```
lambda c:f'{3*c}\n{c} {c}\n{3*c}'
```
[Try it online!](https://repl.it/HwJ4/2)
[Answer]
## [RPL (Reverse Polish Lisp)](https://en.wikipedia.org/wiki/Reverse_Polish_Lisp "RPL (Reverse Polish Lisp)"), 60 characters
```
→STR 1 4 START DUP NEXT " " + SWAP + 4 ROLLD + + SWAP 2 PICK
```
(Note that "→" is a single character on the HP48 and compatible calculators)
Would visually represent what you want by having three items on the stack:
```
3.: "###"
2.: "# #"
1.: "###"
```
If you insist to return it as one string, one has to add the newline characters as well and combine the strings, left as exercise to the next tester.
[![Input (can be anything, does not need to be a string)](https://i.stack.imgur.com/diYxx.png)](https://i.stack.imgur.com/diYxx.png) [![Entered code](https://i.stack.imgur.com/RTEYY.png)](https://i.stack.imgur.com/RTEYY.png) [![Result](https://i.stack.imgur.com/cz2Zc.png)](https://i.stack.imgur.com/cz2Zc.png)
Explanation:
* `→STR`: Make the last object in the stack into a string. (So the input can be anything, e.g. a number.)
* `1` `4`: Push the number `1` and `4` to the stack.
* `START [...] NEXT`: Like a for loop but without access to the counter variable. Takes two numbers from the stack (here, we just have pushed `1` and `4`) and executes the code `[...]` the corresponding times (here, four times).
* `DUP`: Duplicate the last entry in the stack.
* `" "`: Push the string  (i.e. the string with one whitespace) to the stack.
* `+`: Take two objects from the stack and return them added together, for strings: Concatenated.
* `4`: Push the number `4` to the stack.
* `ROLLD`: Takes the last element (here: `4` that we just have pushed) from the stack and rolls the next element as far down the stack as the number we just took from the stack specifies.
* `SWAP`: Swaps the two last stack elements.
* `2`: Push `2` to the stack.
* `PICK`: Takes an element (here: The `2` we just pushed to the stack), interprets it as a number n, and copies the nth element from the stack.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 bytes
1 byte thanks to Erik the Outgolfer.
```
x4,`Ks3Y
```
[Try it online!](https://tio.run/nexus/jelly#@19hopPgXWwc@f//f3VldQA "Jelly – TIO Nexus")
[Answer]
# JavaScript, 28 bytes
```
c=>c+c+c+`
${c} ${c}
`+c+c+c
```
---
## Try it
```
f=
c=>c+c+c+`
${c} ${c}
`+c+c+c
o.innerText=f(i.value="#")
i.oninput=_=>o.innerText=f(i.value)
```
```
<input id=i maxlength=1><pre id=o>
```
[Answer]
# Java 7, ~~56~~ 55 bytes
-1 Thanks to Leaky Nun for pointing out the space I missed
```
String a(char s){return"...\n. .\n...".replace('.',s);}
```
Simply replaces the periods with the given character, for input #: 
```
...       ###
. .  =>   # #
...       ###
```
[Try it online!](https://tio.run/nexus/java-openjdk#JYzBCsMgEETP8SuW9KBC2R/IN/SUY5vD1koqGCPuWigh355acpmBeTOT6zMGBy4SM9wopE11@cxYSJp91vCCpREzSglpvk9AZWYLrdmNXxa/4FoFc4NiyOiLtnZQ3a7Og@OcARn3pgJst@KlltQj4iMh/AWxx@JzJOeNRn1lO@zHfvwA)
[Answer]
# PHP, 32 Bytes
```
<?=strtr("000
0 0
000",0,$argn);
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVVJWsuayt/tvY29bXFJUUqShZGBgwGWgAMQGBko6BjpgZZrW//8DAA "PHP – TIO Nexus")
[Answer]
# sed, ~~28~~ 18 bytes
```
s:.:&&&\n& &\n&&&:
```
[Try it online!](https://tio.run/nexus/sed#@19spWelpqYWk6emACLU1Kz@/0/i@pdfUJKZn1f8X7cIAA "sed – TIO Nexus")
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), ~~76~~ 70 + 1 = 71 bytes
*Requires the `-c` flag*
```
(((((((({})))<((([])[]{}<>)<>)>)<(<>({})({}){}()()<>)>)<([]()()())>)))
```
[Try it online!](https://tio.run/nexus/brain-flak#@68BBdW1mpqaNkBGdKxmdGx1rY2dJhABCQ0bO5AkCFfXamhqwISjY0EcDU0gR1Pz/3/V/7rJAA "Brain-Flak – TIO Nexus")
[Answer]
# Pyth, 7 bytes
```
jc3.[9d
```
[Try this online.](http://pyth.herokuapp.com/?code=jc3.%5B9d&test_suite=1&test_suite_input=%27%23%27%0A%27A%27%0A%270%27&debug=0)
Explanation:
```
jc3.[9d Expects quoted input.
  3     3
     9  9
      d ' '
        Q (eval'd input) as implicit argument
   .[   Pad B on both sides with C until its length is a multiple of A
 c      Split B to chunks of length A, last chunk may be shorter
j       Join A on newlines
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~7~~ 6 bytes
*-1 byte thanks to carusocomputing.*
```
Ð¶¹ðJû
```
Explanation:
```
         # Implicit input                  # ['R']
 Ð       # Repeat string three times       # ['R', 'R', 'R']
  ¶      # Push newline character          # ['R', 'R', 'R', '\n']
   ¹     # Push first input                # ['R', 'R', 'R', '\n', 'R']
    ð    # Push space                      # ['R', 'R', 'R', '\n', 'R', ' ']
     J   # Join stack                      # ['RRR\nR ']
      û  # Palindromize ("abc" -> "abcba") # ['RRR\nR R\nRRR']
         # Implicit output                 # []
```
Uses the **CP-1252** encoding. [Try it online!](https://tio.run/##MzBNTDJM/f/f@PD0Q9sO7Ty8wevw7v//EwE "05AB1E – Try It Online")
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), ~~61~~, 59 bytes
```
(((((((({})))<([][][]())>)<(([][][]()){})>)<([]()()())>)))
```
[Try it online!](https://tio.run/nexus/brain-flak#@68BBdW1mpqaNhrRsSCooalpB@QgeEBZO7CshiYIAjmamv//q/zXTQYA "Brain-Flak – TIO Nexus")
This is 58 bytes of code `+1` byte for the `-c` flag which enables ASCII input and output.
Explanation:
```
(((
   (
    (
     (
      #Duplicate the input 3 times
      ((({})))
#Push 10 (newline)
<([][][]())>
     #Push the input again
     )
#Push 32 (space)
<(([][][]()){})>
    #Push the input again
    )
#Push 10 (newline)
<([]()()())>)
#Push input 3 times
)))
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~49~~ 47 bytes
*Saved 2 bytes thanks to 2501!*
```
j;f(i){for(j=12;j;)putchar(--j%4?j-6?i:32:10);}
```
[Try it online!](https://tio.run/nexus/c-gcc#@59lnaaRqVmdll@kkWVraGSdZa1ZUFqSnJFYpKGrm6VqYp@la2afaWVsZGVooGld@z8zr0QhNzEzT0OzmktBQSFNQ91RXdMaynRCMJURTD0Qs/Y/AA "C (gcc) – TIO Nexus") has a trailing newline
[Answer]
# [Python 3](https://docs.python.org/3/), 34 bytes
```
lambda s:s*3+"\n"+s+" "+s+"\n"+s*3
```
[Try it online!](https://tio.run/nexus/python3#S7ON@Z@TmJuUkqhQbFWsZaytFJOnpF2sraQAJsEcLeP/BUWZeSUaaRrqyuqamlwQHowGijoCRf8DAA "Python 3 – TIO Nexus")
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 36 bytes
```
x=repmat(input(0),3);x(5)=32;disp(x)
```
[Try it online!](https://tio.run/nexus/octave#@19hW5RakJtYopGZV1BaomGgqWOsaV2hYappa2xknZJZXKBRofn/v7qDOgA "Octave – TIO Nexus")
### Explanation
This creates a 3x3 char matrix with the input char repeated, and sets its 5th entry in column-major order (i.e. its center) to `32` (ASCII for space).
[Answer]
# [Pyke](https://github.com/muddyfish/PYKE), 5 bytes
```
dQA.X
```
[Try it online!](https://tio.run/nexus/pyke#@58S6KgX8f9/IAA "Pyke – TIO Nexus")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~27~~ 25 bytes
Saved 2 bytes thanks to Level River St
```
->x{[s=x*3,x+" "+x,s]*$/}
```
[Try it online!](https://tio.run/nexus/ruby#S7T9r2tXUR1dbFuhZaxToa2koKRdoVMcq6WiX/u/KDUxJSczL7VYLzexoLqmuIZLoaC0pFghMbpYr7ikKLMglqv2vzKXI5cBFwA "Ruby – TIO Nexus")
[Answer]
# Brainfuck, 40 bytes
```
+++++[->++<<++++++>],...>.<.<++.>.>.<...
```
[Try it online!](https://tio.run/nexus/brainfuck#@68NAtG6dtraNjZgtrZdrI6enp6dno0eUABIg1h6ev//KwMA "brainfuck – TIO Nexus") *Requires an implementation that can access left of the starting position.*
Also see: [Graviton's brainfuck answer](https://codegolf.stackexchange.com/a/120124/66421) which takes a different approach (but is longer).
---
## Explanation:
Brainfuck can do a lot of cool tricks with its limited instruction set. Unfortunately, this answer doesn't use any of them, because it's cheaper (in terms of bytes) to just hardcode everything.
```
+++++[->++<<++++++>]                         Sets the cells to |5*6|>0<|5*2|
,                   Takes input character into the middle cell | 30|>#<| 10|
...                                Print the top of the square | 30|>#<| 10| ###
>.                                   Print a newline character | 30| # |>10|    \n
<.                               Print another input character | 30|>#<| 10| #
<++.                  Add 30+2 for a space character and print |>32| # | 10|  _
>.                   And just print the 5 remaining characters | 32|>#<| 10|   #
>.                                                             | 32| # |>10|    \n
<...                                                           | 32|>#<| 10| ###
```
# = input character, \_ = space (ASCII 32), \n = newline (ASCII 10)
---
Results in this beautiful box (for input '+'):
```
+++
+ +
+++
```
[Answer]
# Vim, 9 keystrokes
Assuming the input char is present in a buffer, vim makes this straightforward
```
x3pY2plr<space>
```
There is probably some magic vim commands of use here (there always seem to be some) so improvement suggestions are welcome. Only one keystroke behind V!
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 11 bytes
```
jc++K*z4dK3
```
[Try it online!](https://tio.run/##K6gsyfj/PytZW9tbq8okxdv4/38A "Pyth – Try It Online")
**Explanation:**
```
jc++K*z4dK3    expects a single char as input
j              joins on new line
 c        3    chops array into 3 sized pieces
  +            joins +K*z4d and K
   +           joins K*z4 and d
    K          initialize variable K as *z4
     *z4       duplicate the input 4 times
        d      variable initialized to string " "
         K     calls variable K, in this case *z4
```
[Answer]
# AWK, ~~28~~ ~~26~~ 25 bytes
```
$0=$0$0$0RS$0FS$0RS$0$0$0
```
[Try it online!](https://tio.run/##SyzP/v9fxcBWxQAEg4JVDNyCITQI/v@vDAA "AWK – Try It Online")
[Answer]
# [StupidStackLanguage](https://esolangs.org/wiki/StupidStackLanguage), 28 bytes
```
jfffavvflflqvvvviifblflflfff
```
[Try it online!](https://lebster.xyz/projects/stustala#5f741f9d65b18913fc56acfc "StupidStackLanguage - Try It Online")
## Explanation
```
j # Get the input (x)
fff # first 3
avv # new line
fl # print new line
fl # first x
qvvvviifb # space
lf # second x
lf # new line
lfff # last 3 x's
```
[Answer]
# [><>](https://esolangs.org/wiki/Fish), ~~24~~ 23 bytes
```
i:o:o:oao:o84*o:a0!.<o$
```
[Try it online!](https://tio.run/nexus/fish#@59plQ@CiUBsYaKVb5VooKhnk6/y/38gAA "><> – TIO Nexus")
[Answer]
# [V](https://github.com/DJMcMayhem/V), 8 bytes
```
x3p2Ùlr 
```
[Try it online!](https://tio.run/nexus/v#@19hXGB0eGZOkcL//8oA "V – TIO Nexus")
[Answer]
# C#,50 bytes
```
a=>Console.Write(a+a+a+"\n"+a+" "+a+"\n"+a+a+a);
```
Test Case:
```
var f = new Action<string>(
a=>Console.Write(a+a+a+"\n"+a+" "+a+"\n"+a+a+a);
);
f("#");
```
[Answer]
# Z80 or 8080 Assembly, 21 bytes machine code
Assume a memory mapped I/O device:
```
              Z80                  8080
3A xx xx    ld  a, (input)      lda  input       ; get input character
11 0A 20    ld  de, 200ah       lxi  d, 200ah   ; space & newline
21 yy yy    ld  hl, output      lxi  h, output  ; get output address
77          ld  (hl), a         mov  m, a       ; output character * 3
77          ld  (hl), a         mov  m, a
77          ld  (hl), a         mov  m, a
73          ld  (hl), e         mov  m, e       ; output newline
77          ld  (hl), a         mov  m, a       ; output character
72          ld  (hl), d         mov  m, d       ; output space
77          ld  (hl), a         mov  m, a       ; output character
73          ld  (hl), e         mov  m, e       ; output newline
77          ld  (hl), a         mov  m, a       ; output character * 3
77          ld  (hl), a         mov  m, a
77          ld  (hl), a         mov  m, a
76          halt                hlt             ; or C9 ret
```
No interpreter needed!
Hexdump:
```
0000: 3A 00 FF 11 0A 20 21 01 FF 77 77 77 73 77 72 77
0010: 73 77 77 77 76
```
where the input address is at FF00h and the output address is mapped at FF01h. The actual addresses will depend on the actual hardware. Of course this assumes the I/O is memory mapped. If it is I/O mapped, it would take several extra bytes because Z80 & 8080 I/O instructions are two bytes each. This also assumes the output device interprets 0Ah as a newline and doesn't require a CR (0Dh) which would add an extra 4 bytes to the program.
]