# Print the last, middle and first character of your code

The challenge is simple: Print the last, middle, and first character of your program's source code, in that order.

The middle character is defined as follows, assuming a source length of n characters, and 1-indexing:

• If n is even, print the n/2-th and n/2 + 1-th character. (abcdef == cd)
• If n is odd, print (n-1)/2 + 1-th character. (abcde == c)

### Rules

• Given no input, print the last, middle, and first character in your source code, in the form [last][middle][first]. This will be 3-4 characters long.
• Output must not contain any trailing whitespace. However, if whitespace is a first, middle, or last character, it must be printed as such.
• Source code must be n >= 3 characters long.
• Code must consist of >= 3 unique characters.
• Standard loopholes are forbidden.
• This is , so shortest solution in characters wins.

### Samples

# Form: [code] --> [output]
xyz --> zyx
abcd --> dbca
1 --> # not allowed: too short
abcde --> eca
aaabb --> # not allowed: not enough unique characters
System.out.print("S;pr"); --> ;prS
this is a test --> ts t
123[newline]45 --> 53[newline]1


Challenge Proposal

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

# Language Name, N bytes


where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

# Ruby, <s>104</s> <s>101</s> 96 bytes


If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

# Perl, 43 + 2 (-p flag) = 45 bytes


You can also make the language name a link which will then show up in the leaderboard snippet:

# [><>](http://esolangs.org/wiki/Fish), 121 bytes


var QUESTION_ID=188005;
var OVERRIDE_USER=78850;
var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;function answersUrl(d){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+d+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(d,e){return"https://api.stackexchange.com/2.2/answers/"+e.join(";")+"/comments?page="+d+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(d){answers.push.apply(answers,d.items),answers_hash=[],answer_ids=[],d.items.forEach(function(e){e.comments=[];var f=+e.share_link.match(/\d+/);answer_ids.push(f),answers_hash[f]=e}),d.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(d){d.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),d.has_more?getComments():more_answers?getAnswers():process()}})}getAnswers();var SCORE_REG=function(){var d=String.rawh\d,e=String.raw\-?\d+\.?\d*,f=String.raw[^\n<>]*,g=String.raw<s>${f}</s>|<strike>${f}</strike>|<del>${f}</del>,h=String.raw[^\n\d<>]*,j=String.raw<[^\n<>]+>;return new RegExp(String.raw<${d}>+String.raw\s*([^\n,]*[^\s,]),.*?+String.raw(${e})+String.raw(?=+String.raw${h}+String.raw(?:(?:${g}|${j})${h})*+String.raw</${d}>+String.raw))}(),OVERRIDE_REG=/^Override\s*header:\s*/i;function getAuthorName(d){return d.owner.display_name}function process(){var d=[];answers.forEach(function(n){var o=n.body;n.comments.forEach(function(q){OVERRIDE_REG.test(q.body)&&(o="<h1>"+q.body.replace(OVERRIDE_REG,"")+"</h1>")});var p=o.match(SCORE_REG);p&&d.push({user:getAuthorName(n),size:+p[2],language:p[1],link:n.share_link})}),d.sort(function(n,o){var p=n.size,q=o.size;return p-q});var e={},f=1,g=null,h=1;d.forEach(function(n){n.size!=g&&(h=f),g=n.size,++f;var o=jQuery("#answer-template").html();o=o.replace("{{PLACE}}",h+".").replace("{{NAME}}",n.user).replace("{{LANGUAGE}}",n.language).replace("{{SIZE}}",n.size).replace("{{LINK}}",n.link),o=jQuery(o),jQuery("#answers").append(o);var p=n.language;p=jQuery("<i>"+n.language+"</i>").text().toLowerCase(),e[p]=e[p]||{lang:n.language,user:n.user,size:n.size,link:n.link,uniq:p}});var j=[];for(var k in e)e.hasOwnProperty(k)&&j.push(e[k]);j.sort(function(n,o){return n.uniq>o.uniq?1:n.uniq<o.uniq?-1:0});for(var l=0;l<j.length;++l){var m=jQuery("#language-template").html(),k=j[l];m=m.replace("{{LANGUAGE}}",k.lang).replace("{{NAME}}",k.user).replace("{{SIZE}}",k.size).replace("{{LINK}}",k.link),m=jQuery(m),jQuery("#languages").append(m)}}
body{text-align:left!important}#answer-list{padding:10px;float:left}#language-list{padding:10px;float:left}table thead{font-weight:700}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="https://cdn.sstatic.net/Sites/codegolf/primary.css?v=f52df912b654"> <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><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><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr></tbody> </table> 

