Bring ASCII art to the 3rd dimension In this challenge, You have to bring ASCII art (which are usually 2D) to 3D!

How?

like this,

X X DD 
 X  D D
X X DD 


to...

  X X DD 
 X X DD D
X X DDDD 
 X XDDD
X X DD


Then How do we do that?

Given the ascii art and N, repeat this N times.


for every character (we will call this A):
let B be the character which is exactly 1 right and 1 up from A
if B is a space or is undefined:
set B to A.


Specs


The first input can be a string with newline characters or a list of strings representing the 2D ASCII art.
You are allowed to use %END% to tag the end of input, but this is not required.
The second input will be N. It will be a positive integer.
all the lines of the strings will be the same length.


Examples

Input: ("###\n###",1)

Output:

 ###
####
###


Rules

Basic code-golf rules apply.

also, If you have questions, be sure to ask in the comments!
Perl, 81 bytes

75 bytes code + 6 for -i -n0.
Note that the \e characters are ASCII \x1b but \e is used for ease of testing.

Please note that this solution uses ANSI escape sequences and requires a compatible terminal, as well as using the -i commandline argument to pass in the number of 'dimensions' you'd like.

$n=s/^//mg-1;s/ /\e[1C/g;print(s/^/\e[${^I}C/grm."\e[${n}A"),--$^I for($_)x$^I


Usage:

In a Linux compatible terminal, run PS1= first to ensure your prompt doesn't overwrite the displayed image.

perl -i10 -n0e '$n=s/^//mg-1;s/ /\e[1C/g;print(s/^/\e[${^I}C/grm."\e[${n}A"),--$^I for($_)x$^I' &lt;&lt;&lt; ' 
ROFL:ROFL:ROFL:ROFL
         _^___
 L    __/   [] \    
LOL===__        \ 
 L      \________]
         I   I
        --------/
'

          ROFL:ROFL:ROFL:ROFL
         ROFL:ROFL:ROFL:ROFL
        ROFL:ROFL:ROFL:ROFL
       ROFL:ROFL:ROFL:ROFL\
      ROFL:ROFL:ROFL:ROFL\_]
     ROFL:ROFL:ROFL:ROFL\_]
    ROFL:ROFL:ROFL:ROFL\_]/
   ROFL:ROFL:ROFL:ROFL\_]/
  ROFL:ROFL:ROFL:ROFL\_]/
 ROFL:ROFL:ROFL:ROFL\_]/
   LOL==___^___]_\_\_]/
  LOL==__/ \_[]_\_\_]/
 LOL===__ \______\_]/
  L      \________]/
          I---I---/
         --------/

perl -i3 -n0e '$n=s/^//mg-1;s/ /\e[1C/g;print(s/^/\e[${^I}C/grm."\e[${n}A"),--$^I for($_)x$^I' &lt;&lt;&lt; 'X X DD
 X  D D
X X DD
'
   X X DD
  X X DD D
 X X DDDD
  X XDDD
 X X DD