[Question]
  [
The program must print the alphabet four times: first in the normal alphabetical order, second in the order of a qwerty keyboard, third in the order of a dvorak keyboard, and lastly in reverse alphabetical order. The output should resemble this:
```
abcdefghijklmnopqrstuvwxyz
qwertyuiopasdfghjklzxcvbnm
pyfgcrlaoeuidhtnsqjkxbmwvz
zyxwvutsrqponmlkjihgfedcba
```
The output is not case-sensitive, and you can add or omit newlines or spaces wherever you wish.
**The catch**: the program must be less than 104 characters, or, in other words, smaller than the length of the alphabet times four.
I will accept the answer with the shortest code, unless I see something really clever or interesting that I am more impressed with.
EDIT: I will accept the shortest answer on Wednesday, 4/27/2011. 
EDIT2: **And the winner is** (as usual) [Golfscript](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2234#2234) in 64 chars! [Second place](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2183#2183), which is behind by only three chars, is also in Golfscript, with 67 chars, followed by Bash in [third place](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2197#2197) with 72 chars.
But there were a few others I wanted to mention, such as [this one](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2218#2218), which, depending on your definition, only used 52 "characters", and [this one](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2198#2198) where he wrote it in a language he created.
There were a [few](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2193#2193) [people](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2284#2284) [who](https://codegolf.stackexchange.com/questions/2167/print-the-alphabet-four-times/2190#2190) broke an unwritten rule and did not qualify, but I will mention them just for their way of thinking without the box.
  
[Answer]
# Python 2, 97 characters
```
q="qwertyuiopasdfghjklzxcvbnm"
a="".join(sorted(q))
print a,q,"pyfgcrlaoeuidhtnsqjkxbmwvz",a[::-1]
```
Sorting QWERTY and converting back from list to string is shorter than the alphabet itself!\*
Another option for generating the alphabet in fewer characters than the alphabet itself:
```
print map(chr,range(65,91))
```
Although this prints a Python list of characters.
There's not much to be done here in the way of data compression; jamming the letters into 5 bits only saves 39 characters, which isn't a lot if you then have to un-jam them (and you still have to represent the bytes literally); it looks like zlib (just as an example) saves fewer than 20 bytes; encoding the sequence as a list of deltas to the next letter still takes 5 bits for each delta, because the largest in this sequence is -22:
```
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
 1, 1, 1, 1, 1, 1, 1, -9, 6, -18, 13, 2, 5, -4, -12, 6, 
 1, -15, 18, -15, 2, 1, 2, 1, 14, -2, -21, 19, -20, 12, 
 -1, 3, 9, -19, 1, -4, 15, -6, -11, 14, -10, 16, -12, -5, 
 4, 12, -6, 5, -2, -7, 1, 13, -22, 11, 10, -1, 4, 0, -1, 
 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
```
---
\* Although only slightly.
[Answer]
# PHP, 99 bytes
As ISO 8859-1:
```
<?=base64_encode("i·yø!9%z)ª»-ºü1Ë:°z»rº*)jÇ_ä<\½¹æ§'àr¹Z¡ë¢vg²¨äÅ¹°¿<òÇî¶Êê¦æHâÞuÆÚ");
```
To reproduce reliably,
```
printf '<?=base64_encode("' >| 4times.php
printf abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcba | base64 -d >> 4times.php
printf '");' >> 4times.php
```
[Answer]
## Ruby 1.9, 88 87 84 80
```
puts b=[*?a..?z],:qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz,b.reverse
```
[Answer]
## Bash, 82
```
echo {a..z}
echo qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz
echo {z..a}
```
[Answer]
## Python, 97 96 "characters"
Taking your use of the word "characters" liberally, here's some python that uses 16-bit unicode characters to encode 3 normal characters each. The program is a total of 96 characters, 35 of which are the weirdest unicode characters I've ever seen.
```
for i in range(104):print chr((ord(u'ࠠᒃ⃦ⵉ��割廕��匓�เ᳅ⵉૹ�懬ࣅű傎ᱨ�⤰〷�弙劶��ⶍKᓇࡤ^A'[i/3])>>i%3*5&31)+97),
```
I'm not sure the unicode garbage will come though correctly, so here's a python program to generate the above python program:
```
#!/usr/bin/python                                                                                                                                                                 
import codecs
f=codecs.open('alpha.py','w','utf-8')
f.write('#!/usr/bin/python\n')
f.write('# coding=utf-8\n')
f.write('for i in range(104):print chr((ord(u\"')
S='''abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcbaa'''
for i in xrange(0,104,3):
 n=32*32*(ord(S[i+2])-97)+32*(ord(S[i+1])-97)+ord(S[i+0])-97
 f.write(u'%c'%n)
f.write('"[i/3])>>i%3*5&31)+97),\n')
```
[Answer]
### Golfscript, 64 chars
```
"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz".$2%\1$-1%
```
Note: also 64 bytes. Actually, playing with Unicode and base changes seems counterproductive because `base` is too long a keyword.
[Answer]
## Bash, 72
```
echo {a..z} qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz {z..a}
```
EDIT: removed `tr -d`.
Credits: Alexander, Roger.
[Answer]
## Windows PowerShell, 89
Not particularly good, but at least shorter than the output string:
```
[char[]](65..90)
'qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz'
[char[]](90..65))
```
Way shorter now that I saw that there is a relaxation on whitespace. And a little shorter still, if I ignore case which I'm allowed to.
[Answer]
## Golfscript, ~~76~~, 67 chars
```
123,97>+."qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz"\-1%
```
* changed ruby code to Ventero's [Golfscript alphabet generation](https://codegolf.stackexchange.com/questions/2078/the-alphabet-in-programming-languages/2080#2080).
[Answer]
## [CI](https://codegolf.stackexchange.com/questions/585/self-interpreting-interpreter/2163#2163) - 92 chars
```
'a(1p'z((,0(4d)(.$)<)$)(0c0c.1+2p$.)>)$)qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz
```
CI ("Compiler/Interpreter") is a simple stack-based language I created for the ["Self-Interpreting Interpreter"](https://codegolf.stackexchange.com/q/585/38) challenge ([link to answer](https://codegolf.stackexchange.com/questions/585/self-interpreting-interpreter/2163#2163)). I posted that answer about two hours before this challenge was posted. It's no GolfScript (which I still haven't gotten around to learning), as my goal was to make the interpreter short.
This program must be passed to the `ci` interpreter through standard input. The interpreter treats characters after a terminating `)` as input to the program. My language doesn't support string literals, so stdin is taking its place.
[Answer]
Python 2.7.X - 103 characters ironically...
```
a='abcdefghijklmnopqrstuvwxyz'
print a,'qwertyuiopasdfghjklzxcvbnm pyfgcrlaoeuidhtnsqjkxbmwvz',a[::-1]
```
As it turns out, generating the alphabet in python takes more characters than hard-coding it. As does importing the alphabet. Gotta love a readability-centered language sometimes.
[Answer]
# Lua — 111 characters
Beats C and C++! :-)
```
print'abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcba'
```
### "Clever" version in Lua
129 characters
```
q='qwertyuiopasdfghjklzxcvbnm'a={q:byte(1,-1)}table.sort(a)a=q.char(unpack(a))print(a,q,'pyfgcrlaoeuidhtnsqjkxbmwvz',a:reverse())
```
Whitespaced:
```
q='qwertyuiopasdfghjklzxcvbnm'
a={q:byte(1,-1)}
table.sort(a)
a=q.char(unpack(a))
print(a,q,'pyfgcrlaoeuidhtnsqjkxbmwvz',a:reverse())
```
[Answer]
# C — 133 chars
Shortened version from Casey:
```
main(i){char a[105];strcpy(a+26,"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz");for(i=0;i<26;)a[i]=a[103-i]=i+++65;puts(a);}
```
Whitespaced:
```
main(i) {
    char a[105];
    strcpy(a+26, "qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz");
    for(i=0;i<26;)
        a[i]=a[103-i]=i+++65;
    puts(a);
}
```
### Transposed output
Here is a version that does transposed output, for fun. 134 chars.
```
main(i){char*a="qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz";for(i=0;i<26;i++,a++)printf("%c%c%c%c\n",i+65,*a,*(a+25),90-i);}
```
Whitespaced:
```
main(i){
  char*a="qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz";
  for(i=0;i<26;i++,a++)
    printf("%c%c%c%c\n",i+65,*a,*(a+25),90-i);
}
```
Prints:
```
AqmZ
BwpY
CeyX
DrfW
EtgV
FycU
GurT
HilS
IoaR
JpoQ
KaeP
LsuO
MdiN
NfdM
OghL
PhtK
QjnJ
RksI
SlqH
TzjG
UxkF
VcxE
WvbD
XbmC
YnwB
ZmvA
```
[Answer]
# C - 163 135 chars
This doesn't meet the requirements as it clocks in at over 104 characters, but it was fun to make. Maybe someone will have some suggestions.
```
main(i){char a[105];strcpy(&a[26],"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz");for(i=0;i<26;)a[i]=a[103-i]=i+++65;puts(a);}
```
This compiles on GCC 4.5.1 (others untested). Yay for omitting #includes, return types, and variable declarations! Hardcoding would've resulted in a shorter program, but that isn't any fun.
Whitespaced version:
```
main(i) {                                                                                   
    char a[105];                                                                        
    strcpy(&a[26], "qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz");                 
    for(i=0;i<26;)                                                                          
        a[i]=a[103-i]=i+++65;                                                               
    puts(a);                                                                                
}
```
## C - 124 122 lame
Here is the lame hardcoded version, and it still doesn't make the cut.
```
main(){puts("abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcba");}
```
[Answer]
**J**
```
x=:(97+/i.26){a.
x
261329910883437428257896643x A.x
247073478763191548160234722x A.x
(_1+/-i.26){x
```
My first experience with J. The idea is simply to use the canonical (lexicographic) number of the required permutation; unfortunately this takes more characters than hard-coding it. But if one could find some arithmetic expression (using powers and whatnot) yielding the magic numbers, it could be shortened.
[Answer]
## Python, 90 unicode chars
```
#coding:u8
print u"扡摣晥桧橩汫湭灯牱瑳癵硷穹睱牥祴極灯獡晤桧歪穬捸扶浮祰杦牣慬敯極桤湴煳歪扸睭究祺睸當獴煲潰浮歬楪杨敦捤慢".encode("u16")[2:]
```
run at ideone - <http://ideone.com/R2dlI> or codepad - <http://codepad.org/lp77NL9w>
[Answer]
**Javascript 139 121**
new:
```
q='qwertyuiopasdfghjklzxcvbnm'
a=q.split('').sort()
alert(a.join('')+q+'pyfgcrlaoeuidhtnsqjkxbmwvz'+a.reverse().join(''))
```
old:
```
a=[]
a[26]='qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz'
for(i=0;i<26;i++)a[i]=a[52-i]=String.fromCharCode(i+65)
alert(a.join(''))
```
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal) `j`, 26 bytes
```
kak•ṅ«
ċ↓U→u°⟇Ȯ≤Ṙ]1biẊ«kzW
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=j&code=kak%E2%80%A2%E1%B9%85%C2%AB%0A%C4%8B%E2%86%93U%E2%86%92u%C2%B0%E2%9F%87%C8%AE%E2%89%A4%E1%B9%98%5D1bi%E1%BA%8A%C2%ABkzW&inputs=&header=&footer=)
-3 thanks to @A username
[Answer]
## PHP 88 bytes
```
<?=$a=join(range(a,z)),~Žˆš‹†Š–žŒ›™˜—•”“…‡œ‰‘’†™˜œ“žšŠ–›—‹‘ŒŽ•”‡’ˆ‰…,strrev($a);
```
[Answer]
# J - 69 char
```
'pyfgcrlaoeuidhtnsqjkxbmwvz'(,~|.)&(,\:~)'mnbvcxzlkjhgfdsapoiuytrewq'
```
Explanation:
* `(,\:~) y` - Sort `y` in descending order (`\:~`), and append (`,`) that to `y`.
* `x (,~|.) y` - Reverse (`|.`) `y`, and append that to the front of `x`.
* `x F&G y` - Execute `(G y) F (G y)`, that is, perform `F` on the results of applying `G` to the arguments.
So, all together, we append the alphabet, backwards, to both the Dvorak and reverse-QWERTY strings, then reverse the QWERTY/alphabet one and put that in front of the Dvorak/alphabet one.
[Answer]
# Bash, 64
I'm very late to the party, but I have a 64 character solution. Program needs to be saved to disk to work
```
echo {a..z} $(sed 1d $0|base64) {z..a};exit
««·+¢¢–¬uø!ŽIsÅËÛžjr~+•ªº'a¶{*ŽL[›ó
```
**How it works:**
`{a..z}` and `{z..a}` are pretty self explanatory, but basically that just prints every character in that respective range.
`$(sed 1d $0|base64)` outputs the program, ignores the first line, then passes it through a base64 encoder (as some other examples have done).
**The reason this is shorter than other similar examples...**
...is because the `{a..z}` ranges are shorter than base64 encodings, so I only need to base64 encode half the string. And because I'm reading the binary data from file rather than storing it in a string, I don't need to escape any character in code.
**How to recreate this script:**
If the code doesn't copy/paste correctly from Stack Exchange to your text editor then run the following in your command line (shell agnostic):
```
echo 'echo {a..z} $(sed 1d $0|base64) {z..a};exit' > alphabetgolf
echo 'qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz' | base64 -d >> alphabetgolf
```
Then to run:
```
bash alphabetgolf
```
[Answer]
# [Deorst](https://github.com/cairdcoinheringaahing/Deorst), 39 bytes
```
EfEuE|'pyfgcrlaoeuidhtnsqjkxbmwvz'EfVE;
```
[Try it online!](https://tio.run/##S0nNLyou@f/fNc211LVGvaAyLT25KCcxP7U0MyWjJK@4MCu7Iim3vKxK3TUtzNX6/38A "Deorst – Try It Online")
How on Earth is Deorst beating everything bar Jelly???
## How it works
```
Ef             - Push the lowercase alphabet
  EuE|         - Push 'qwerty…vbnm'
      '…'      - Push that string
         Ef    - Push the alphabet
           VE; - Reverse and concatenate
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 25 bytes
```
AžW.•8t”a$äJÚ₁вƒüu¯Cê•AR»
```
[Try it online!](https://tio.run/##ATQAy/9vc2FiaWX//0HFvlcu4oCiOHTigJ1hJMOkSsOa4oKB0LLGksO8dcKvQ8Oq4oCiQVLCu/// "05AB1E – Try It Online")
## Explanation
```
A                          # Push alphabet                    
 žW                        # Push qwerty string
   .•8t”a$äJÚ₁вƒüu¯Cê•     # Push compressed dvorak string
                      AR   # Push reversed alphabet
                         » # Join entire stack with newlines
```
[Answer]
## C++
It's kind of sad when the shortest way to do something in a language is to hard-code it.
```
#include <iostream>
int main()
{
 std::cout<<"abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcba";
}
```
[Answer]
# J (77)
```
(,|.@(26&{.))(,~/:~@(26&{.))'qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz'
```
Shaved off 3 characters by using a variable:
```
(,|.@a)(,~/:~@(a=.26&{.))'qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz'
```
Shaved off 2 more characters by using a value-level approach:
```
(|.a),~t,~a=./:~26{.t=.'qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz'
```
[Answer]
# Haskell (95)
```
main=putStr$['a'..'z']++"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz"++['z','y'..'a']
```
# Perl (51)
There's no rule that says I can't.
```
use LWP::Simple;print get("http://bit.ly/fGkflf");
```
[Answer]
## Q (68)
```
.Q.a,"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz",(|:).Q.a
```
Outputs:
```
"abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfg     
crlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcba"
```
Tried to find an improvement on hard-coding the middle two but didn't come up with one.
[Answer]
# K - 69 char
```
b,a,|b:a@<26#a:"qwertyuiopasdfghjklzxcvbnmpyfgcrlaeouidhtnsqjkxbmwvz"
```
Explanation:
* `26#a:` - Assign the two keyboard layouts to `a`, and then take the first 26 characters.
* `b:a@<` - Sort `a` and assign that to `b`: `<` provides the permutation for an ascending sort, and `@` lets us index `a` in order to sort it.
* `b,a,|` - Append in a row `b`, then `a`, then the reverse (`|`) of `b`.
[Answer]
# Pyth, 57
```
G"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz"VG
```
Alphabet, string, reversed alphabet. G is the alphabet. Print is implicit.
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), 60 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319)
```
⎕A'QWERTYUIOPASDFGHJKLZXCVBNMPYFGCRLAOEUIDHTNSQJKXBMWVZ',⌽⎕A
```
Prints:
```
  ABCDEFGHIJKLMNOPQRSTUVWXYZ  QWERTYUIOPASDFGHJKLZXCVBNMPYFGCRLAOEUIDHTNSQJKXBMWVZ ZYXWVUTSRQPONMLKJIHGFEDCBA
```
Which is permitted as per OP:
> 
> The output is not case-sensitive, and you can add or omit newlines or spaces wherever you wish.
> 
> 
> 
]