• Maybe it's only me, but "Code must consist of >= 3 unique characters." suggests all characters of the program should be unique, while you only require to have at least 3 distinct characters. – Grzegorz Oledzki Jul 9 '19 at 19:22
• @Belhenix Fewer than three unique characters allows solutions as simple as 121 for a great many languages. – Khuldraeseth na'Barya Jul 9 '19 at 19:32
• If anyone can find a stack-based language that uses - for negation and implicitly prints with a linefeed, \n1- is a three-byter. My search has so far been fruitless. – Khuldraeseth na'Barya Jul 9 '19 at 19:35
• @Belhenix Whitespace is certainly possible, it has enough unique valid characters (space, linefeed, tab). – bigyihsuan Jul 9 '19 at 19:46
• Can't change it now with 58 answers, but requiring "first letter of code must be different from last letter of code" would have ruled out a lot of trivial answers, including the current top answer. That may have been the intent of ">= 3 unique characters", but that requirement isn't actually very hard. – manassehkatz-Moving 2 Codidact Jul 10 '19 at 14:10

# MathGolf, 5 4 bytes

1231


-1 byte by using the trivial solution presented by @ErikTheOutgolfer in his Jelly answer, which works for any language with implicit output without trailing newline.

Try it online.

ùù xx


Outputs x ù.

Try it online.

Explanation:

ùù x   # Push 3-char string "ù x"
x  # Reverse it to "x ù"
# (output the entire string joined together implicitly without trailing newline)


# R, 11 bytes

cat("))c" )


Try it online!

Outputs ))c. Space added to make the number of characters odd: otherwise we would need to output 4 characters, and that would make the code longer anyway.

• Is this allowed? tio.run/##K/r/3y/R7/9/AA If so, you can cut it down to 3 bytes... – Sumner18 Aug 20 '19 at 14:33
• @Sumner18 I don't think it's allowed, because the initial [1] in the output counts. And maybe the trailing newline as well... – Robin Ryder Aug 21 '19 at 11:48

HQ9+ 4 characters

+AQ+

Explanation:

+ ; increment accumulator
A ; nop
Q ; print itself
+ ; increment accumulator

• Code must consist of >= 3 distinct characters – Draco18s no longer trusts SE Jul 9 '19 at 18:32
• @Draco18s thanks, I missed that part of the rule. I think I fixed it – Helena Jul 9 '19 at 18:54

# Forth (gforth), 9 bytes

Prints an escape-supporting string.

.\"   ."


Try it online

### Also 9 bytes:

Prints three spaces.

 ."    "


Try it online

### 9 bytes with Stack Underflow:

 ." .. ".


Try it online

The 2nd and 3rd solutions also work if you replace first quotations with ( and last quotes with ). Essentially, plenty of ways to do it in 9 bytes, but probably not any shorter.

Documentation

# AsciiDots - 9 bytes

.---$'.$.


Output: .$. The code starts with a ., ends with a ., and the middle character is a $. The single quote in the middle sets the dot print mode to simply read characters straight into the output stream.

