# Print the alphabet four times

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 in 64 chars! Second place, which is behind by only three chars, is also in Golfscript, with 67 chars, followed by Bash in third place with 72 chars.

But there were a few others I wanted to mention, such as this one, which, depending on your definition, only used 52 "characters", and this one where he wrote it in a language he created.

There were a few people who broke an unwritten rule and did not qualify, but I will mention them just for their way of thinking without the box.

• Consider using a bounty for an answer that impressed you. I think accepting an answer in a code-golf should always be the natural criterion (i.e. length). – Joey Apr 23 '11 at 16:00
• I lost using Tcl: tio.run/… – sergiol Jul 25 '17 at 22:19

# Deorst, 39 bytes

EfEuE|'pyfgcrlaoeuidhtnsqjkxbmwvz'EfVE;


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


# PHP - 45

I don't know if this is concidered cheating or not :)

<?=file_get_contents("http://goo.gl/dK17k");

• Only solution of its kind! :D +1 – Ry- Apr 27 '11 at 4:31
• @minitech: I posted a similar solution in Python, longer but with more correct output, before this. – Josh Caswell Apr 27 '11 at 20:16
• Okay, upvoted also. But this is shorter. Also not sure how you can have "more" correct output (it is correct). – Ry- Apr 27 '11 at 21:00
• @minitech: this prints the entire contents of the page, where mine prints only the requested output -- the four orderings of the alphabet. No big deal, though, it's all just for fun. Thanks for the upvote! :) – Josh Caswell Apr 28 '11 at 21:01
• @minitech: my mistake; I assumed this was pointing to this page. Apologies to you and to Nicklas. – Josh Caswell Apr 28 '11 at 22:43

# Bash, 109

a(){ printf "$@";} v=a "\%o" {97..122} a$v
a qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz
a $v|rev  Output: abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvzzyxwvutsrqponmlkjihgfedcba  # Mouse-2002, 99 bytes 65i:(i.h.<^i.!'i.1+i:)"qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz"(i.64>^i.!'i.1-i:)  Self-explanatory. # RProgN, 62 Bytes Noncompeting a S . "qwertyuiopasdfghjklzxcvbnmpyfgcrlaoeuidhtnsqjkxbmwvz" a  I'm a bit disappointed RProgN didn't exist at the time of this question. It could have won something! Try it Online! Scala, 128 Bytes Not golfy enough, but readable :) val l=("qwertyuiopasdfghjklzxcvbnm","pyfgcrlaoeuidhtnsqjkxbmwvz");List(l._1,l._1.sorted,l._2,l._2.sorted.reverse).mkString("\n")  # Jelly, 25 bytes Øa;Øq;“¡®×Ṫ}Æ¬#Q>Ẉṛ’œ?$;Ṛ


Try it online!