Lost is a 2-Dimensional programming language where the instruction pointer starts at a random location, moving in a random direction. A description of the language can be found at the bottom of the post for completeness' sake and a tutorial for the language can be found in the above link.
The task here is simple to describe: Write a non-empty lost program which when run will output the direction that was selected at the beginning of execution.
The four directions are:
N
for northE
for eastS
for southW
for west
You may output them with any capitalization you please and with an optional trailing newline.
Description
Lost operates on a grid where each instruction is a character of the source. Lost's instruction pointer (ip) moves through the grid in one of the four cardinal directions. When it goes off one side of the grid it wraps around to the other as if the program were written on a torus.
Lost's memory is stored in a main stack and a scope. Both are stacks padded with zeros at the bottom. At the end of execution the contents of the main stack are printed and the scope discarded. Lost also stores a single value called the "safety", which begins on.
Programs can only terminate when the safety is off.
Doors
[
Reflects the ip if it is moving east; becomes]
if the ip is moving horizontally]
Reflects the ip if it is moving west; becomes[
if the ip is moving horizontally
Jumps
!
Skips the next operation?
Pops off the top of the stack and jumps if not zero
Stack manipulation
:
Duplicates the top of the stack$
Swaps the top two items of the stack(
Pops from the stack and pushes to the scope)
Pops from the scope and pushes to the stack
Literals
0
-9
pushes n to the top of the stack"
Starts and ends a string literal. During a string literal commands are not run and instead their character values are pushed to the stack.
Operations
+
Adds the top two numbers*
Multiplies the top two numbers-
Multiplies the top by -1
Control
%
Turns the safety off#
Turns the safety on@
Ends execution if the safety is off (starts on)
The following operations are present in Lost but cannot be used for this challenge, since doing so instantly makes the challenge impossible.
\
Swaps the x and y directions/
Swaps the x and y directions and multiplies them by -1|
Multiplies the horizontal direction by -1>
Tells the ip to move east<
Tells the ip to move westv
Tells the ip to move south^
Tells the ip to move north