[Question]
  [
The task is very simple, when given an input, output one of the following spirals:
`Input = 1` gives a spiral with the letter `A` beginning in the top left corner:
```
A B C D E F
T U V W X G
S 5 6 7 Y H
R 4 9 8 Z I
Q 3 2 1 0 J
P O N M L K
```
`Input = 2` gives a spiral with the letter `A` beginning in the top right corner:
```
P Q R S T A
O 3 4 5 U B
N 2 9 6 V C
M 1 8 7 W D
L 0 Z Y X E
K J I H G F
```
`Input = 3` gives a spiral with the letter `A` beginning in the bottom right corner:
```
K L M N O P
J 0 1 2 3 Q
I Z 8 9 4 R
H Y 7 6 5 S
G X W V U T
F E D C B A
```
`Input = 4` gives a spiral with the letter `A` beginning in the bottom left corner:
```
F G H I J K
E X Y Z 0 L
D W 7 8 1 M
C V 6 9 2 N
B U 5 4 3 O
A T S R Q P
```
As you can see, the spiral always goes *clockwise* and moves from the *outside* to the *inside*.
The rules are simple:
* You need to provide a full program using STDIN and STDOUT, or the nearest equivalent if not possible.
* Given an input (`1, 2, 3, 4`), output the related spiral.
* Trailing whitespaces are allowed
* Leading whitespaces are allowed when used *consistently*
* You need to use uppercase letter for the output, lowercase letters are not allowed.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the program with the least amount of bytes wins!
  
[Answer]
# [Japt](https://github.com/ETHproductions/Japt), 53 bytes ~~58 59 60~~
*Saved 5 bytes thanks to @ETHproductions*
```
"FGHIJK EXYZ0L DW781M CV692N BU543O ATSRQP"¸zU ®¬¸} ·
```
This uses the rotate command which I never thought would be so useful
## Explanation && Ungolfed
```
"FGHIJK EXYZ0L DW781M CV692N BU543O ATSRQP"qS zU m_q qS} qR
             // Implicit: U = input
"FGH...SRQP" // String, " " represent newlines
qS           // Split   " "
zU           // Rotate
m_           // Loop the lines
  q qS}      // Insert spaces
qR           // Join by newlines
```
[Try it online](http://ethproductions.github.io/japt?v=master&code=IkZHSElKS3pFWFlaMEx6RFc3ODFNekNWNjkyTnpCVTU0M096QVRTUlFQInEneiB6VSCucSBxU30gcVI=&input=MQ==)
[Answer]
## CJam, ~~45~~ ~~43~~ 42 bytes
```
'[,65>A,+W%(s{W%z_,@s/(@.+}A*ri{W%z}*Sf*N*
```
[Test it here.](http://cjam.aditsu.net/#code='%5B%2C65%3EA%2C%2BW%25(s%7BW%25z_%2C%40s%2F(%40.%2B%7DA*ri%7BW%25z%7D*Sf*N*&input=1)
### Explanation
```
'[,65>  e# Push the upper-case alphabet.
A,+     e# Append the digits.
W%      e# Reverse everything.
(s      e# Pull off the 9 and turn it into a string.
{       e# Repeat this 10 times to roll the string up in a spiral...
  W%z   e#   Rotate the existing grid clockwise.
  _,    e#   Duplicate grid so far and get the number of rows.
  @s    e#   Pull up the list of characters and flatten it into one string.
  /     e#   Split the string into chunks of the size of the number of rows.
  (     e#   Pull off the first chunk.
  @.+   e#   Pull up the grid so far and prepend the chunk as a new column.
}A*     e# We now have the spiral as desired, with the A in the bottom left corner.
ri      e# Read input and convert to integer.
{       e# Repeat this code that often..
  W%z   e#   Rotate the spiral clockwise.
}*
Sf*     e# Join each line with spaces.
N*      e# Join the lines with linefeeds.
```
[Answer]
# Mathematica 156 bytes
Converts initial string of letters, `"ABCDEFTUVWXGS567YHR498ZIQ3210JPONMLK"`, into an array. `Nest` applies `f` to that array `n-1`times, where n is the input number. `f` works by `Transpose`-ing the array followed by `Reverse`applied to each row. `g` converts the final array into a string.
```
s=StringJoin;r=Riffle;f=Nest[Reverse/@Transpose@#&,Partition[Characters@"ABCDEFTUVWXGS567YHR498ZIQ3210JPONMLK",6],#-1]&;
g@n_:=s@r[s/@(r[#," "]&/@f[n]),"\n"]
```
---
**Example**
```
g[4]
```
[![output](https://i.stack.imgur.com/TszTo.png)](https://i.stack.imgur.com/TszTo.png) 
---
If the output could be given as an array, the function `g` would be unnecessary.
```
f[4]
```
> 
> {{"F", "G", "H", "I", "J", "K"}, {"E", "X", "Y", "Z", "0", "L"}, {"D",
>  "W", "7", "8", "1", "M"}, {"C", "V", "6", "9", "2", "N"}, {"B", 
>  "U", "5", "4", "3", "O"}, {"A", "T", "S", "R", "Q", "P"}}
> 
> 
> 
[Answer]
# MATLAB, ~~61~~ 89 bytes
```
b=[65:90 48:57];n=zeros(12,6);n(2:2:end)=rot90(b(37-spiral(6)),input('')-2);disp([n' ''])
```
I'll see if I can get it down a bit. Not sure though.
This creates an array of all letters from A to Z followed by 0 to 9, then takes a spiral and uses that to arrange the data in the correct order. The array is then rotated by the amount the user specifies and then printed out.
The output consistently uses leading spaces as allowed by the question (in fact at no extra byte cost, it could do trailing spaces instead). Here is an example:
```
 F G H I J K
 E X Y Z 0 L
 D W 7 8 1 M
 C V 6 9 2 N
 B U 5 4 3 O
 A T S R Q P
```
---
As I saw that spaces are required, this original code (for 61) is not valid because it doesn't add a space between each character. But I will add it here for reference.
```
b=['A':'Z' '0':'9'];disp(rot90(b(37-spiral(6)'),6-input('')))
```
and produces:
```
ABCDEF
TUVWXG
S567YH
R498ZI
Q3210J
PONMLK
```
[Answer]
# JavaScript ES6, 165 ~~172~~
Simple rotation, starting from a hardcoded string
**Note** 1 byte saved thx @user81655
```
p=prompt();alert("ABCDEF TUVWXG S567YH R498ZI Q3210J PONMLK".split` `.map((r,y,a)=>[...r].map((c,x)=>p<2?c:a[p<3?5-x:p<4?5-y:x][p<3?y:p<4?5-x:5-y]).join` `).join`
`)
```
Test snippet:
```
// Test: redefine alert to write inside the snippet
alert=x=>P.innerHTML=x
p=prompt();
alert(
  "ABCDEF TUVWXG S567YH R498ZI Q3210J PONMLK"
  .split` `
  .map(
    (r,y,a)=>
    [...r].map(
      (c,x)=>p<2?c:
      a
       [p<3?5-x:p<4?5-y:x]
       [p<3?y:p<4?5-x:5-y]
    ).join` `
  ).join`\n`
)
```
```
<pre id=P></pre>
```
[Answer]
# Pyth - 60 bytes
Hardcodes the string and uses matrix operations to get all the options.
```
jjL\ @[_CKc6"ABCDEFTUVWXGS567YHR498ZIQ3210JPONMLK"KC_K__MK)Q
```
[Test Suite](http://pyth.herokuapp.com/?code=jjL%5C+%40%5B_CKc6%22ABCDEFTUVWXGS567YHR498ZIQ3210JPONMLK%22KC_K__MK%29Q&test_suite=1&test_suite_input=1%0A2%0A3%0A4&debug=1).
[Answer]
# Ruby, 173 bytes
```
->i{_,r,o=->s{s.map{|i|i*' '}},->s{s.transpose.map{|i|i.reverse}},%W(ABCDEF TUVWXG S567YH R498ZI Q3210J PONMLK).map(&:chars);puts i<2?_[o]:i<3?_[t=r[o]]:i<4?_[r[t]]:_[r[r[t]]]}
```
**Ungolfed:**
```
-> i {
  _ = -> s { s.map{|i| i*' ' } }
  r = -> s { s.transpose.map{|i| i.reverse } }
  o = %W(ABCDEF TUVWXG S567YH R498ZI Q3210J PONMLK).map(&:chars)
  puts i<2?_[o]:i<3?_[t=r[o]]:i<4?_[r[t]]:_[r[r[t]]]
}
```
**Usage:**
```
->i{_,r,o=->s{s.map{|i|i*' '}},->s{s.transpose.map{|i|i.reverse}},%W(ABCDEF TUVWXG S567YH R498ZI Q3210J PONMLK).map(&:chars);puts i<2?_[o]:i<3?_[t=r[o]]:i<4?_[r[t]]:_[r[r[t]]]}[4]
F G H I J K
E X Y Z 0 L
D W 7 8 1 M
C V 6 9 2 N
B U 5 4 3 O
A T S R Q P
```
[Answer]
## Python, 152 bytes
```
s=[r for r in "ABCDEF TUVWXG S567YH R498ZI Q3210J PONMLK".split(" ")]
for i in range(1,int(input())):s=zip(*list(s)[::-1])
for x in s:print(" ".join(x))
```
]