title: Print a Tabula Recta!

text:
# Question
Title: Print a Tabula Recta!
The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere cipher and the Trithemius cipher. It looks like this:

```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY

```

I frequently need this, but can't find it anywhere on the internet to copy and paste from. Because the square table is so long, and takes frigging *ages* to type, your code must be as short as possible.

### Rules/Requirements

* Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.
* If it is possible, provide a link to a site where your program can be tested.
* Your program must not write anything to `STDERR`.
* Standard Loopholes are forbidden.
* Your program can output in any case, but it must be printed (not an array or similar).

### Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

## Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```
# 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

```

## Leaderboard

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

```
/* Configuration */

var QUESTION_ID = 86986; // 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 = 53406; // 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
# 05AB1E, ~~6~~ 5 bytes

Thanks to **Downgoat** for saving 1 byte. Code:

```
ADv=À

```

Explanation:

```
A      # Push the lowercase alphabet.
 D     # Duplicate it.
  v    # For each in the alphabet...
   =   #   Print without popping and with a newline.
    À  #   Rotate 1 to the left.

```

Uses the **CP-1252** encoding. Try it online!.
> 34 votes

# Answer
# Vim, ~~25~~ 23 bytes

```
:h<_↵jjYZZP25@='Ypx$p'↵

```

Where  is the Return key.

```
:h<_↵                       Open the help section v_b_<_example.
     jjY                    Copy the "abcdefghijklmnopqrstuvwxyz" line.
        ZZP                 Close this buffer and paste in ours.
           25@='     '↵     Run these commands 25 times:
                Yp          Duplicate line and move to column 1 of new line.
                  x         Cut the first character.
                   $p       Move to the end and paste.

```

**EDIT**: lowercase is okay, so I can save two keys.
> 115 votes

# Answer
# Python 2, ~~59~~ ~~57~~ 53 bytes

```
a=range(65,91)*27
a[::-27]=[10]*26
print bytearray(a)

```

*Thanks to @xsot for -4 bytes!*
> 30 votes

# Answer
## ///, 220 bytes

```
/|/\/\///n/WXY|m/JKL|l/PQRS|k/CDEF|j/ZaNfV|i/MbAeI|h/TUcO|g/GHdB|f/OlTU|e/BkGH|d/ImMbA|c/VnZaN|b/NfVnZ|a/AeImM/ab
ed
kg
DEFgC
EFgCD
FgCDE
gk
HdBkG
de
mi
KLiJ
LiJK
im
ba
fc
lh
QRShP
RShPQ
ShPQR
hl
UcOlT
cf
nj
XYjW
YjWX
jn

```

Try it online!

This was surprisingly non-trivial and I have no clue whether it's optimal.

~~The only way to golf a problem like this in /// is by extracting common substrings.~~ (Turns out I was wrong.) However, due to the nature of the output it's not at all clear which substrings should best be extracted since you can't actually extract the entire alphabet due to the linebreaks. So you'll need to extract some substrings of the wrapped alphabet, but then there are trade-offs in terms of how long you make the substrings and which ones you choose.

So here's what I did. This is a CJam script which finds all substrings up to length 25 in the given string and for each of them computes how many bytes its extracting would save. Basically if there are `N` copies of a length-`M` substring, you'd save `(N-1)*(M-1) - 5` substrings, these substrings don't contain slashes. Also, technically, when you've already extract 8 substrings or so, the constant offset at the end reduces to `-4`, but the script doesn't consider that.

Anyway, here's what I did with the script:

* Run the script against the current code (which is initially just the output).
* Out of the substrings that yield the largest improvement, pick the shortest one. If there are several, pick the lexicographically smallest (from what I can tell, for the given input this reduces overlaps between substrings).
* Replace all occurrences of the chosen substring in the code with an unused lower case letter.
* Prepend `/x/ABC/` to the code where `x` is the chosen letter and `ABC` is the substring.
* Repeat until there are no substrings left that would save anything.

At the end, we save a few more bytes by replacing the resulting `//` with `|` and prepending `/|/\/\//` (this is why extracting substrings only costs 4 instead of 5 bytes after the 8th substring or so).

Like I said, I have no clue whether this is optimal and I find the rather irregular-looking result quite interesting. It might be possible to get to a shorter solution by chosing non-optimal (but more) substrings somewhere down the line. I wonder what the complexity class of this problem is...
> 20 votes

# Answer
# C, 47 bytes

```
i;f(){for(i=702;i--;)putchar(i%27?90-i%26:10);}

```

Try it on Ideone

A single loop, printing the alphabet every 26 characters but with every 27th character replaced by a newline.
> 18 votes

# Answer
# J, 15 bytes

```
u:65+26|+/~i.26

```

Online interpreter.

```
u:65+26|+/~i.26
           i.26  creates vector [0 1 2 ... 25]
        +/~      builds an addition table with itself
     26|         modulo 26 to every element
  65+            add 65 to every element
u:               convert every element from codepoint to character

```
> 16 votes

# Answer
## ///, 128 bytes

```
/:/fABCDEFGHIJKLMNOPQRSTUVWXYZ
fbfbAfxf
xbA_xf_x
xfbbbAfbb//x/bff//f/\///b/\\:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:

```

Try it online!

Inspired by Jakube's amazing answer to the L-phabet challenge, I thought I'd try my hand as well at actual *programming* in /// as opposed to just using it for compression. This was pretty tricky and I needed four attempts, but in the end it came out much shorter than my compression-based solution.

### Explanation

A quick primer on ///: basically the interpreter just reads the code character by character and does the following:

* If it's neither a `\` nor a `/`, print it.
* If it's a `\`, print the next character.
* If it's a `/`, parse a `/x/y/` instruction (with the same escaping rules) and repeatedly substitute all `x` in the remaining code with `y`.

Taking some more inspiration from Jakube, for simplicity I'll just explain a 4x4 version of this:

```
/:/fABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbb//x/bff//f/\///b/\\:B:C:D:

```

We start by replacing those `:` with the stuff between the second and third `/`. This will end up being the code the rotates the subsequent rows. We get this:

```
/x/bff//f/\///b/\\fABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbbBfABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbbCfABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbbDfABCD
fbfbAfxf
xbA_xf_x
xfbbbAfbb

```

The `f`, `b` and `x` are just shorthands for common strings, which we'll expand now. The `f` is for slashes, the `b` is for backslashes and the `x` is for `\//` which happens to come up quite a lot. The reason I'm using aliases for the single-character substrings `/` and `\` is that they'd have to be escaped in the first substitution instruction, so I'm actually saving quite a lot of bytes by not needing all those backslashes. Here's what we get after `x`, `f` and `b` have been filled in:

```
ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\B/ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\C/ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\D/ABCD
/\/\A/\///
\//\A_\///_\//
\///\\\A/\\

```

Very readable.

So the first line is just printed verbatim. Then we get to the funky part that rotates all further rows. It actually consists of four different instructions. One thing to notice is that I've escaped all occurrences of `A` within these instructions. The reason for this is that it allows me to distinguish `A`s within the instructions from `A`s in the remaining rows, which need to be processed differently.

```
/\/\A/\//

```

This matches `/A` and replaces it with `/`, removing the `A`. Note that this substring only appears at the front of each `ABCD`, so this drops the first character of all subsequent lines:

```
/
\//\A_\//

```

This matches a linefeed followed by a slash and replaces it with `A_/`. So this inserts an `A` at the end of each line, completing the rotation and also turns the linefeed into an underscore.

```
/_\//
\//

```

This matches `_/` and replaces it with a linefeed followed by a slash. The reason I need to make this detour via the underscore is the fact that /// applies each instruction repeatedly until the string no longer matches. That means you can never use an instruction of the form `/x/axb/` where `x`, `a` and `b` are arbitrary strings, because after the substitution `x` will always still match. In particular, this means we can't just insert something in front of a linefeed. We need to replace the linefeed in the process and the undo this replacement.

```
/\\\A/\\B/

```

This matches `\A` and replaces it with `\B`, so that the instructions after the remaining rows process the next character. After all four instructions have been processed the remaining string looks like this:

```
BCDA
/\/\B/\///
\//\B_\///_\//
\///\\\B/\\C/BCDA
/\/\B/\///
\//\B_\///_\//
\///\\\B/\\D/BCDA
/\/\B/\///
\//\B_\///_\//
\///\\\B/\\

```

So now the first rotated row gets printed, and then the next set of instructions rotates the remaining rows by another cell and so on. After the last rotation, we have a few more instructions that we can ignore and then we end with the incomplete instruction:

```
/\\\B/\\

```

Incomplete instructions at the end are simply ignored and the program terminates.
> 16 votes

# Answer
# Emacs, 47 bytes

```
abcdefghijklmnopqrstuvwxyz^M
^P
<F3>
^K ^K ^Y ^Y
^P
^<space> ^F ^W ^E ^Y ^A
<F4>
^U 2 4 F4

```

Where `^P` means "Control P", etc. That's 47 bytes, since the F3 and F4 keys require two ASCII bytes.

After entering the starting input, it defines a keyboard macro to duplicate the line and move the first character to the end. It then runs the macro a further 24 times.
> 13 votes

# Answer
# PowerShell, 37 bytes

```
25..0|%{-join('Z'..'A')[$_..($_-25)]}

```

Try it online!
> 12 votes

# Answer
# Jelly, 7 bytes

```
ØAṙJṢj⁷

```

Try it online!

### How it works

```
ØAṙJṢj⁷  Main link. No arguments.

ØA       Set argument and return value to "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
   J     Yield the indices of the argument, i.e., [1, ..., 26].
  ṙ      Rotate the alphabet 1, ..., 26 units to the left.
         This generates all rotations, but not in the correct order.
    Ṣ    Sort the rotated alphabets.
     j⁷  Join, separating by linefeeds.

```
> 11 votes

# Answer
## JavaScript (ES6), 56 bytes

```
_=>"ABCDEFGHIJKLMNOPQRSTUVWXYZ".replace(/./g,"$&$'$`\n")

```

Yes, that's right, half my code is the alphabet string literal. Best I could do without the literal is 81 bytes:

```
_=>[...Array(26)].map((_,i,a)=>a.map(_=>(i++%26+10).toString(36)).join``).join`
`

```

If you want a program rather than a function, then remove the `_=>` and wrap in `console.log()` for a cost of 10 bytes.
> 11 votes

# Answer
# C, ~~88~~ 64 bytes

Call `f()` without arguments.

```
f(i,j){for(i=j=0;i<26;putchar(j==26?j=0,i++,10:65+(i+j++)%26));}

```

Try it on ideone.
> 10 votes

# Answer
# Piet, 247 bytes/190 codels

Try it Online!

So, this took far longer than I had anticipated, and I have a few ideas on some other more efficient (more stack-friendly) approaches, but I finally got the dang thing working (and fixed an interpreter bug and added IDE features along the way), so here it is. Hardly the most byte-efficient language, but a hell of a lot of fun. Here's a larger view, and a trace showing the path taken. History up on my GitHub.

As a stack-based language, it's far too convoluted to explain briefly, but here's a basic overview of what the various sections/loops do. All variable and function names are just for explanation, as there are no variables or functions in Piet.

* Initialization (upper-left): starts `line_counter` at 27, loads '@' as `cur_letter`, sets `letter_count` to 27
* Main loop (starting at dark purple, center top)
    + Decrements `letter_counter`
    + Branches to `reset_line` if zero (light cyan 2-block)
    + Rolls `cur_letter` to the top of the stack
    + Branches to `check_done` if `cur_letter > 'X'` (teal/red block, right side)
    + Increments `cur_letter` and outputs it (lower-right corner)
    + Branches to `reset_letter` if `cur_letter > 'Y'` (light green block, left)
    + Rolls \`letter\_counter\_ back to top of stack, back to top of loop
* `reset_line` branch (big pink square):
    + Outputs newline character
    + Resets `letter_count` to 27
    + Continues back to top of main loop
* `check_done` branch (right half inside)
    + Rolls `line_counter` to top
    + Branches to end if zero
    + Decrements `line_counter` and rolls back to bottom of stack
    + Resumes where it left off, printing letter
* `reset_line` branch (left side, green block):
    + Resets `cur_letter` to '@'
    + Resumes where it left off, rolling/returning to top of loop
> 10 votes

# Answer
# MATL, 8 bytes

*With thanks to @Dennis, who suggested that MATL should incorporate modular indexing, and to @Suever, who had the idea of automatic pairwise operations.*

```
1Y2t&+Q)

```

**Try it online!**

```
1Y2    % Predefined literal: string 'AB...Z'
t      % Push another copy of it
&+     % 2D array with all pairwise additions of ASCII code points from that string.
       % Gives the 26×26 array [130 131... 155; 131 132... 146; ...; 155 156... 180]
Q      % Add 1 to each element. First entry is now 131, etc
)      % Index into string 'AB...Z'. Since it has length 26 and MATL uses modular
       % indexing, 131 is the first entry (character 'A'), etc. Implicitly display

