[S S S N
_Push_0][N
S S N
_Create_Label_LOOP][S N
S _Duplicate_top][S N
S _Duplicate_top][T N
T S _Read_STDIN_as_character][T T T _Retrieve_input][S S S T S T S N
_Push_10][T S S T _Subtract][N
T S S N
_If_0_Jump_to_Label_PRINT_LOOP][S S S T N
_Push_1][T S S S _Add][N
S N
N
_Jump_to_Label_LOOP][N
S S S N
_Create_Label_PRINT_LOOP][S S S T N
_Push_1][T S S T _Subtract][S N
S _Duplicate_top][T T T _Retrieve_input][T N
S S _Print_as_character][N
S N
S N
_Jump_to_Label_PRINT_LOOP]
Letters S
(space), T
(tab), and N
(new-line) added as highlighting only.
[..._some_action]
added as explanation only.
Since Whitespace inputs one character at a time, the input should contain a trailing newline so it knows when to stop reading characters and the input is done.
Try it online (with raw spaces, tabs, and new-lines only).
Explanation in pseudo-code:
Integer i = 0
Start LOOP:
Read STDIN as character, and store at heap-address i
Character c = character at heap-address i
If(c == '\n'):
Jump to PRINT_LOOP
i = i + 1
Go to next iteration of LOOP
function PRINT_LOOP:
i = i - 1
Character c = character at heap-address i
Print c as character to STDOUT
Go to next iteration of PRINT_LOOP