It is possible that this could be made smaller, but I'm starting to doubt that it can. In order to print three characters, the single quote must be used, as the double quote would require an end to the string in order to output. However, this means that the single quote has to a) be followed by three characters and b) cannot be the center character. In order to crunch this down to seven bytes, I was considering trying to reuse the dot's start as one of the printed characters (sort of like AsciiDot's quine program). However, I found that the shortest sequence available for printing was ($' which would have had to print four characters in the space of three, or three characters in the space of four. I also tried some hacky alternative methods like trying to print the dot's value (which is 0) as one of the characters. While there may be some system that works, I've found these to be rather complex and large. Thus, I think that the above is the smallest solution. (I will update if I find something smaller) • Welcome to Code Golf SE! I messed around with this for a few minutes and came to the same conclusion you did. Nice first post! – Khuldraeseth na'Barya Jul 11 '19 at 18:23 • Alternative 9 bytes - /'$'-.[newline]\.Try it online! – Alion Jul 13 '19 at 14:34

# MATLAB, 1315 bytes

disp(  ') d')


Outputs ) d

Previous version (15 bytes, less strict output):

'''';1;''''''''


Outputs '''

• I see now, now worries. – Wheat Wizard Jul 11 '19 at 0:40
• Doesn't this output trailing whitespace? – Sanchises Jul 14 '19 at 12:13
• @Sanchises nope, size(ans)==3 – aaaaa says reinstate Monica Jul 14 '19 at 16:03
• Yes, but the actual output is ans =\n '''\n. Usually that's not a problem but this challenge seems to set a stricter standard. But then I may be interpreting the challenge wrong. – Sanchises Jul 14 '19 at 17:36
• @Sanchises hm, i see. i might misunderstand what codegolf considers "output" then, your output seems to be literally the output, formatted by MATLAB – aaaaa says reinstate Monica Jul 14 '19 at 18:18

# GolfScript, 7 5 bytes


".".


Try it online!

## Explanation

     # A newline, just to hide the effect of the automatic trailing newline
"."  # The . character: the last and middle character
. # Copy the character twice

# Implicitly output the whole stack without a delimiter.

# This returns ".." (the . character duplicated) and a trailing newline.

• There is a trailing newline at the end of the output; I'm not sure that's allowed. There is a boring 5 byte answer which only outputs 2 spaces and a newline: TIO. – Robin Ryder Jul 21 '19 at 6:41
• @RobinRyder No, it doesn't. It just outputs a single space and a newline. (TIO renders a newline as a space.) – user85052 Jan 9 at 10:48

It feels cheaty, but

# Mornington Crescent, 1005 bytes

Take Northern Line to Euston

Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Circle Line to Victoria
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take Circle Line to Cannon Street
Take Circle Line to Hammersmith
Take Circle Line to Cannon Street
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Tottenham Hale
Take Victoria Line to Victoria
Take Circle Line to Victoria
Take District Line to Gunnersbury
Take District Line to Acton Town
Take District Line to Acton Town
Take Piccadilly Line to Turnpike Lane
Take Piccadilly Line to Turnpike Lane
Take Piccadilly Line to Leicester Square
Take Northern Line to Leicester Square
Take Northern Line to Mornington Crescent


There are nine deliberately placed newlines after the first instruction to make the middle character the o of Take District Line to Upminster. The code prints out the first three characters of Tottenham Hale reversed to yield toT. Of course, this challenge was made easier by the fact that Mornington Crescent programs always start with the T of Take and end with the t of Mornington Crescent, barring any extra newlines.

Try it online!

• I've just realized that this works in TIO (Esoterpret) but not in Esoteric IDE. – Cloudy7 Jun 14 at 0:55

# Charcoal, 7 bytes

←´←´´´X


Try it online! The final X could be any byte in the Charcoal code page except 0xFF and the two already in use. Works by printing the desired characters leftwards. Alternative approach, also 7 bytes:

←”y←←”y


Try it online! The final y could be any ASCII character but I picked y because of the symmetry. Works by printing two ←s leftwards so that the final character gets printed at the start of the output.

# Forth (gforth), 13 bytes

: f ." ; :" ;


Try it online!

### Code Explanation

: f         \ start a new word definition
." ; :" ; \ print "; :"
;           \ end the word definition

• You should add a footer, so people can actually see the output: tio.run/##S8svKsnQTU8DUf//WymkKegpKVgrWAGJ/2n/AQ – mbomb007 Jul 9 '19 at 19:05
• Fixed, Thanks for the heads up, I totally forgot to call the function – reffu Jul 10 '19 at 3:05

## AppleScript, 4

1021


Outputs the last char (1), the middle chars (02), and the first char (1).

Any four-digit number with the same first and last digits and different middle digits works.

• 2 Distinct characters are a requirement – Nick Kennedy Jul 9 '19 at 13:42
• @LuisfelipeDejesusMunoz Does this edit qualify? – a stone arachnid Jul 10 '19 at 4:00

# PowerShell, 7 bytes

Another trivial solution. The first and the last lines contains LF.


"nn"



Try it online!

# PowerShell, 9 bytes

non-trivial, no byte sequence hacks. The first line contains LF only. The second line starts with a space.


echo hh


Try it online!

# Japt, 5 bytes

Inspired by my JavaScript solution.

N'a*N


Try it

• Ah-ha! I knew there had to be a 5 byter! Nice work. – Shaggy Jul 11 '19 at 21:04

# Kotlin, 39 25 bytes

fun main(){print("}rf")
}


Try it online!

Edit: -14 bytes thanks to @daniero

• main doesn't need parameters, you can drop 15 bytes – daniero Jul 10 '19 at 18:42
• @daniero Cool, didn't realize that - thanks! (Only dropped 14 bytes and added an extra new line because if otherwise id have to print 4 characters) Also kinda cool that just by chance it still had the same output – Quinn Jul 10 '19 at 18:46

# INTERCAL, 65 bytes

PLEASE,1<-#3DO,1SUB#1<-#246DON'TPARSE!!
DO GIVE UP


Try it online!

Padding the second half of the program to make the output PPP seems to be shorter than printing multiple distinct characters.

PLEASE ,1 <- #3         Declare that the length of the uint16 array ,1 is 3.
DO ,1 SUB #1 <- #246    Make the first element of ,1 246. (The other elements are 0.)
DON'T PARSE!!           This statement is ignored and nonsense.
DO READ OUT ,1          Print ,1 using C-INTERCAL's "Turing Tape" I/O.
DO GIVE UP              End the program.


This one almost works for 35 bytes, but it prints a space before the first newline:





# Stax, 5 bytes


.PPP


Run and debug it at staxlang.xyz!

The leading linefeed does nothing. .PP pushes the string PP, and the final P prints it with a trailing newline. The last character is P, the middle character is the first P, and the first character is a linefeed.

The implicit print's trailing linefeed invalidates the 4-byte solutions 1231 and .S.S (adapted from Weijun Zhou's quine).

## Keg, 7 5 bytes

1\':'


This prints ''1, which are the respective characters.

No Try It Online available for Keg.

Here is an uninteresting 4-byte answer:

1231

• Good to see Keg standing up to 05AB1E in code golf! – Lyxal Jul 11 '19 at 23:44
• would abca also work as an uninteresting answer? – Lyxal Jul 13 '19 at 5:18
• Yes. I am trying to keep this simple, so I will not add this to the answer. – user85052 Jul 13 '19 at 5:21

# C++ (clang) (lambda expression), 17 bytes

[]{return "}n[";}


Try it online!

# C++ (clang) (full program), 47 43 bytes


#import<ios>
int main() {std::puts("}n");}


Try it online!

Unfortunately had to leave an extra space in both of the solutions, to make them have an odd number of characters.

# Python 3 12 13 bytes

input(r')ri')


# Bitwise Cyclic Tag But Way Worse, 26 bytes

ÿ1111111122ÿ2000000002ÿ


Outputs ÿ ÿ ÿ. 26 bytes since ÿ is considered 2 bytes in UTF-8.

Try it Online!

# Cubix, 9 bytes


oN/
@oo



Try it online!

Reasonably boring one. Since the newlines in the first, middle and last positions are ignored by the interpreter the code wraps onto the following cube. Spaces could be used as well. eg oS/ @oo

  o
N / @ o
o


Watch it run

• N Pushs 10 (newline) onto the stack.
• / redirects around the cube.
• ooo outputs the newline 3 times.
• /@ redirects again and halts the program


main=($LT)print--L  Try it online! Outputs LT<newline>. # Lost, 21 bytes v<<<<<>>>>> >%?"v>@"@  Outputs: v>@. ### Explanation: Explanation of the language in general: Lost is a 2D path-walking language. Most 2D path-walking languages start at the top-left position and travel towards the right by default. Lost is unique however, in that both the start position AND starting direction it travels in is completely random. So making the program deterministic, meaning it will have the same output regardless of where it starts or travels, can be quite tricky. A Lost program of 2 rows and 5 characters per row can have 40 possible program flows. It can start on any one of the 10 characters in the program, and it can start traveling up/north, down/south, left/west, or right/east. In Lost you therefore want to lead everything to a starting position, so it'll follow the designed path you want it to. In addition, you'll usually have to clean the stack when it starts somewhere in the middle. Explanation of the program: All arrows, including the >v in the string, will lead the path towards the leading > on the second line. From there the program flow is as follows: • >: travel in an east/right direction • %: Put the safety 'off'. In a Lost program, an @ will terminate the program, but only when the safety is 'off'. When the program starts, the safety is always 'on' by default, otherwise a program flow starting at the exit character @ would immediately terminate without doing anything. The % will turn this safety 'off', so when we now encounter an @ the program will terminate (if the safety is still 'on', the @ will be a no-op instead). • ?: Clean the top value on the stack. In some program flows it's highly likely we have a partial string on the stack, so we use this to wipe the stack clean of that potential string. • ": Start a string, which means it will push the integer code-points of the characters used (rather similar as the Whitespace program). • v>@: Push the code-points for these characters, being 118 62 64 respectively • ": We're done pushing code-points of this string • @: Terminate the program if the safety is 'off' (which it is at this point). After which all the values on the stack will be output implicitly. Using the -A program argument flag these code-points will be output as characters instead. Two things to note: The top part could also have been v<<<<<<<< instead. Lost will wrap around to the other side when moving in a direction. So using v<<<<>>>> could be a slightly shorter path, and since it's the same byte-count anyway, why not use it. :) Also, the first line contains an additional < and >. One of them is to avoid having the newline character as the middle of the program, which is rather difficult to output and would have only increased the byte-count. The second is to make the program length odd again, so we'd only have to output a single middle character instead of two. # 6502, 17/21 bytes 6502: 17 bytes if running in zero page For initial testing I used Py65, a 6502-based microcomputer simulator written in Python. Starting Py65 with the command-line parameter -o ff moves the character output port to zero page address$FF, shaving three bytes from the code.

The program must be loaded and run at $0000, to guarantee outputing the correct three characters (in order) from the program with values 00 B5 A5. Here are the program bytes and their respective disassembly view in Py65: .mem 0000:0010 0000: a5 10 85 ff a9 11 4a aa b5 00 85 ff a5 00 85 ff 00 .d 0000:0010$0000  a5 10     LDA $10$0002  85 ff     STA $ff$0004  a9 11     LDA #$11$0006  4a        LSR A
$0007 aa TAX$0008  b5 00     LDA $00,X$000a  85 ff     STA $ff$000c  a5 00     LDA $00$000e  85 ff     STA $ff$0010  00        BRK


6502: 21 bytes if running outside zero page

Four additional bytes are required to allow the program to run outside of zero page. Three of the those bytes are the change in the LDA (load accumulator) instructions from zero page to absolute addressing. The fourth is the addition of a NOP (no operation) instruction, to maintain an odd number of bytes in the program.

This version of the program must be loaded and run at $0300, to guarantee outputing the correct three characters (in order) from the program with values 00 00 AD. Here are the program bytes (character values) and their respective disassembly view: .mem 0300:0314 0300: ad 14 03 85 ff a9 15 4a aa bd 00 03 85 ff ad 00 03 85 0312: ff ea 00 .d 0300:0314$0300  ad 14 03  LDA $0314$0303  85 ff     STA $ff$0305  a9 15     LDA #$15$0307  4a        LSR A
$0308 aa TAX$0309  bd 00 03  LDA $0300,X$030c  85 ff     STA $ff$030e  ad 00 03  LDA $0300$0311  85 ff     STA $ff$0313  ea        NOP
$0314 00 BRK  6502: 21 bytes if running on an Apple II We've come this far, so let's plop this baby on an Apple II. I don't normally tote around my Apple //c anymore, so I used a2ix on my Android phone. Instead of sending characters to an addressed port, they will go to COUT (character output), a routine in system ROM.$0300 is the usual spot for small assembly routines, so that's where I'll enter and list it. Running it yields a flashing space (60), inverse N (0E), and a normal " (A2). On the Apple II, ASCII characters are remapped across the 256-character range to achieve different character effects in text mode.

*300: A2 14 20 0E 03 A9 15 4A AA 20 0E 03 A2 00 BD 00 03 20 ED FD 60

*300L

0300-   A2 14       LDX   #$14 0302- 20 0E 03 JSR$030E
0305-   A9 15       LDA   #$15 0307- 4A LSR 0308- AA TAX 0309- 20 0E 03 JSR$030E
030C-   A2 00       LDX   #$00 030E- BD 00 03 LDA$0300,X
0311-   20 ED FD    JSR   $FDED 0314- 60 RTS  Relocating this to a free area of zero page (good luck!) would not yield any byte savings. While the absolute indexed LDA (load accumulator) at$030E could be switched to its zero page indexed counterpart to save one byte, an NOP (no operation) would have to be added to avoid additional code to support print two middle characters.

# 05AB1E, 5 bytes

×'×3×


Try it online!

×   push a string of nothing, repeated nothing times (in other words, push an empty string)
'×  push "×"
3×  push "×", repeated 3 times
implicitly print top of stack


# AWK, 17 bytes

BEGIN{print"}iB"}


Try it online!

# naz, 28 24 bytes

0a9a3a9m3a2o0a0a0a0a0m2o


Explanation

0a9a3a9m3a2o # Output "o" twice
0m2o         # Output "0" twice


Original 28-byte solution: 0a9a3a9m3a1o0a0a0a9s5s1o0m2o

# Brainetry, 181 bytes

This program starts and ends with an upper case L and also has it in the middle of its source code. This golfed version is based off of the program that comes after it.

To try this online, follow this repl.it link, paste my source code in the btry/replit.btry file and hit the green "Run" button.

L b
a b c d
a b c d e f g h
a b c d
a b c
a b c d e f g h
a b c d e
a b c
a b c d e f g h L
a b
a b
a b c d
a b c d
a b c d e f g h i
a b c
a b c d e f g
a b c d e f g
a b c d e f L


The verbose version also starts and ends with an uppercase L and has one of those in the exact middle of its source code.

Lo and
behold: this program has
a self referential property! This code prints its
first, middle and last
chars! How nice!
Of course I cheated a little and made
this program in such a
way that all
3 of those chars are the upper case L,
which I
to properly place in
the middle of this
text to make sure they appeared in those positions.
A bit of
luck and a bit of mathematics allowed
me to accomplish this feat. Let me
check it... Woops, missed by one... LOL


# Husk, 5 bytes

"¨ ¨"


Try it online! In Husk, ¨ is the escape character for ".

# JavaScript (Babel Node), 11 bytes

_=>(')\)_')
`

Try it online!

• My approach: alert(")\"a") - sadly 2 Bytes longer with 13 Bytes – pixma140 Jul 9 '19 at 14:26
• 9 bytes using a similar trick you used in your PHP solution. – Oliver Jul 10 '19 at 19:33