```
> 9 votes

# Answer
# Mathematica ~~68~~ 61 bytes

```
Column[""<>RotateLeft["A"~CharacterRange~"Z",#]&/@0~Range~25]

```

Thanks to...

@MartinEnder (7 bytes)
> 9 votes

# Answer
# Python 2, ~~75~~ ~~65~~ ~~61~~ 58 bytes

```
a='%c'*26%tuple(range(65,91))
for x in a:print a;a=a[1:]+x

```

Gets the alphabet with `map(chr,range(65,91))`, then manually applies the string shift operation.

*Thanks to @LeakyNun and @TheBikingViking for -4 bytes!*

*Thanks to @xnor for -3 bytes!*
> 9 votes

# Answer
# R, ~~47~~ ~~42~~ 41 bytes

```
write(rep(LETTERS,27)[-27*1:26],1,26,,'')

```

Try it online!

Generates 27 alphabetes, removes 27-th letters and prints in 26 columns.

*Improvement inspired by* @Giuseppe's solution.
> 9 votes

# Answer
# Javascript, ~~113~~ ~~96~~ ~~91~~ 76 bytes

A super-short version for running in the console:

```
l="ZABCDEFGHIJKLMNOPQRSTUVWXY";for(C=26;C--;console.log(l=l.slice(1)+l[0]));
```

# Javascript/HTML, ~~140~~ ~~123~~ ~~118~~ 105 bytes

A prettier version, with an HTML output that makes it easier for OP to copy and paste:

```
<script>l="ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(C=26;C--;document.write(l+"<br>"),l=l.slice(1)+l[0]);</script>
```

**(EDIT: I should've just used the string A-Z instead of generating it)**

**(EDIT 2: Thanks to @Neil and @DanTheMan for their input (see comments))**
> 8 votes

# Answer
# , ~~36~~, 10 bytes

```
¬AZ25ñÙx$p

```

Try it online!

This uses the "Latin1" encoding.

Explanation:

```
¬AZ         " Insert the alphabet
   25ñ      " 25 times...
      Ù     "   Duplicate this line
       x    "   Cut the first character
        $p  "   Move to the end of the line and past the character we just cut

```
> 6 votes

# Answer
# Retina, ~~36~~ 31 bytes

**5 bytes thanks to Martin Ender.**

```

Z
{2`
$`
}T01`L`_L
\`.
$&$'$`¶

```

Leading linefeed is significant.

Try it online!

Credits.
> 6 votes

# Answer
# Haskell, ~~56~~ ~~53~~ 52 Bytes

```
mapM(\x->putStrLn$init$[x..'Z']++['A'..x])['A'..'Z']

```

same length: (using a suggestion by @AndersKaseorg)

```
a=['A'..'Z']
mapM putStrLn[take 26$[x..'Z']++a|x<-a]

```

to do modular stuff you have to import Data.Char to get the chr function, ~~74~~ ~~59~~ 58 Bytes was the best I could get with that: (thanks to @nimi for suggesting the toEnum function)

```
a=[0..25]
mapM(\x->putStrLn[toEnum$65+(x+y)`mod`26|y<-a])a

```

This could probably be much shorter, but I don't know any Haskell golfing tricks.

*used mapM instead of mapM\_ (see @Lynn's comment)*
> 6 votes

# Answer
# Sesos, ~~27~~ 25 bytes

```
0000000: 685902 ae7b33 764992 c45d9b 397360 8fef1f 7bca72  hY..{3vI..].9s`...{.r
0000015: 3adc33 07

```

Try it online! Check *Debug* to see the generated SBIN code.

### Sesos assembly

The binary file above has been generated by assembling the following SASM code.

```
add 26
jmp
    jmp
        rwd 1, add 1, rwd 1, add 1, fwd 2, sub 1
    jnz
    rwd 2, add 64
    jmp
        fwd 2, add 1, rwd 2, sub 1
    jnz
    fwd 1, sub 1
jnz
fwd 1
jmp
    jmp
        put, fwd 1
    jnz
    rwd 27
    jmp
        put, fwd 1
    jnz
    add 10, put, get, fwd 1
    jmp
        rwd 1, add 1, fwd 1, sub 1
    jnz
    fwd 1
; jnz (implicit)

```

### How it works

We start by initializing the tape to `ABCDEFGHIJKLMNOPQRSTUVWXYZ`. This is as follows.

Write **26** to a cell, leaving the tape in the following state.

```
                                                     v
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26 0

```

As long as the cell under the data head is non-zero, we do the following.

Copy the number to the two cells to the left and add **64** to the leftmost copy.

```
                                                   v
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 90 26 0 0

```

Move the leftmost copy to the original location, then subtract **1** from the rightmost copy.

```
                                                     v
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 90 0

```

The process stops after **26** iterations, since the rightmost copy is **0** by then. We move a cell to the right, so the final state of the tape after the initialization is the following.

```
     v
0 0 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

Now we're ready to generate the output, by repeating the following process until the cell under the data head is zero.

First, we print the character under the data head and move to the right, repeating this step until a cell with value **0** is found. After printing `ABCDEFGHIJKLMNOPQRSTUVWXYZ`, the tape looks as follows.

```
                                                                                v
0 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

Now we move the data head **27** units to the left (back to the leading **0**) and repeat the print-move combination until a cell with value **0** is found. This prints nothing and leaves the tape as follows.

```
v
0 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

Now, we write **10** to the current cell, print the corresponding character (linefeed) and zero the cell with a call to `get` on empty input, leaving the tape unchanged.

Afterwards, we move the content of the cell to the right to the current cell, then move the data head to units to the right.

```
      v
65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

The next iteration is slightly different. The first printing step prints `BCDEFGHIJKLMNOPQRSTUVWXYZ`, leaving the tape as follows.

```
                                                                                v
65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

Now we move the data head **27** units to the left.

```
 v
65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

The subsequent printing loop prints `A` and leaves the tape as follows.

```
   v
65 0 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

Once again, we print a linefeed, move the content of the cell to the right to the current cell, then move the data head to units to the right.

```
         v
65 66 0 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0

```

After **24** more iterations, the final step of moving the data head to the right leaves the tape in the following state.

```
                                                                                v
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 0 0

```

The cell under the data head is now **0** and the program terminates.

---

TIO uses a newer version of Sesos, which is backwards-compatible for SASM, but generates shorter SBIN code.
> 6 votes

# Answer
# R, 53 bytes

```
for(i in 1:26)cat(LETTERS[c(i:26,1:i-1)],"\n",sep="")

```

Here it is on an online interpreter.
> 6 votes

# Answer
# Dyalog APL, ~~10~~ 11 bytes

```
(↑⍳∘⍴⌽¨⊂)⎕A

```

TryAPL online!

Requires `⎕IO←0` which is standard on many systems.

The generalized 7-char function is just `↑⍳∘⍴⌽¨⊂`:

make the following list of strings into a character table:
the indices
of
the length of the argument, i.e \[1, 2, 3, ..., 26\]
`⌽¨` each rotate
the entire argument

With the argument of `⎕A` (uppercase alphabet) we get the desired result, but any argument can be fed to get the corresponding cipher:

```
      f←↑⍳∘⍴⌽¨⊂
      f'o+×'
o+×
+×o
×o+

```

In fact, even strings and numbers are allowed:

```
      f'Alpha' 'Bravo' 'Charlie' 'Delta'
┌───────┬───────┬───────┬───────┐
│Alpha  │Bravo  │Charlie│Delta  │
├───────┼───────┼───────┼───────┤
│Bravo  │Charlie│Delta  │Alpha  │
├───────┼───────┼───────┼───────┤
│Charlie│Delta  │Alpha  │Bravo  │
├───────┼───────┼───────┼───────┤
│Delta  │Alpha  │Bravo  │Charlie│
└───────┴───────┴───────┴───────┘
      f⍳8
0 1 2 3 4 5 6 7
1 2 3 4 5 6 7 0
2 3 4 5 6 7 0 1
3 4 5 6 7 0 1 2
4 5 6 7 0 1 2 3
5 6 7 0 1 2 3 4
6 7 0 1 2 3 4 5
7 0 1 2 3 4 5 6

```
> 5 votes

# Answer
# Brain-Flak, 222 bytes

```
(((()()()()){})<(((({}){}){}){})>)((((([[]]{}){}()){}))<>()){<>({}<>)<>{({}<(({}()))>[()])}{}<>([({})]<>{})<>(({}<>))<>({}[()])}{}<>(({}<>))<>{}{}{}<>{({}<(({}())[()]<{({}<<>({}<>)>[()])}{}{}((()()()()()){})>)>[()])}{}{}{}

```

Try it online!

I'm new to Brain-Flak, so maybe this can be golfed a lot, but at least it's a first try. It stores 27 full alphabets on the left stack, then moves the alphabets to the right and replaces every 27th letter by a newline.

My sourcecode is a bit confusing, but i will add it nevertheless.

```
(((()()()()){})
    park 8 in third
    <(((({}){}){}){})> push 64
)
((((([[]]{}){}()){}))<>()) push 26 twice on left and 27 on right
left stack: 64 letter, 26 letter count, 26 constant
right stack: 27 alphabet count
{ while alphabet count
    <>
    ({}<>)<> push 26 back to right
    { while counter
        (
            {} park counter in third
                <(({}()))> add next letter to stack
            [()] decrement counter
        )
    }
    {} pop 0 counter
    <>([({})]<>{}) set Z back to A-1
    <>(({}<>)) move 26 twice from right to left
    <> go to right stack
    ({}[()]) decrement counter
}
{} pop 0
<>(({}<>)) push 26 twice on right stack
<>{}{}{} pop counter, @ and Z from left stack
<> go to right stack
{ while alphabet count
    (
        {} save alphabet count on third stack
        <(
            ({}())[()] save constant on third stack and push lettercount 26 + 1 for lf
            <
                {   while lettercount
                    (
                        {} save lettercount on third stack
                        <
                            <>({}<>) pull letter from left to right
                        >
                        [()] decrement lettercount
                    )
                }
                {} pop 0
                {} pop last letter
                ((()()()()()){}) push lf
            >
        )>
        [()] decrement alphabet count
    )
}
{}{}{} pop alphabet count, constant and lf

```
> 5 votes

# Answer
# C#, 98 bytes

I have tried to see if I can generate the letters shorter than just initializing them as a string, but it's not really possible. The letters are 26 bytes and this snippet alone

```
for(char a='A';a<'[';a++)

```

is 25 bytes. I think initializing them and then appending them with a+=a is a good solution, but with C# you are limited by the bytecount of functions like `Substring()` and `Console.WriteLine()`.

My attempt at 98 bytes:

```
var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a;for(int i=0;i<26;i++)Console.WriteLine(a.Substring(i,26));

```
> 4 votes

# Answer
# Octave, 27 bytes

We're adding a row and a column vector, and Octave nicely expands the sigleton dimensions, no need for `bsxfun` (as you would need in Matlab).

```
[mod((v=0:25)+v',26)+65,'']

```
> 4 votes

# Answer
# q, 20 bytes

```
(til 26)rotate\:.Q.A

```
> 4 votes

# Answer
# Perl, 42 bytes

Full credit to @Dom Hastings for this.

```
@l=A..Z;say@l[$_..25],@l[0..$_-1]for 0..25

```

Or (same byte count) :

```
$_=join"",A..Z;eval'say;/./;$_=$\'.$&;'x26

```

Needs `-M5.010` or `-E` to run, for instance :

```
perl -E '@l=A..Z;say@l[$_..25],@l[0..$_-1]for 0..25'

```

---

My old answer (55 bytes) :

```
@t=A..Z;for$i(0..25){print$t[($_+$i)%26]for 0..25;say}

```

Need `-M5.010` to run. So run with :

```
perl -M5.010 -e '@t=A..Z;for$i(0..25){print$t[($_+$i)%26]for 0..25;say}'

```

It's probably possible to do shorter though, but i didn't find out how... yet
> 4 votes

# Answer
# Java, ~~190~~ ~~176~~ ~~172~~ 163 bytes

```
class C{public static void main(String[] a){int s=0;while(s<26){p(s,26);p(0,s++);p(-1,0);}}static void p(int s,int e){for(;s<e;s++)System.out.write(s<0?10:65+s);}}

```
> 4 votes

# Answer
# PHP, ~~64 62~~ 61 bytes

```
for($a=join(range(A,Z));$i<26;)echo"
",substr($a.$a,$i++,26);

```
> 4 votes

# Answer
# Perl6, 36 bytes

```
say [~] rotate ["A".."Z"],$_ for ^26

```

`rotate` takes a list and an integer, and rotates the list by that number of elements. A postfix loop of `^26` (up to 26) assigns the current loop variable (in this case, a number in the range `0..15`) which rotates the list `'A'..'Z'` by that amount. Finally, I use the concatenate operator `~` as a reduce operator by wrapping it in square brackets, which gets applied to the list.

Thanks to smls for the help.
> 4 votes

# Answer
# Bash, 66 bytes

```
A=`printf %c {A..Z}`
for i in {0..25};do echo ${A:$i}${A::$i};done

```

I create a full alphabet in `A`, then print 26 rotated versions of it by taking the characters beginning at `n` and appending those preceding position `n`.
> 4 votes

# Answer
# PHP, ~~241~~ ~~68~~ 64 bytes

@Jörg Hülsermann kindly offered me this solution. The last one was pretty ridiculous.

```
for($r=range(A,Z);$i++<26;$r[]=array_shift($r))echo"
",join($r);

```

---

Thanks to @Titus for saving me **4** bytes!

---

@Jörg Hülsermann also provided the following (and longer, with 74 bytes) version:

```
foreach($a=range(A,Z)as$r)echo strstr($j=join($a),$r),strstr($j,$r,1),"
";

```

Thank you a lot!

You can try both solutions on http://sandbox.onlinephpfunctions.com/code/1a6a890887d8e817d5e9abbf521885b9306e2186
> 4 votes

# Answer
# Convey, 200 bytes

Dude, this take me a lot of time, its my first time using this incredible esoteric language so probably is not very golfed :P

```
  ['b',<+1 '|'v
    } >>">>>>>=
  ]</<"$"^v27 v
 '{'  v^">#>>v>!26
   ="<,<@.=  v v
   .v   ^ "1 v v
   >@v  ^ ^?,$2v
   >$,  "v^]+$1v
'a'?;,"+^v^<<^ v
    ^ v1 >>>>@<"
[1>>^}@<<<<<<#<<
      ]      ]

```

Try it online!

Visual representation of the program:

I would like to put a gif of the functionality but the process is too long and the gif is too big. Use the try it online and play it four yourself, is very cool :)
> 4 votes

# Answer
# Jelly, 9 bytes

```
ØAṙ1$ÐĿj⁷

```

Try it online!
> 3 votes

# Answer
# VBA, ~~89~~ ~~77~~ 76 bytes

```
Function v:For i=0To 701:v=v &IIf(26=i Mod 27,vbLf,Chr(65+(i Mod 26))):Next

```

... the last byte being `enter` at the end of the line which auto-generates the `End Function`. Essentially 27 copies of the alphabet with line-feeds overwritten into appropriate spots.

Invoke in the Immediate window with `?v`

```
?v
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY

```
> 3 votes

# Answer
# Brainfuck, 203 bytes

Code:

```
>++[<+++++++++++++>-]<[>[>+>+>+<<<-]>>>[<<<+>>>-]<<<<[>>>>+>+<<<<<-]>>>>>[<<<<<+
>>>>>-]>+++++[<+++++++++++++>-]<<<<[>>>+<<<-]>>[>.+<-]>[-]>+++++[<+++++++++++++>
-]<<<[>>.+<<-]>>[-]++++++++++.[-]<<<<+<-]

```

Explanation:

```
At #0
>++[<+++++++++++++>-]< Put 26 in #0
[ 26 times do

  === Get #1 and #2 and #3 to hold count

  > At #1
  [>+>+>+<<<-] Clone #1 into #2 and #3 and #4
  >>>[<<<+>>>-]<<< Move #4 into #1

  === Get #4 to hold 26 minus count which is stored in #0
  < At #0
  [>>>>+>+<<<<<-] Clone #0 into #4 and #5
  >>>>>[<<<<<+>>>>>-]<<<<< Move #5 into #0

  === Now put (count plus 65) into number #5 thereby emptying #2
  === This is the starting number

  >>>>> At #5
  >+++++[<+++++++++++++>-]< Put 65 in #5
  <<<[>>>+<<<-]>>> Add value from #2 to #5

  === Output first '#4' chars starting at #5

  < At #4
  [

    >.+< Output and increase #5

  -]

  === Put 65 in #5

  > At #5
  [-] Empty #5
  >+++++[<+++++++++++++>-]< Put 65 in #5

  === Output first count (#3) chars starting at 65

  << At #3

  [

    >>.+<<

  -]

  === Empty #5 and output newline

  >> At #5
  [-]
  ++++++++++.
  [-]

  === Increase count and prepare end of loop

  <<<<+ At #1 increase
  < At #0

-] end

```

Try it online!
> 3 votes

# Answer
# Julia, 49 bytes

```
println.(join.((n->circshift('A':'Z',n)).(0:25)))

```

Requires julia v0.5 or better for the `.()` broadcasting function calls.
> 3 votes

# Answer
# PHP, ~~47~~ 42 bytes

```
for($s="
A";$p<702;$s++)echo$s[++$p%27>0];

```

using string increment. Run with `-nr`.

hints: `$s=_A;$s++;` \<=\> `$s=_B;` and `$s=_Z;$s++;` \<=\> `$s=_A;`.
I use newline instead of underscore to further exploit the indexing.

**43 bytes** with PHP \>= 7.1 (for the negative indexing):

```
for($s=A;$s<ZZ;$s++)echo++$p%27?$s[-1]:"
";

```

hints: `$s=A;$s++;` \<=\> `$s=B;`, `$s=Z;$s++;` \<=\> `$s=AA;` and `$s=AZ;$s++;` \<=\> `$s=BA;`

older **47 bytes** version:

```
for(;$p++<702;)echo chr($p%27?($p-1)%26+65:10);

```

Why use `"\n"` if I already use `chr()`? :D
> 3 votes

# Answer
# Common Lisp, SBCL, ~~97~~ ~~94~~ 90 bytes

```
(dotimes(i 26)(format t"~a~a
"(#1=subseq #2="ABCDEFGHIJKLMNOPQRSTUVWXYZ"i 26)(#1##2#0 i)))

```

Try it online!

### Explanation

```
#2="ABCDEFGHIJKLMNOPQRSTUVWXYZ";save alphabet to #2# and return it
(dotimes(i 26);loop from i=0 to i=25
(format t"~a~a
"(#1=subseq #2="ABCDEFGHIJKLMNOPQRSTUVWXYZ"i 26)(#1##2#0 i)));display concatenation of subseqences of alpabet
 (#1##2#0 i) works like (subseq "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 0 i)

```

Ideas for improvement are welcomed. Could `rotatef` be better here?

-1 byte thanks to Renzo explicitly

-3 bytes by applying knowledge from Renzo's comment, using `#2#` for alphabet instead of using `set` and using `<enter>` instead of `~%`.
> 3 votes

# Answer
# 8086 machine code, 44 bytes

```
00000000  bf 2c 01 57 b0 1b 98 89  c1 51 b1 1a 89 cb b0 41  |.,.W.....Q.....A|
00000010  aa fe c0 e2 fb 59 e2 f1  89 d9 5f 57 8d 39 b0 0a  |.....Y...._W.9..|
00000020  aa e2 f9 c6 05 24 b4 09  5a cd 21 c3              |.....$..Z.!.|
0000002c

```

How it works:

```
            |   org 0x100
            |   use16
bf 2c 01    |       mov di, string
57          |       push di
b0 1b       |       mov al, 27
98          |       cbw
89 c1       |       mov cx, ax
51          |   a:  push cx
b1 1a       |       mov cl, 26
89 cb       |       mov bx, cx
b0 41       |       mov al, 'A'
aa          |   @@: stosb
fe c0       |       inc al
e2 fb       |       loop @b
59          |       pop cx
e2 f1       |       loop a
89 d9       |       mov cx, bx
5f          |       pop di
57          |       push di
8d 39       |   @@: lea di, [di+bx]
b0 0a       |       mov al, 0x0a
aa          |       stosb
e2 f9       |       loop @b
c6 05 24    |       mov byte [di], '$'
b4 09       |       mov ah, 0x09
5a          |       pop dx
cd 21       |       int 0x21
c3          |       ret
            |   string rb 0

```
> 3 votes

# Answer
# QBasic, 57 bytes

```
FOR i=0TO 701
?CHR$(10-(i MOD 27<26)*(55+i MOD 26));
NEXT

```

Basically the same as Anders Kaseorg's Python 2 answer, though independently derived: Run a single loop from `0` to `701`; the letter to print is the loop index mod 26; but every 27th iteration, instead of printing the letter, print a newline. Saves 3 bytes over the naive nested-loop approach.

Note that QBasic's display is 25 lines tall by default, so you won't see the whole table. One way to resolve this is to add `SCREEN 11` at the beginning, since screen mode 11 is 30 lines tall.
> 3 votes

# Answer
## Knight, 53 bytes

```
;=s*"ZABCDEFGHIJKLMNOPQRSTUVWXY"=i 26WiO Gs*25=i-iT26

```

Native Knight doesn't (currently) have a way to convert to and from ascii (there's discussions about adding one, though). As such, we have to just write the entire alphabet out. Expanded out:

```
# just make a massive string that we'll index into.
; = str * "ZABCDEFGHIJKLMNOPQRSTUVWXY" (= i 26)
: WHILE i # while nonzero
    : OUTPUT GET (
        s # get from s
        (* 25 (= i (- i 1)) # starting at position 25 * --i
        26) # and get 26 characters

```
> 3 votes

# Answer
# BQN, ~~16 14~~ 13 bytes <sup>(SBCS)</sup>

<sup>-2 bytes thanks to ovs</sup> <sup>-1 byte thanks to Razetime</sup>

My first ever BQN program and also my first ever program in an array language.

Outputs as a table of strings.

```
(⍋⌽⌜⋈)'A'+↕26

```

Try it online!

## Explanation

```
(⍋⌽⌜⋈)'A'+↕26
       'A'+↕26 - Make a range from A to Z
( ⌽⌜⋈)        - Enlist and rotate (as table)...
 ⍋            - 0..25 times.

```
> 3 votes

# Answer
# Pyth, ~~12~~ ~~10~~ 7 bytes

```
~~jP.:*2rG1 26~~
~~j.<LrG1 26~~
j.<LG26

```

Try it online!

It is a mistake to suddenly allow lowercase output.
> 2 votes

# Answer
## CJam, 15 bytes

```
'[,65>{_n(+}25*

```

Try it online!
> 2 votes

# Answer
# \>\<\>, ~~54~~ 52 bytes

Prints two newlines after the grid, instead of one.

```
'6'd*1-::?!v1-60.
.2co-$'Z'%*r!d2<
%,2'6':;!?l<~oa^?

```

Try it online!

## Explanation

```
'6'd*1-                     push 701 onto stack
       ::?!v1-60.           push numbers 700..0 onto the stack
           r                reverse, stack top now contains 701. goto (1)
    -$'Z'%* !d2<            (2) calculate 'Z' - (stack top % 26)
   o                        output letter
.2c                         jump to (1)
       ;!?l<                (1) if stack is empty, we're done
%,2'6':                     duplicate stack top, mod 27
            ~oa^?           if non-zero, goto (2), else print a newline and pop stack top.

```
> 2 votes

# Answer
# JavaScript, 110 bytes

My answer might be sub-optimal, but I think my method is cool enough to warrant using it.

```
a="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b=a.split("")
b.map((n,m)=>b.map((o,p,q,r=m)=>a[(q+p)%26].join("")).join("\n")

```

Tested in the Firefox browser console.
> 2 votes

# Answer
# Ruby, ~~42~~ 36 bytes

*-3 bytes from @MartinEnder, -3 bytes from @xsot*

Try it online!

```
a=*?A..?Z
a.map{puts a*'';a.rotate!}

```
> 2 votes

# Answer
# Clojure, ~~106~~ ~~105~~ ~~89~~ ~~88~~ 80 bytes

```
(print(apply str(map #(char(if(< 25(mod % 27))10(+ 65(mod % 26))))(range 702))))

```

Old version 87 bytes:

```
(for[i(range 26)](prn(String.(byte-array(flatten(reverse(split-at i(range 65 91))))))))

```

Mod approach pretty much minimized to the limit, still looking for a way to shorten the line version
> 2 votes

# Answer
# Awk, 73 bytes

```
awk 'BEGIN{for(a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";i<26;)print substr(a a,++i,26)}'

```

**Edit**: Dennis saved me a few bytes. And I learned a new Awk trick.
> 2 votes

# Answer
# F#, 74 bytes

```
for i=0 to 25 do(for j=0 to 25 do printf"%c"<|char((j+i)%26+65));printfn""

```

Pretty straightforward
> 2 votes

# Answer
# awk, ~~89~~ ~~86~~ ~~85~~ 59 chars

after @manatwork optimisation :

```
awk 'BEGIN{for(;n++<27;)for(c=64;++c<91;)printf"%c",++i%27?c:RS}'

```

--

before @manatwork optimisation: 85 chars (91 including awk invocation)

```
awk 'BEGIN{for(;n++<27;)for(c=64;++c<91;){if(++i%27){printf "%c",c}else{print;continue;}}}'

```

A little less efficient than @mattk answer, though... well done!
> 2 votes

# Answer
## Jellyfish, ~~19~~ 17 bytes

*Thanks to Zgarb for saving 4 bytes.*

This answer is non-competing, since Zgarb fixed a few bugs to make this valid.

```
P& ,`r"[Z
 \26 'A

```

Try it online

### Explanation

```
`r"[Z
 'A

```

This creates the following array by threading `range('A', ...)` over the pair `"[Z"`:

```
["ABCDEFGHIJKLMNOPQRSTUVWXYZ" "ABCDEFGHIJKLMNOPQRSTUVWXY"]

```

Then `,` flattens this into a single string.

Finally this bit gets all substrings of length 26:

```
&
\26

```

And `P` prints the result in matrix format, one string per line.
> 2 votes

# Answer
# Sinclair ZX81/Timex TS1000/1500, 127 bytes 92 bytes 88 bytes (listing)

```
 1 LET A$="ABCDEFGHIJKLMNOPQSTUVWXYZ"
 2 SCROLL
 3 PRINT A$
 4 LET A$=A$(2 TO)+A$(1)
 5 GOTO 2

```

The string is declared in one line, rather than looping through the character set and building up the string from an empty one.

It then manipulates the built string like a scrolly text, making this an easy challenge for 8 bit programmers.

You can try it online by *typing in the listing* using JtyOne online emulator. Good luck with that.
> 2 votes

# Answer
# oK, 16 bytes

```
`c$26':51#65+!26

```

Explanation:

```
          65+!26 / letters A to Z
       51#       / double the list, except for Z
   26':          / sliding window of size 26
`c$              / convert to characters

```
> 2 votes

# Answer
# C, ~~73~~ ~~63~~ 60 bytes

---

60 bytes: (note, someone optimized to 50 in the comments)

```
i=~0;f(){for(;i++<701;)putchar(~i%27?65+(i%27+i/27)%26:13);}

```

---

63 btyes:

~~```
i=~0;f(){for(;i++<701;)putchar(i%27==26?13:65+(i%27+i/27)%26);}

```~~

73 bytes:

~~```
a;i=-2;f(){for(;i++<24;){for(a=0;a++<26;putchar(65+(i+a)%26));puts("");}}

```~~
> 2 votes

# Answer
# Japt, 10 9 bytes

8 bytes of code, +1 for the `-R` flag.

```
26Æ;BéXn

```

Try it online!
> 2 votes

# Answer
# sed 4.2.2 \+ bash, 48 + 2 (`-rn`) = ~~56~~ ~~54~~ ~~51~~ 50 bytes

```
s/$/printf %c {A..Z}/e
:
P
s/^([^Z])(.+)/\2\1/
t

```

Try it online!

### Explanation

```
s/$/printf %c {A..Z}/e  # Set the pattern space to "printf %c {A..Z}" and
                        # set the result of that to the pattern space
:                       # Unnamed label
P                       #  Print the pattern space
s/^([^Z])(.+)/\2\1/     #  Move the first letter (it should not be a `Z`) to the end of the first line
t                       # Loop until the pattern space does not change
                        # The -n flag suppresses implicit printing of the pattern space at the end of the program

```

---

# Pure sed 4.2.2, 57 + 2 (`-rn`) = 59 bytes

```
s/$/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
:
P
s/^([^Z])(.+)/\2\1/
t

```

Try it online!
> 2 votes

# Answer
# Perl 5, ~~32~~ 30 bytes

```
map{say$_..Z,@b;push@b,$_}A..Z

```

Try it online!
> 2 votes

# Answer
# , 44 bytes

*Immediately outgolfed by Robert Hacken.*

```
write(matrix(LETTERS,27,26)[-27,],"",26,,"")

```

Try it online!

### Explanation of the golf:

The other two R answers ~~each use~~ were using a `cat`-based approach, using some pretty clever indexing tricks.

Using `write`, though, which is really a wrapper for `cat`, we automatically get to break the data into lines, and since there isn't a `...` argument in `write`, we can use positional matching to shorten things like `sep`, although we do still have to specify `file`.

So the only missing part is generating the data in a golfy way. `matrix` automatically recycles its argument (going down rows), so I originally had `matrix(LETTERS,27,27)`, which generates

```
ABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZAB
CDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDE
FGHIJKLMNOPQRSTUVWXYZABCDEF
GHIJKLMNOPQRSTUVWXYZABCDEFG
HIJKLMNOPQRSTUVWXYZABCDEFGH
IJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJK
LMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNO
PQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQR
STUVWXYZABCDEFGHIJKLMNOPQRS
TUVWXYZABCDEFGHIJKLMNOPQRST
UVWXYZABCDEFGHIJKLMNOPQRSTU
VWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWX
YZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZA
```

This is almost the right answer, just I'd need to remove the last row and column, e.g., `matrix(LETTERS,27,27)[-27,-27]`. This is 47 bytes, which is as good as one of the R answers. But the recycling doesn't change for a `27x26` matrix, and that neatly drops the last column, allowing me to remove the second `-27` index.
> 2 votes

# Answer
# Stax, 5 bytes

```
É,=■♦

```

Run and debug online!

## Explanation

Bytes counted in CP437.

Uses the unpacked version to explain.

```
VAgl|(
VA        The alphabet
  gl      Iterate until a loop is found, print each iteration on a separate line
    |(    Left rotate by 1 element

```
> 2 votes

# Answer
# Fortran (GFortran), 91 bytes

```
DO I=0,25
DO J=0,25
WRITE(*,'(A)',ADVANCE='NO')CHAR(MOD(J+I,26)+65)
ENDDO
PRINT*,
ENDDO
END

```

Try it online!
> 2 votes

# Answer
# Python 3, 64 bytes

```
e='ABCDEFGHIJKLMNOPQRSTUVWXYZ';exec('print(e);e=e[1:]+e[0];'*26)

```

Try it online!
> 2 votes

# Answer
# T-SQL, 98 bytes

```
DECLARE @ CHAR(26)='ABCDEFGHIJKLMNOPQRSTUVWXYZ'a:PRINT @
SET @=RIGHT(@,25)+@ IF'A'<LEFT(@,1)GOTO a

```

A couple of things make this work like it does:

* Fixing the `CHAR` type at 26 means I don't have to manually trim the string after I double it.
* Found through testing that `RIGHT()` is shorter than `SUBSTRING()` or `STUFF()`.
* Rearranging the order of my `IF` allowed me to save a character, plus one more by using `<` instead of `<>`, since that's a valid string comparison. (Although, strictly speaking, character ordering will depend on the SQL collation used; practically, though, I know of no collation that will order these particular characters differently.)
> 2 votes

# Answer
# Powershell, 54 bytes

```
-join[char[]](0..702|%{if($_%27){--$_%26+65}else{10}})

```
> 2 votes

# Answer
# brainfuck, ~~127~~ ~~122~~ ~~120~~ 113 bytes

```
+++++++++++++[->+>++>>++>>++>+++++<<<<<<<]>--->[->>[<+>->+>>.+<-[>>]>[<<[->+>-<<]>>>>]<<<<<]>+>->+<<<<[->+<]<<.>]

```

Try it online!

Or visualize it!

Should run on all interpreters. No value wrapping or pointer wrapping, no negative values or pointers, cell size doesn't matter, no undefined input behaviour.

**Explanation**

```
Initialize tape:
10(lf) 26(rowCount) 0(colCountBuffer) 26(colCount) 0(letterCountBuffer) 26(letterCount) 65("A") 0(temp) 0(exit if)
+++++ +++++ +++[->+>++>>++>>++>+++++<<<<<<<]>---

>[                  for each rowCount
  -                   decrement rowCount
  >>[                 for each colCount
    <+                  increment colCountBuffer
    >-                  decrement colcount
    >+                  increment letterCountBuffer
    >>.+                print and increment letter
    <-                  decrement letterCount
    [                   if letterCount still greater 0
      >>                  go to temp
    ]
    >[                  else (if letterCount = 0);(pointer position letter = true; exit if = false)
      <<[->+>-<<]         restore letterCount and letter "A"
      >>>>                go to exit if
    ]
    <<<<<               return to colCount
  ]
  >+                  increment letterCountBuffer
  >-                  decrement letterCount
  >+                  increment letter
  <<<<[->+<]          restore colCount
  <<.                 print lf
  >                   return to rowcount
]

```
> 2 votes

# Answer
# Brain-Flak, 160 bytes

```
(((((()()()()){}))[]{}{})<>()){({}[()]<<>(({})<>){(({})[()])}{}>)}{}{<>(({})<([{<({}[()]<<>({}<>)>)>()()}{}()()])>)<>{}}<>{}{({}(((((()()){}){}){}){}){}<>)<>}<>

```

Try it online!

Prints two trailing newlines, though one is from the interpreter.

Like Dorian's answer, this pushes 27 alphabets before processing anything. However, this solution stores it as the values `1` to `26` and adds 64 at the end.

### Explanation:

```
(
((((()()()()){}))[]{}{})  # Push 26 as the letter counter
<>())                     # Push 27 as the alphabet counter
{({}[()]<   # Repeat 27 times
      <>(({})<>)     # Copy the 26 from the other stack
      {(({})[()])}{} # Create a descending range from 26 to 1
>)}{}

{  # Loop until we're out of letters
  <>(({})  # Save a copy of the 26
  <([
  {
    <({}[()]<   # Loop 26 times
	<>({}<>)
    >)>
    ()()  # Add 2 every loop
  }{}()()])  # Use the loop to push -(26*2+2) = -54
  >)   # Push the copy of 26
  <>{} # Pop a letter
}
<>{}  # Pop the 26
{({}  # Reverse the stack
  (((((()()){}){}){}){}){}  # Adding 64 to every element
<>)<>}<>

```
> 2 votes

# Answer
# Brachylog, 11 bytes

```
25⟦{;Ạ↺₍ẉ}ᵐ

```

Try it online!

Full program, as it wouldn't be possible for a Brachylog predicate to meet this challenge's restriction on functions (main predicate is defined as the first one, so a call on a later line would simply be ignored), and it's probably easiest to separate it all off into lines with  rather than anything else anyhow. Prints the table in lower case with a trailing newline.

```
25⟦            Range from 0 to 25 inclusive.
   {     }ᵐ    For every number in that range,
    ;Ạ         pair it with the lowercase alphabet,
      ↺₍       rotate the second element of the pair left by the first,
        ẉ      and print it with a newline.

```
> 2 votes

# Answer
# Forth (gforth), 55 bytes

```
: f 26. do 26. do i j + 26 mod 65 + emit loop cr loop ;

```

Try it online!

Just for completeness. Tried several tricks (using one loop instead of 2, creating a string before printing) but they didn't save bytes. You can find such attempts in the TIO link above.

### How it works

```
: f ( -- )
  26. do    \ A golfy way to loop from 0 to 25 inclusive
    26. do  \   Form a nested loop
      i j + 26 mod 65 +  \ Compute a char in range A..Z
      emit  \     Print that ASCII char
    loop    \   End inner loop
    cr      \   Print a newline
  loop ;    \ End outer loop

```
> 2 votes

# Answer
# 05AB1E, 4 bytes

```
Av,À

```

Try it online!

```
Av,À  # full program
 v    # for each character in...
A     # "abcdefghijklmnopqrstuvwxyz"...
  ,   # output...
      # (implicit) last popped value
   À  # rotate...
      # (implicit) last popped value...
   À  # one character to the left

```

P.S. This is my 100th answer!
> 2 votes

# Answer
# HTML + SCSS, 200 bytes

```
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p

```

```
*{margin:0}$s:'ABCDEFGHIJKLMNOPQRSTUVWXYZ';@for$i from 1 to 27{p:nth-child(#{$i}):after{content:str-slice($s+$s,$i,$i+25)}}

```

I was hoping to be able to abuse `counter`s but couldn't make that work in a sensible amount of bytes, also experimented without the `p` qualifier for the `nth-child` but this ended up being smaller too. Could be 189 bytes without `*{margin:0}` but it doesn't look right without it!

Try it online!
> 2 votes

# Answer
# Perl 5 \+ `-M5.10.0`, 28 bytes

```
$}.=$_ x say$_..Z,$}for A..Z

```

Try it online!
> 2 votes

# Answer
# !@#$%^&\*()\_+, ~~381~~ ~~51~~ ~~48~~ 44 bytes

```
Z(_^_%!_^_$($%$)$%%)+(%(!@%)+$%  _+%
@_^_)

```

Try it online!

I'm pretty bad at golfing codes.

if you know something, please tell me in comments.
> 2 votes

# Answer
# !@#$%^&\*()\_+, ~~28~~ 26 bytes

```
(!*)+(*%(!A*+@%)+$%%
@)

```

Try it online!
> 2 votes

# Answer
# Uiua, 15 characters (23 bytes)

```
≡&p+@A◿26⊞+.⇡26
            ⇡26 # [0 1 2 ... 25]
         ⊞+.⇡26 # A 26×26 addition table
   +@A◿26        # Convert to letter
≡&p              # Print each line

```
> 2 votes

# Answer
## Pyke, ~~14~~ ~~13~~ 10 bytes

```
G26V
DtRh+

```

Try it here!

Ignore function output.
> 1 votes

# Answer
# Python 3, ~~82~~ ~~79~~ 69 bytes

A simple nested loop that prints `''.join`ed lines one at a time. Golfing suggestions are welcome.

**Edit:** -13 bytes thanks to Leaky Nun.

```
for i in range(26):print("".join(chr(65+(i+j)%26)for j in range(26)))

```

**Ungolfed:**

```
for row in range(26):
    s = ""
    for column in range(26):
        s += chr(65 + (row+column) % 26)
    print(s)

```
> 1 votes

# Answer
# Python 3, 55 bytes

```
i=702
while i:i-=1;print(end=chr(10+(i%27and 80-i%26)))

```

Similar to my C answer: a single loop, printing the alphabet every 26 characters but with every 27th character replaced by a newline.
> 1 votes

# Answer
# Cheddar, 79 bytes

```
(|>26).map(l->String.letters.slice(l)+String.letters.slice(0,l)).vfuse.slice(1)

```

Pretty ugly answer. I would of had a much nicer answer if I fixed `cycle` in time:

```
(|>26).map(String.letters.cycle).vfuse

```
> 1 votes

# Answer
# Perl 5, ~~39~~ 36 bytes

```
print$_%27?chr$_%26+65:$/for-26..675

```

Similar to my C answer: a single loop, printing the alphabet every 26 characters but with every 27th character replaced by a newline.

Thanks to Dom Hastings for −2 bytes.
> 1 votes

# Answer
# JavaScript, 86 bytes

```
"ABCDEFGHIJKLMNOPQRSTUVWXYZ".repeat(27).split("").map((n,m)=>m%27==26?"\n":n).join("")

```

Inspired by Anders Kaseorg's C solution

I decided this answer was different enough from the existing JS solutions to warrant its own answer.
> 1 votes

# Answer
# Sesos, 39 bytes

Hexdump:

```
0000000: 2849b2 6f59be 65f996 e5cbd2 a041d3 eb61c7 6059be  (I.oY.e......A..a.`Y.
0000015: 65e9e7 765a96 a67bd8 315896 6f59fa f93d07         e..vZ..{.1X.oY..=.

```

Assembler:

```
add 65,fwd 1,add 26,fwd 1,add 26,fwd 1,add 26,fwd 1,add 10,rwd 1
jmp
  sub 1,rwd 1
  jmp
    sub 1,rwd 1,sub 1,rwd 1,put,add 1,fwd 1
    jmp,rwd 2,jnz
    rwd 1
    jmp,sub 26,fwd 1,add 26,rwd 3,jnz
    fwd 4
  jnz
  add 26,rwd 1
  sub 1,rwd 1,add 1,fwd 1
  jmp,rwd 2,jnz
  rwd 1
  jmp,sub 26,fwd 1,add 26,rwd 3,jnz
  fwd 6,put,rwd 1
jnz

```

Try it online!
> 1 votes

# Answer
## Emacs Lisp, 117 bytes

```
(let((s(mapcar'string(number-sequence ?A ?Z))))(dotimes(i 26)(message(apply'concat s))(setcdr(last s)(list(pop s)))))

```

Uses a list storing the alphabet and always appends the head to the tail. A more general approach would be the following function

```
(defun tabula-recta (glyphs)
  (dotimes (i (length glyphs))
    (message (apply 'concat glyphs))
    (setcdr (last glyphs) (list (pop glyphs)))))

```

which could be called in a similar fashion.

```
(tabula-recta (mapcar'string(number-sequence ?A ?Z)))

```
> 1 votes

# Answer
## Batch, 94 bytes

```
@set a=ABCDEFGHIJKLMNOPQRSTUVWXYZ
@for /l %%i in (0,1,25)do @call echo %%a:~%%i%%%%a:~0,%%i%%

```
> 1 votes

# Answer
# Postscript, 153 bytes of code, 213 bytes for well-structured EPS

You might want your *tabula recta* in a form you can print out and put a Cardan grille on top of. This is an EPS (Encapsulated Postscript) file, which can be printed as is or embedded in a larger document at whatever scale you like.

```
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 187 258
/Courier findfont 12 scalefont setfont
0 1 25{dup neg 25 add 10 mul 0 exch moveto
0 1 25{1 index add 26 mod 65 add( )dup 0 4 3 roll put show}for
pop}for
showpage

```

PostScript is really thorough about its reverse Polish notation, even more so than Forth. This *looks* cryptic, but hasn't been obfuscated at all, except by minimizing whitespace. The actual computation...

```
0 1 25 {
    dup
    neg 25 add 10 mul 0 exch moveto
    0 1 25 {
        1 index add 26 mod 65 add
        ( ) dup 0 4 3 roll put
        show
    } for
    pop
} for

```

... is pretty much *the* most straightforward way to do this in this language. ("`1 string`" might be preferred to "`( )`" but that's longer.)

I used Courier because it's the fixed-width font included in the original core font set, and therefore doesn't have to be embedded in the file.
> 1 votes

# Answer
## Ruby, ~~75~~ 42 bytes

~~`a=('A'..'Z').to_a;l=a.length;l.times {l.times {|i|$><<a[i]};a.rotate!;puts}`~~

```
a=*?A..?Z;26.times {puts a.join;a.rotate!}

```
> 1 votes

# Answer
## Actually, 15 bytes

```
5Pτr`úi(}akΣ`Mi

```

Try it online!

Explanation:

```
5Pτr`úi(}akΣ`Mi
5Pτr             range(26)
    `úi(}akΣ`M   for each element n:
     úi(           lowercase English alphabet, flatten, move n to top
        }          rotate stack left n times
         akΣ       invert stack, push as list, concatenate
              i  flatten

```
> 1 votes

# Answer
# Java 1.8, ~~106~~ 101 bytes

Simply prints every character as a byte, followed by a line feed (which forces a flush on the line-buffered `System.out` stream), by using mod operations.

```
interface C{static void main(String[]a){for(int i=-1;++i<702;)System.out.write(i%27>25?10:i%26+65);}}

```

Run it.

*Shaved off a few bytes thanks to @KevinCruijssen*

Initially my attempts had a pre-defined alphabet string, since I had a hard time generating the sequence with less characters. The shortest version I managed to find basically runs a 26-character window over a string that contains the alphabet twice:

151 bytes

```
class G{public static void main(String[]a){String s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";s+=s;int i=0;while(i<26){System.out.println(s.substring(i,++i+25));}}}

```

Run it
> 1 votes

# Answer
# Javascript 98 bytes

```
s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";for (var i = 0; i < 26; i++) {console.log(s);s=s+s[0];s.substr(1);}

```

try it yourself at: https://jsfiddle.net/dL0vg3cL/1/
sorry i don't know how to do the character count
> 1 votes

# Answer
# C#, 157 Chars

```
class P{static void Main(){string x="ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(int i=0;i<x.Length;i++)Console.WriteLine(x.Substring(i,x.Length-i)+x.Substring(0,i));}}

```
> 1 votes

# Answer
# \>\<\>, 44 bytes

```
0:1[\ao]1+:dd+=?;!
$l(?\:1+dd+:@%
ol?!\{"A"+

```

Try it online!
> 1 votes

# Answer
# Brachylog, ~~19~~ 16 bytes

```
~~25yeN,@A:N:$(iw@Nw\~~
@A~c[A:B]rcw@Nw\

```

Try it online!

### Explanation of the 16-byte solution

```
@A~c[A:B]rcw@Nw\
@A~c[A:B]            @A is in the form of A+B.  (choice point)
                     (@A == 'abcdefghijklmnopqrstuvwxyz')
         rcw         Write B+A to STDOUT.
            @Nw      Write '\n' to STDOUT.
               \     Backtrack to last choice point and
                     make the next choice until there is
                     no more choice left.

```

### Explanation of the 19-byte solution

```
25yeN,@A:N:$(iw@Nw\
25yeN                N is a number between 0 and 25 inclusive. (choice point)
      @A:N:$(iw      @A left-rotated N times, print it to STDOUT.
                     (@A == 'abcdefghijklmnopqrstuvwxyz')
               @Nw   Write '\n' to STDOUT.
                  \  Backtrack to last choice point and
                     make the next choice until there is
                     no more choice left.

```
> 1 votes

# Answer
# VBA, ~~71 bytes~~ 70 bytes

Run the below code in the Immediate Window

```
for j=1to 26:a="ABCDEFGHIJKLMNOPQRSTUVWXYZ":?mid(a,j)&left(a,j-1):next

```

Output:

```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY

```
> 1 votes

# Answer
## Racket 126 bytes

```
(let((d display)(g integer->char))(for((i 26))(for((j(range i 26)))(d(g(+ j 65))))(for((k(range 0 i)))(d(g(+ k 65))))(d"\n")))

```

Ungolfed:

```
(define(f)
  (let ((d display)
        (g integer->char))
    (for ((i 26))
      (for ((j (range i 26)))
        (d (g (+ j 65))))
      (for ((k (range 0 i)))
        (d (g (+ k 65))))
      (d"\n"))))

```

Testing:

```
(f)

```

Output:

```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY

```
> 1 votes

# Answer
# tcl, 75

```
time {puts -nonewline [format %c [expr ([incr i]%27)?($i-1)%26+65:10]]} 702

```

Can be seen running on: http://rextester.com/live/BNZ46923
> 1 votes

# Answer
# Pushy, 5 bytes

Non-competing as the language postdates the challenge, but I though I'd post it as it's the same length as the 05AB1E answer...

```
AL:"{

```

**Try it online!**

This takes advantages of cyclic shifting:

```
A      \ Push the uppercase alphabet, as a list of charcodes.
 L:    \ Length (yields 26) times do:
   "   \   Print the characters
    {  \   Cyclically shift left, once.

```
> 1 votes

# Answer
# Perl 6, 40 bytes

```
say [~] (|("A".."Z")xx 2)[^26+$_]for ^26

```

Joshua's answer already shows the canonical way to do this in Perl 6, but I thought it might be interesting to show a solution that doesn't use the `rotate` built-in.

### How it works

```
                                 for ^26  # For each index from 0 to 25:
           "A".."Z"                       #   Generate the alphabet.
         |("A".."Z")                      #   Slip it into the outer list.
                    xx 2                  #   Repeat it, yielding a flat list of 52 characters.
        (               )[      ]         #   Index this list using:
                          ^26             #      The range from 0 to 25,
                             +$_          #      with the loop counter added to both endpoints.
    [~]                                   #   Concatenate the result.
say                                       #   Print it, followed by a newline.

```
> 1 votes

# Answer
# Ruby, 43 bytes

`26.times{|i|puts(([*?A..?Z]*2)[i,26].join)}`

## Explanation

`[*?A..?Z]`
This creates a list from 'A' to 'Z', using ruby's literal character syntax `?A` and the splat operator on a range.

It then doubles this list, and cycles through it 26 times, printing out 26 characters with an increasing offset.
> 1 votes

# Answer
# Python 2, 58 bytes

```
a=bytearray(range(65,91))*2
exec'print a[:26];a=a[1:];'*26

```

Try it online!
> 1 votes

# Answer
# Python 2, 60 bytes

```
s = string.uppercase
for i in range(0,26):print s[i:]+s[:i]

```

Needs the string library to run.
> 1 votes

# Answer
# Pyth, 8 bytes

```
j.u.<N1G

```

Try it online!
> 1 votes

# Answer
# Recursiva, 13 bytes

```
{("P+}J''_Q(}

```

Try it online!

# Explanation

```
{("P+}J''_Q(}
{             - For each
 (            - Upper-case alphabet yield
  "           - Iteration command begin
   P          - Print
    +         - Concatenate 'BCDE...XYZA'
     }        - Current element say 'B' (2nd iteration)
      J''     - join with nothing 'CDE...XYZA'
         _    - Reverse; ['CDEF.... XYZ', 'A']
          Q(} - Split ( at }'i.e. B'; ['A','CDEF....XYZ']

```
> 1 votes

# Answer
# Pyth, ~~11 10~~ 7 bytes

-1 based off Jakube's idea.

-3 from Jakube

I'd like to see how far down this could be golfed. I'm guessing it'll have mapping somewhere in there.

Also, I'm taking a stab in the dark assuming that non-fixed-input s need not support input. If there is a meta page, could somebody link it?

```
VG=+t
GN

```

Explanation:

```
         (G=lowercase alphabet)
VG       Print the alphabet; For in the all but the last character of the alphabet:
  =+t    (New line = print next arg + input which I assume is empty)
     GN  Append the first character of G (the current index) to the end of G. This is pretty neat, while returning the value, it does two things: print the tabula, and modify the G variable.

```

Try it online!
> 1 votes

# Answer
# Kotlin, 59 bytes

```
(0..25).map{i->(0..25).map{print('A'+(it+i)%26)}
println()}

```

## Beautified

```
    (0..25).map{i->
        (0..25).map { print('A' + (it+i)%26) }
        println()
    }

```

## Test

```
fun x() =
(0..25).map{i->(0..25).map{print('A'+(it+i)%26)}
println()}

fun main(args: Array<String>) {
    x()
}

```

TryItOnline
> 1 votes

# Answer
# Mathematica, 56 bytes

```
StringRiffle[NestList[RotateLeft,Alphabet[],25],"\n",""]

```

Pretty simple. Just gets a list of all the rotations of the alphabet, then joins them with newlines and spaces within the lines.
> 1 votes

# Answer
# Husk, 8 bytes

```
U¡ṙ1…"AZ

```

Try it online!

### Explanation

```
     "AZ  -- string: "AZ"
    …     -- fill the gaps: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 ¡        -- iterate the following infinitely times & accumulate results in list
  ṙ1      -- rotate by 1 (eg. first time: "BCDEFGHIJKLMNOPQRSTUVWXYZA")
U         -- only keep the longest prefix with unique elements

```
> 1 votes

# Answer
# brainfuck, ~~137 135~~ 128 bytes

```
++[[+<]>+>++]<[[-<+>>+<]>-]<----[<[+<]>[>]<----]<,<[[[.<]<]>>[[>]>]<<[[<]<[<]<+>>[>]>[>]<-]<[<]<[<]<[->+<]++++++++++.,>[>]>[>]<]

```

Try it online!

### How it Works:

```
++[[+<]>+>++]<  Generates the number 27
[[-<+>>+<]>-]   Copies and decrements the 27 until it is 0
                Tape looks like 27 26 25 24 23 21 ... 3 2 1 0 0'
<----[<[+<]>[>]<----] Adds 63 to each number, making them correspond to the uppercase alphabet and @
<, Pop the excess @
There are going to be two strings separated by a 0
The second is intitially blank
<[ While the first string exists
   [[.<]<] Print the two strings of characters
   >>[[>]>]<< Go to the start of the first string
   Copy the first character of the first string to the end of the second string
   [[<]<[<]<+>>[>]>[>]<-]<[<]<[<]<[->+<]
   ++++++++++., Print a newline
   >[>]>[>]< Go to the start of the first string
] Ends if the first string is empty

```
> 1 votes

# Answer
# uBASIC, 68 bytes

That pesky `Chr$()` and adding extra spaces forces the use of `Left$()` for +7 Bytes

```
0ForI=0To25:ForJ=0To25:?Left$(Chr$(65+(I+J)Mod 26),1);:NextJ:?:NextI

```

Try it online!
> 1 votes

# Answer
## Pyth, 9 bytes

```
VlG.<rG1N

```

Try it online!

If lowercase is allowed, the code can be shortened to 7 bytes:

```
VlG.<GN

```

which ties Leaky Nun's (also lowercase) answer.
> 1 votes

# Answer
# Red, 66 65 bytes

```
repeat n 26[repeat m 26[prin to-char n + m - 2 % 26 + 65]print""]

```

Try it online!
> 1 votes

# Answer
# Small Basic, 117 bytes

Script that takes no input and outputs to the `TextWindow` object

```
For I=0To 25
s=""
For J=0To 25
s=s+Text.GetCharacter(65+Math.Remainder(I+J,26))
EndFor
TextWindow.WriteLine(s)
EndFor

```

Try it at SmallBasic.com! *Requires Silverlight and thus must be opened with IE*
> 1 votes

# Answer
# Pepe, 79 bytes

```
rEeEeeeeeEREeEeEEeEeREERrEEEEErEEEeReerEEEEREEreeereeErRrEEEEEEEREEEEEEEReereee

```

Try it online!
> 1 votes

# Answer
# Gol\>\<\>, 21 bytes

```
`Z9sF:M|lFlKasRo}ao|;

```

2 bytes knocked off courtesy of JoKing, who also designed a version that has a leading newline (click here for it)

Try it online!

**Gol\>\<\>, 23 bytes**

```
`Z9sF:M|asFasKasRo}ao|;

```

Golfed off a *ton* of bytes by pushing the letters of the alphabet in! I'm going to try to make the output code smaller.

Try it online!

**Old version, 44 bytes**

```
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"rasFasKasRo}ao|;

```

This is a brute force method of doing this, but I will golf it down some more.

Try it online!
> 1 votes

# Answer
## **T-SQL, 155 154 bytes**

~Removed semicolon to save 1 byte.

It isn't as short as the other T-SQL answer, but I wanted to create a recursive SQL sample, and only have SQL server installed.

```
WITH f AS(SELECT 1n,CAST('abcdefghijklmnopqrstuvwxyz'AS VARCHAR(MAX))v UNION ALL SELECT n+1,RIGHT(v,LEN(v)-1)+LEFT(v,1)v FROM f WHERE n<26)SELECT v FROM f

```

~Added link to test environment~

https://rextester.com/CVII57986
> 1 votes

# Answer
# Japt`-R`, ~~14~~ 8 bytes

```
;26ÆBéYn

```

-6 bytes thanks to @Shaggy!

Try it Online!
> 1 votes

# Answer
# Malbolge, 4829 bytes

```
D'`$_?o!<YG9y7xBS@tsN/p'n+$)iiW%C#/yQP<*)LxwvuWm3qSong-ejibgf_^]#D`Y^WVzZ<;WVONrRKJIHlLKJIHAeEDC<$:^>=<|:3W1w54-,P*/.-&%I)"'&}C{z!x>|{z\r8vuWVl2pRQmf,dcbgfed]#[`_XWVzZY;:PtNSLKJnNMLKJC+AeED=%A@?8\<;492V0/S3sr0)M-,+k)"F&f$#"!x}v<z\xqp6tmrkjong-ejchgf_%]\a`Y}@V[TYXWVOsSLQPIHlFKDIHG@dD=<;:^87<;492V0543,P0)('&J*)('g%${A!x}|u;yrwvun4rkSong-Ndcb(I_^cb[!_^]VUZSRv9OsS54PIHMLEiIHG)E>b<A:98\<;{3810T43sr0)M-,+k)"F&%$#"baw=uzsr8potsrqjoh.lejchgf_%]\a`Y}@V[TYXWVOsSLQPIHlFKDIHG@dD=<;:^87<;492V0543,P0)('&J*)('g%${A!x}|u;yrwvun4rkSong-Ndcb(I_^cb[!_^]VUZSRv9OsS54PIHMLEiIHG)E>b<A:98\<;{3810T43sr0)M-,+k)"F&%$#"baw=^]sxwp6tsrqpRQ.lNjchgfedcbaZ~^@?[TxXW9OTMqQJn1GLEJIHAe('C<`@9876Z{92V65u-,+O/.',+*#G'&f${A!~}|ut:[qvutml2jonmf,dLhg`&^c\"Z_X|\>TYRQuUT6RQPOHGFjJC+G@dDC%A@?8\<;4981U543,+O)o',+$)"F&%${"y?}vu;yxwvXnm3qSongfe+iKg`_%cb[`Y^W{UZYRvVOTSLpPO10FEiI+*FE>=aA@?8=6;4X870/S-2+0)M'm+*#G!~%|#z@x}|{zyr8vonslk1ohglkjiba'_^$ED`_XWVzZYRWVOsSR43ONGk.JIBfFEDCB;#?8\6;:981U54321qp('K%I#('&%|B"ba}v<tsr8po5slTpoh.lNjchgf_^$\a`_X|\[ZYR:Pt7SLQPIm0FKDCgGFE'&<`@?87[;:zy1U/4-2+O/.'m%Ij"'~%$#z@x}|{tsr8putsl2pohPle+cbgf_d]#a`Y^]VzT<RWPONMqKJINMLKDhBA@E>b%;_?8=<;43Wx0/S3,+O/.-&+*#Gh&}|#z!~}v<]yrqp6WVrkj0nPlkdcb(`_^]#DZ_^]VUTxXQVONMqQPINMFjJI+*@dD&BA@?8\};:981U543,+O).'&+$H('~%${A!~w_{zyxwvo5mUqj0nPlkjcba'_^]ba`Y}]V[ZSwWP8TSLpJONMFjJIH*)?c=<A@?87[;492V0/S-2+0)(L,%$)"!Ef$#"!x}v<z\xwvun4rTpoh.lkjcb(Iedc\"`_^]V[ZSw:VUNMqQ3ONGLEi,BA@d>=BA@?8\}54981U54t210/.'Kl$)('~%${A!~w_{zyxwvo5mUqj0nPlkjcba'_^]ba`Y}]V[ZSwWP8TSLpJONMFjJIH*)?c=<A@?87[;492V0/S-2+0)(L,%$)"!E%|{zy?w|ut:rZvun4rkSonmf,jcbg`_^]#DCY}W?UTSw:VONrRKJIHlLEJCHAeE'=a$#?>765Y9y76/S-,Pq/('&Jkj('&%|Bzb~}v<tsrq7otmrkj0nPfed*Kgfe^$\[`Y}@\[TxXW9OTMLQPOHlLKDIBAFE>b%;:?8\<;4921U5.-,P0)('&%I)(!E%${"y?`_u;yrwvun4rqjih.lNdcb(`Hd]\aZ~^]\>ZSwWV8TSLpJOHGFjJCHG@dDC%A@9]7<;:981U5.-Qr0/.'&%I)('~%|Bcyxwvu;yxwvuWm3qSong-ejibgf_^]#D`Y^WVzZ<;WVONrRKJIHlLKJIHAeEDC<$:^>=<|:3W7654-s+*N.-&Jkj('~D${"!~}|u;yrq7uWVl2pRQmf,dcbgfed]#[`_XWVzZY;:PtNSLKJnNMLKJC+AeED=%A@?8\<;492V0/S3sr0)M-,+k)"F&%$#"baw=^]sxwp6tmrkjong-ejchgf_%]\a`Y}@V[TYXWVOsSLQPIHlFKDIHG@dD=<;:^87<;492V6/S3,Pq/.-,+*#G'&f${A!~}|ut:[qvutml2jonmf,dLhg`&^c\"Z_X|\>TYRQuUT6RQPOHGFjJC+G@dDC%A@?8\<;4981U543,+O)o',+$)"F&%${"y?}vu;srqpo5srkpoh.lNjihg`_%cb[`Y^W{UZYRvVOTSLpPO10FEiI+*FE>=aA@"!7<5Yzy1054-,P*/.'&J*#('~De{z@~}_^zyr8vonslk1ohglkjiba'_^$ED`_XWVzZYRWVOsSR43ONGk.JIBfFEDCB;#?8\6;:981U54321qp('K%I#('&%|B"ba}v<zyrwvo5Vlqpi/gfejc)g`Hdc\[`_X|VUZSRvPUTMRKPIm0LEJCBfFE'C<`#9>=6Z:9810/S3,+O/.-m%I)(h~D|#"!x}|ut:rwvonm3qpoQPlkdchgf_%cE[!_^@\[Tx;QVONSRKJn1MFEJIBA@d'=aA@?87[;:981w5.R21q/.'K%$H('~%|Bzbxw|ut:xqYotsrk1ohgf,dihaf_^$\a`_X|\[ZYR:Pt7SLQPIm0FKDCgGFE'&<`#9>=6Z:981U/4-2+O/.'m%Ij"'~%$#z@x}|{tsr8putsl2pohPle+cbgf_d]#a`Y^]VzT<RWPONMqKJINMLKDhBA@E>b%;_?8=<;43Wx0/S3,+O/.-&+*#G'gf${z@~w={z\xwvun4rTpoh.lkjcb(Iedc\"`_^]V[ZSw:VUNMqQ3ONGLEiCHG@?>=<`@9>=<54X870543,Pq/.'Kl$)('~%${A!~w_{zyxwvo5mUqj0nPlkjcba'_^]ba`Y}]V[ZSwWP8TSLpJONMFjJIH*)?c=<A@?87[;492V0/S-2+0)(L,%$)"!E%|{zy?w_uzsxq7otsl2pRQmle+cb(`_^cb[!_^@\Uy<;WVOs65KJIHlFKDCBfFE'=a$#?>765Y9y76/S-,Pq/('&Jkj('&%|Bzb~}v<tsrq7otmrkj0nPfed*Kgfe^$\[`Y}@\[TxXW9OTMLQPOHlLKDIBAFE>b%;:?8\<;4921U5.-,P0).-&J*j"!E}|{Ay~w={tyxq7otsrk1iQmf,Mchg`ed]#a`_^]\UyS;WVUTSLpJOHGFjJCHG@dDC%A@9]7<;:981U5.-Qr0/.'&%I)('~%|Bcyxwvu;yxwvuWm3qSong-ejibgf_^]#D`Y^WVzZ<;WVONrRKJIHlLKJIHAeEDC<$:^>=<|:3W1w54-,P*/.-&%I)"'&}C{z!x>|{z\r8vuWVl2pRQmf,dcbgfed]#aZ_^]V[Tx;:PtNSLKJnNMLKJC+AeED=%A@?8\<;492V0/S3sr0)M-,+k)"F&%$#"baw=^]sxwp6tmrkjong-ejchgf_%]\a`Y}@V[TYXWVOsSLQPIHlFKDIHG@dD=<;:^87<;492V0543,P0)('&J*)('g%${A!x}|u;yrwvun4rkSong-Ndcb(I_^cb[!_XWVzZS;Qu8TMRKJINMLEiIHG)E>b<A:98\<;{3810T43sr0)M-,+k)"F&%$#"baw=^]sxwp6tmrkjong-ejchgf_%]\a`Y}@V[TYXWVOsSLQPIHlFKDIHG@dD=<;:^87<;492V0543,P0)('&J*)('g%${A!x}|u;yrwvun4rkSong-Ndcb(I_^cb[!_^]VUZSRvVUTSR4o2HMFEDIHAeED=%A@?8\<;492V0/S3sr0)M-,+k)"F&%$#"baw=^]sxwp6tmrkjong-ejchgf_%]\a`Y}@V[TYXWVOsSLQPIHlFKDIHG@dD=<;:^87<;492V0543,P0)('&J*)('g%${A!x}|u;yrwvun4rkSong-Ndcb(I_^cb[!_^]VUZSRv9OsSR4oONG/EDCgG@E>b<;:?>=<5Y9y10/S3,+O)o',+$)"F&%${"y?}vu;srqpo5srkpoh.lNjihg`_%cb[`Y^W{UZYRvVOTSLpPO10FEiI+*FE>=aA@?8=6;4X870/S-2+0)M'm+*#G!~%|#z@x}|{zyr8vonslk1ohglkjiba'_^$ED`_XWVzZYR:uUTSR43ONGk.JIBfFEDCB;#?8\6;:981U54321qp('K%I#('&%|B"ba}v<zyrwvo5Vlqpi/gfejc)g`Hdc\[`_X|VUZSRvPUTMRKPIm0LEJCBfFE'C<`@?>7};:3W765u-Qr*/.'&Jkj"'~}Cdz!x}|u;\rqp6Wsrqpinmfe+Lbaf_%cE[!_^@\[TxR:u8NMLKJINMLEiC+G@?>bBA@?87[;:981w5.R21q/.'K%$H('~%|Bzbxw|ut:xqYotsrk1ohgf,dihaf_^$\a`_X|\[ZYR:Pt7SLQPIm0FKDCgGFE'&<`@?87[;:zy1U/4-2+O/.'m%Ij"'~%$#z@x}|{tsr8putsl2pohPle+cbgf_d]#a`Y^]VzZYR:u87SLKJnNGLKDhH*)?c=<A@?87[;492V0/S-2+0)(L,%$)"!E%|{zy?w_uzsxq7otsl2pRQmle+cb(`_^cb[!_^@\Uy<;WVOs65KJIHlLEJCHAeE'=a$#?>765Y9y76/S-,Pq/('&Jkj('&%|Bzb~}v<tsrq7onmlqj0nPfed*Kgfe^$\[`Y}@\[TxXW9OTMLQPOHlLKDIBAFE>b%;:?8\<;4921U5.-,P0).-&J*j"!E}|{Ay~w={tyxq7otsrk1iQmf,Mchg`ed]#a`Y^]Vz=YXQuUN6RKJOHGFjJCHG@dDC%A@9]7<;:981U5.-Qr0/.'&%I)('~%|B/

```

Try it online!
> 1 votes

# Answer
# Stax, 21 8 bytes

```
Ç╙Ö&XΔ┼§

```

Run and debug it

old solution

```
É%≡m√£¿oR'ñ÷►H◘Æ£╠◄µ-

```
> 1 votes

# Answer
# Poetic, 510 bytes

```
THE BOOGEYMAN WAS HERE,i read
a story i saw,a story i saw
it reads:WE SAW IN STARS AN END TO EARTH
i saw magic spells,oracles of chaos
i also saw hexes
o,i know a curse is a legend/a lie
i think i know a curse i saw
a curse is hogwash
now i browse a book
o,i laugh
it is trash
o,i giggle
in a bang,i heard a POW
a flash,a puff o flames
IT IS SATAN,said an unholy devil
go satan
i saw a story,i said,a story i saw
a coming doom,i said
a demon i saw
i scream:o,do beware of looming evils
o no

```

Try it online!

Poetic is an esolang I made in 2018 for a class project. It's basically brainfuck with word-lengths instead of symbols.

The point of the language is to allow for programs to be written in free-verse poetry. This specific poem was based on the brainfuck solution by Dorian (I had one, but it took longer to run and it was more bytes).
> 1 votes

# Answer
## Pip, ~~17~~ 15 bytes

```
Fi,26Pz@>i.z@<i

```

Loops 26 times over Pip's built-in a-z variable and prints the table shifted each time.

-2 bytes from Dlosc ~~because he actually read the question~~

Try it online!
> 1 votes

# Answer
# Python 3, 76 bytes

```
a="".join(list(map(chr,range(65,91))))
for i in range(26):print(a[i:]+a[:i])

```

Try it online!
> 1 votes

# Answer
# Jelly, 6 bytes

```
ØAṙƬ1Y

```

Try it online!

## How it works

```
ØAṙƬ1Y - Main link. Takes no arguments
ØA     - Yield the uppercase alphabet
   Ƭ   - Until a repeated value is found, collecting all intermediate values:
  ṙ 1  -   Rotate the uppercase alphabet once to the left
     Y - Join by newlines and implicitly print

```
> 1 votes

# Answer
# BRASCA, 24 bytes

```
D:e{+re[a0,[:om]loxm,A{]

```

Try it online!
> 1 votes

# Answer
# Vyxal `jrṀ`, 5 bytes

```
₄ƛkAǓ

```

Try it Online!

Or a flagless alternative for 6 bytes.
> 1 votes

# Answer
# Elixir, 64 bytes

Experimenting with learning Elixir, there's probably a better way, but this is the best I've come up with so far...

```
import Enum
a=?A..?Z
map 0..25,&IO.puts slice(concat(a,a),&1,26)

```

Try it online!
> 1 votes

# Answer
# Bash \+ coreutils (`tr`), 58 bytes

-5 bytes thanks to @pxeger!

```
for c in {A..Z};{
eval "echo {$c..Z} $e|tr -d ' '"
e+=$c
}

```

Try it online!
> 1 votes

# Answer
# Excel, 65 bytes

```
=LET(x,ROW(1:701),CONCAT(IF(MOD(x,27),CHAR(MOD(x-1,26)+65),"\n")))

```

/n represents a line break input with `Alt`+`Enter`.
> 1 votes

# Answer
# Zsh, 47 bytes

```
for c ({A..Z}){echo {$c..Z} $e|tr -d \ ;e+=$c;}
```

Attempt This Online!

Thanks to Dom Hastings!
> 1 votes

# Answer
# Pip, 12 bytes

```
P*z@$+GMC26u

```

Try It Online!

### Explanation

```
       MC26   Map this function to a 26x26 grid of coordinate pairs:
    $+          Sum
      G         the two coordinates
   @            Use that as a (cyclical) index into
  z             the lowercase alphabet
P*            Print each row of the grid
           u  Suppress autoprinting

```
> 1 votes

# Answer
# Vyxal 3 `j`,, 4 bytes

```
nᶨṘS

```

Try it Online!
> 1 votes

# Answer
# Python 2, 60 bytes

```
print''.join(chr(10+(-~i%27and 55+i%26))for i in range(701))

```

Similar to my C answer: a single loop, printing the alphabet every 26 characters but with every 27th character replaced by a newline.
> 0 votes

# Answer
# Racket, 130 bytes

```
(display(string-join(build-list 26((λ(l)(λ(n)(list->string(append(drop l n)(take l n)))))(map integer->char(range 65 91))))"
"))

```

Racket doesn't have a `cycle`-like function for its lists, so I have to make do.
> 0 votes

# Answer
# C#, 100 bytes

Supplied because I think the other C# answer is invalid, and this is a different way of generating the table entirely. Full program because I don't like supplying just functions... and because it's 100bytes. *Appears to use the same method as the VBA answer provided by Joffan.*

```
class P{static void Main(){for(int i=0;i<702;i++)System.Console.Write((char)(i%27>25?10:i%26+65));}}

```

Optional trailing `\n` (change 702 to 701 to get rid of it). Very simple: works by counting from 0 to 26\*27 (26 letters + 1 newline, 26 times). Each count of `i`, it prints the char value of either 10 (`LF`) if it is newline time (every 27th character), else it prints the capital ASCII numeral of the `i%26`th letter of the alphabet. The starting letter is implicitly offset by injecting the LF at every 27th character.

I am sad I can't move the `i++` out of the loop declaration, but I don't think it pays to turn the conditional into a lookup/other, which would enable me to perform the increment after computing the alphabet ASCII value.

Formatted code:

```
class P
{
    static void Main()
    {
        for(int i=0;i<702;i++)
            System.Console.Write((char)(i%27>25?10:i%26+65));

        System.Console.ReadKey(true); // just for debug
    }
}

```
> 0 votes

# Answer
## ListSharp, 200 bytes

```
ROWS s=ROWSPLIT "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z" BY [","]
[FOREACH NUMB IN 1 TO 26 AS k]
{
ROWS a=GETLINES s [k TO 26]
ROWS b=GETLINES s [0 TO k-1]
STRG p=p+a+b+<newline>
}
SHOW=p

```

Even if you dont know this language, you can probably see how straight forward it is.

Thats the point of it, feel free to ask any questions
> 0 votes

# Answer
# Python 2, 68 bytes

A simple `exec` loop that prints `''.join`ed lines one at a time. Golfing suggestions are welcome.

```
i=0;exec"print ''.join(chr(65+(i+j)%26)for j in range(26));i+=1;"*26

```
> 0 votes

# Answer
# Java, 163 bytes

```
public class M{public static void main(String[]s){String a="abcdefghijklmnopqrstuvwxyz";for(int i=-1;++i<26;)System.out.println(a.substring(i)+a.substring(0,i));}}

```

More readable version:

```
public class M {
    public static void main(String[] s) {
        String a = "abcdefghijklmnopqrstuvwxyz";
        for (int i = -1; ++i < 26;)
            System.out.println(a.substring(i) + a.substring(0, i));
    }
}

```

Essentially, every iteration, it starts at index `i` and prints to the end, then starts at index `0` and prints to index `i`. I'm sure I could golf this down a bit.
> 0 votes

# Answer
## Javascript (using external library) (88 bytes)

```
a=>_.Range(0,26).WriteLine(x=>_.Range(x,26).Write("",y=>String.fromCharCode((y%26)+65)))

```

Link to lib: https://github.com/mvegh1/Enumerable

Code explanation: Create range from 0 to 25. For each integer in range, write a line according to the predicate. For each integer, the predicate says to create a range starting at the current integer value, extending for 26 elements. That range is concatenated into a single string, according to a predicate that modulates that range's current integer value by 26, adds 65 because thats the code for 'A', then gets parsed to a string.
> 0 votes

# Answer
## SAS/IML, 88 bytes

```
proc iml;a=j(26,26);do r=0to 25;a[r+1,]=mod((0:25)+r,26)+65;end;a=byte(a);print a;quit;

```

Explanation:

```
proc iml;        *necessary?;
  a=j(26,26);    *initialize matrix;
  do r=0to 25;   *iterate for 26;
      a[r+1,]=mod((0:25)+r,26)+65;  *Assign correct ASCII code - mod by 26;
  end;
  a=byte(a);     *use BYTE function, cannot use this on earlier line unfortunately;
  print a;       *actual output;
quit;            *necessary?;

```

Unfortunately have to initialize the matrix in IML for this to work, and cannot apply the `byte()` call in the assignment stage, so lose a few bytes there. Not sure if `quit;` should be needed, or even if `proc iml;` is needed, per rules - these are needed to type the whole thing into the SAS process as is, there is no IML specific executable, but there *is* "IML Studio" which perhaps would mean we don't need those 14 bytes?

Another SAS/IML option that golfs to a byte bigger - 89 bytes that is - is the equivalent of the R optimal solution:

```
proc iml;
  a=repeat('A':'Z',26);   *initialize array to all A-Z;
  do r=1 to 25;           *we have to (and want to) skip row one;
      a[r+1,]=a[1,r+1:26]||a[1,1:r];  *concatenate subvectors;
  end;
  print a;
quit;

```
> 0 votes

# Answer
# Groovy, 63

```
l='A'..'Z'as Queue;(l+[]).each{println l.join();l<<l.remove()}

```

Found a cool way to copy a list by using `(l+[])` instead of `l.clone()`
> 0 votes

# Answer
# Swift, ~~104~~ ~~84~~ ~~81~~ 73 bytes

```
(0...701).map{print(UnicodeScalar($0%27==26 ?13:65+$0%26),terminator:"")}

```
> 0 votes

# Answer
# VBA (Excel), 91 Bytes

```
Sub q()
For i=0 To 25
b=""
For j=0 To 25
b=b & Chr(65+(i+j) Mod 26)
Next
Debug.Print b
Next

```

I got amazed to Sir Joffan's logic so here's mine. tho it's a bit long. :D . I really learned a lot from this site.
> 0 votes

# Answer
# Jelly, 7 bytes

```
ØAṙJṙ-Y

```

Try it online!
> 0 votes

# Answer
# MY-BASIC, 70 bytes

A port of my uBASIC answer.

```
For i=0 To 25
For j=0 To 25
Print Chr(65+(I+J)Mod 26)
Next
Print;
Next

```

Try it online!
> 0 votes

# Answer
# Visual Basic .NET (Mono), 131 bytes

Another answer.

```
Module M
Sub Main
Dim I,J,S
For I=0To 25
S=""
For J=0To 25
S+=Chr(65+(I+J)Mod 26)
Next
Console.WriteLine(S)
Next
End Sub
End Module

```

Try it online!
> 0 votes

# Answer
# Yabasic, 60 bytes

Once again is again the best BASIC.

```
For I=0To 25
For J=0To 25
?Chr$(65+Mod(I+J,26));
Next
?
Next

```

Try it online!
> 0 votes

# Answer
# SNOBOL4 (CSNOBOL4), 69 bytes

```
M	&UCASE LEN(X) . R REM . L
	OUTPUT =L R
	X =LT(X,25) X + 1	:S(M)
END

```

Try it online!
> 0 votes

# Answer
# Rust Nightly, 168 bytes

```
#![feature(slice_rotate)]fn main(){let mut a=(65..91).collect::<Vec<u8>>();for _ in 0..26{println!("{}",String::from_utf8(a.clone()).unwrap());a.rotate_left(1);}}

```

Ungolfed version:

```
#![feature(slice_rotate)]
fn main() {
    let mut range = (65..91).collect::<Vec<u8>>();
    for _ in 0..range.len() {
        println!("{}",String::from_utf8(range.clone()).unwrap());
        range.rotate_left(1);
    }
}

```

The code is fairly self explanatory. range starts off being set to the ASCII alphabet (uppercase) and is leftshifted as the program runs.

The #!\[feature()\] is needed until the rotate\_left and rotate\_right std functions are stabilized.
> 0 votes

# Answer
## PHP, 100 Bytes

Try it online!

**Code, recursive function**

```
function f($p=25){$a=implode(range(A,Z));echo
($p>=0)?substr($a,$p).substr($a,0,$p)."
".f($p-1):"";}

```

**Explanation**

```
function f($p=25){      # The function get as a parameter the position
$a=implode(range(A,Z)); # create a string with all the letters from A->Z
echo ($p>=0)?           # position greater than 0, used on ^
substr($a,$p)           # substring from start to $p
.substr($a,0,$p)."      # concat with substring from $p
".f($p-1)               # call the function with next $p
:"";
}

```
> 0 votes

# Answer
# Prolog (SWI), 88 bytes

```
?-between(0,25,I),(between(0,25,J),C is 65+(I+J)mod 26,writef("%n",[C]),1=0;nl),1=0;1=1.

```

Try it online!
> 0 votes

# Answer
# Kotlin, 55 bytes

```
(0..701).map{print(if(it%27>0)'A'+(it-1)%26 else '\n')}

```

Testscript:

```
var f = {
(0..701).map{print(if(it%27>0)'A'+(it-1)%26 else '\n')}
}

fun main(args: Array<String>) {
    f()
}

```
> 0 votes

# Answer
# Gol\>\<\>, 22 bytes

```
asFasF"Z"L-|LR}lRoao|;

```

Try it online!

Explanation:

```
asF                     //First loop: loops 26 times for the lines
   asF"Z"L-|            //Second loop: loops 26 times, pushes A-Z backwards onto the stack
            LR}         //Shift the stack by loopcount of the first loop
               lRo      //Print the stack
                  ao    //Print newline
                    |;  //End

```
> 0 votes

# Answer
# Scala, 86 bytes

```
def f={var a=0 to 25
for(i <- a){for(j <- a)print(((a(j)+i)%26+65).toChar)
println()}}

```

Try it online!
> 0 votes

# Answer
# Charcoal, 18 bytes

```
Ｆβ«Ｐα↓≔⮌…⮌…α²⁷¦²⁶α

```

Try it online! (Link to the verbose version of the code.)
> 0 votes

# Answer
# JavaScript ES6, 74 bytes

```
l='ZABCDEFGHIJKLMNOPQRSTUVWXY';for(c of l){console.log(l=l.slice(1)+l[0])}

```
> 0 votes

# Answer
# MathGolf, 5 bytes

```
▄N{o╫

```

Try it online!

## Explanation

```
▄       lowercase alphabet as string
 N      push 25
  {     start for-loop
   o    print TOS without popping
    ╫   left-rotate bits in int, list/str

```
> 0 votes

# Answer
# \>\<\>, 37 bytes

```
0:"F"a*)?;:d2*%"A"+$1+:@a@39*%0=?$o~!

```

Try it online!
> 0 votes

# Answer
# C# .NET, 151 bytes

```
class P{static void Main(){for(int i=0;i<26;i++)for(int j=65;j<91;j++)System.Console.Write($"{(j+i>90?(char)(j+i-26):(char)(j+i))}{(j>89?"\n":"")}");}}

```

Try Online EDIT: Removed unnecessary curly brackets
> 0 votes

# Answer
# JavaScript, 67 bytes

here a short Javascript alternative, if entered in the console it it returns the output.
With my favorit `replace` function.

```
'ZABCDEFGHIJKLMNOPQRSTUVWXY'.repeat(27).replace(/.(.{26})/g,"$1\n")

```
> 0 votes

# Answer
# Burlesque, 9 bytes

```
@AZr\iRuN

```

Try it online!

```
@AZ  # Push 'A 'Z
r\   # Range from 'A to 'Z concat to string
iR   # Generate all rotations
uN   # Insert newlines and pretty-print

```
> 0 votes

# Answer
# Rutger, 120 bytes

```
a="ZABCDEFGHIJKLMNOPQRSTUVWXY";
f=For[26];
f=f[@i];
f=f[{c=GetIndex[$a];a=Concat[Deque[$a]];a=Print[a[c[0]]];}];
Do[$f];

```

Try it online!

Ungolfed and commented:

```
alphabet = "ZABCDEFGHIJKLMNOPQRSTUVWXY";	// Set $alphabet to the alphabet shifted by 1
for = For[26];					// Set up a for loop with 26 iterations
for = for[@i];					// Give a dummy variable to the for loop
for = for[{					// In the body of the loop:
	char = GetIndex[$alphabet];		// Get the first character of $alphabet
	alphabet = Concat[Deque[$alphabet]];	// Remove the first character of $alphabet
	alphabet = Print[alphabet[char[0]]];	// Concatenate the first character to the end of $alphabet and print it
}];
Do[$for];					// Execute the loop

```
> 0 votes

# Answer
# Java, 74 chars

```
for(int i=0,z=26;i<z*z;out.printf("%c%s",65+(i/z+i%z)%z,++i%z>0?"":"\n"));

```

Try it online!

Explanation:

```
for(int // init
    i=0, // iterator variable
    z=26 // alphabet length constant
    ; // iterate through
    i<z*z // 26 lines of 26 characters
    ; // action after each iteration (print letters one-by-one)
    out.printf( // formatted output in one line
            "%c%s" // first argument - character, second argument - string
            , // first argument - character
            65+ // letter 'A' plus result of expression:
               (i/z+i%z // line number plus letter position
                       )%z // division remainder by alphabet length
            , // second argument - string
            ++ // iterator increment - go to next letter (before next iteration)
              i%z // letter position
                 >0 // is greater then 0
                   ? // then
                    "" // empty string (do nothing)
                      : // otherwise (first letter in the next line)
                       "\n" // add a line break before
    ));

```

Output:

```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY

```
> 0 votes

# Answer
# Canvas, 10 bytes

```
ＺＬ｛Ｚ；╷［«｝］

```

Try it here!
> 0 votes

# Answer
# Duocentehexaquinquagesimal, 43 bytes

```
CV^à,¦%ò-ž¡S®´øIQ+AÓÝηιtdÀfNÒMζ™c]y"º₃∊Óvƒ{

```

Try it online!
> 0 votes

# Answer
# Risky, 24 bytes

```
+{+_*+_0+_0_0?+_0__?-0?__?+_022\-_[__?+_0+_[+_1

```

Try it online!
> 0 votes

# Answer
# ReRegex, 60 bytes

```
(\w+\n)*+(?!Z)(.)(.{25})/$0\n$3$2/ABCDEFGHIJKLMNOPQRSTUVWXYZ

```

Try it online!

```
(\w+\n)*+    # Go to last line
(?!Z)        # If it doesn't start with Z
(.)(.{25})   # Capture first and remaining 25 characters
/$0\n$3$2    # replace them with the whole match, newline and first character moved to the end
/ABCDEFGHIJKLMNOPQRSTUVWXYZ # Begin with the string A..Z

```
> 0 votes

# Answer
# Haskell, 58 bytes

```
f=mapM(\n->putStrLn.take 26.drop n$cycle['A'..'Z'])[0..25]

```

Try it online!
> 0 votes

# Answer
# C++, ~~169~~ 112 bytes

```
#include<iostream>
void f(){for(int i=-1,j;i++<25;std::cout<<'\n')for(j=0;j<26;std::cout<<char((i+j++)%26+65));}

```

An ungolfed version:

```
#include <iostream>
void f()
{
    for(int i=-1; i++ < 25; std::cout << '\n')
        for(j=0; j < 26; std::cout << char((i+j++) % 26 + 65));
}

```

nested fors from 0-26, add them together, mod26, add 65, and cast to char;

Try it online!

old solution:

```
#include<iostream>
void f(){for(int i=0,j;(j=i+++2)<28;)for(std::string a="XYZABCDEFGHIJKLMNOPQRSTUVW",b;j-i%26;)std::cout<<a[++j%=26]<<(j+1-i?"":(b=a[(j+2)%26])+'\n');}

```

Try it online! (seems not to work in the online compiler; just use the new solution)

An ungolfed version:

```
#include <iostream>
void f()
{
    for (int i = 0, j; (j = i++ + 2) < 28;)
        for (std::string a = "XYZABCDEFGHIJKLMNOPQRSTUVW", b; j - i % 26;)
            std::cout << a[++j %= 26]
                        << (j + 1 - i ? "" : (b = a[(j + 2) % 26]) + '\n');
}

```

`i` will always start one less then `j`, and then `j` will increase through the letters until it meets `i` back at the start. After that we increase `i` once again and repeat.
> 0 votes

# Answer
# APL, 11 bytes

```
↑⌽∘⎕A¨0,⍳25

```

The solution have the same length as the existing one, but much simpler and doesn't rely on ⎕IO←0

With ⎕IO←0 the solution becomes shorter by two bytes:

```
↑⌽∘⎕A¨⍳26

```

Universal solution:

```
↑⌽∘⎕A¨⎕IO-⍨⍳26

```
> 0 votes

# Answer
# BQN (REPL), 13 bytes

```
26↕'A'+26|↕51

```

Returns a 2D character array. Try it at BQN online!

This output format displays the tabula recta in a visually correct layout, but it has some extra characters around the outside. If that's not an acceptable format, here's an 18-byte full program:

```
•Out˘26↕'A'+26|↕51

```

Attempt This Online!

### Explanation

A different approach from the other 13-byte solution:

```
26↕'A'+26|↕51
          ↕51  Range(51)
       26|     Take each number mod 26
   'A'+        Add 'A' to each: "ABC...YZAB...XY"
26↕            Get all length-26 substrings

```
> 0 votes

# Answer
# Alice, ~~44~~ 38 bytes

```
2a*6+/~A~"Ow/
J1*27\"*Zhr.\>t.n$@\ ~ K

```

Try it online!

# Ungolfed

```
2a*6+                          Push a counter with value 26 on the stack
     /"AZ"r                    Switch to ordinal and push the alphabet on the stack
           w     ~\t.n$@/~K    While the counter is not down to 0
            .O                 Print the alphabet
              h~*              Pop the first char of the alphabet, swap, concatenate

```
> 0 votes

# Answer
# CellTail, 95 bytes

```
N,0,N:N,N,[65];(90,26),N,N:N;(a,26),N,N:N,10,((a-64)%26+65,0);(a,b),N,N:N,a,((a-64)%26+65,b+1);

```

Try it

Use `[65]` to create `(65,N)` which I use to represent `0` since `N + 1` = `1`;
> 0 votes

# Answer
# Scala, 43 bytes

```
'A'.to('Z').map(l=>l.to('Z')++'A'.until(l))

```

Try in online
> 0 votes

---
Tags: code-golf, string, kolmogorov-complexity, cryptography, alphabet
---