Question: > 
> *No, not that thing in powerpoint*
> 
> 
> 

You will be given a string, and a 2D array of boolean values. The 2D array will represent a picture.

You will be creating art out of it.

Let me show you how.

The steps to art
================

First, you create a square which fits the 2d array, with the string.

Like if the string is 'PPCG', and the picture is 4x3, the square should be like this.

```
PPCG
PCGP
CGPP
GPPC

```

Now in the square, erase all characters which the corresponding boolean is 0, or the corresponding boolean doesn't exist.

Let me show you. If the 2D array is

```
1001
0110
1001

```

And the square is same to the above (above this one), the result should be like:

```
P  G
 CG 
C  P

```

Now output the result.

Test data is not made yet. Will add ASAP.
=========================================

Rules
=====

* General [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") rules apply, including loopholes.

Answer: 
[R](https://www.r-project.org/), 113 bytes
==========================================

```r
function(s){n=length(s<-strsplit(s,'')[[1]])
m=matrix(' ',n,n)
m[n,n:1]=m[,1]=m[1,]=m[n:1,n]=s
write(m,'',n,,'')}

```

[Try it online!](https://tio.run/##HYwxCgIxEEX7PcVazQTGIq2Y3htYhBSiGw0kE8nMoiCePWZt3ofH57UeXY8rXzVVRjEfdnnhuz5QjnvRJs@cFIUAjPc2BDMVVy7a0hthBmLiYfyYgw2uePrT0sahiIOT6dWSLlhGY/y30rdHhNOSc6X5XFu@7cD0Hw "R – Try It Online")
[Japt](https://github.com/ETHproductions/japt) [`-R`](https://codegolf.meta.stackexchange.com/a/14339/), ~~14~~ 10 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
========================================================================================================================================================================

*Knew* there had to be a shorter way!

```
¬hU ÆÔÃÕÆÔ

```

[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=rGhVIMbUw9XG1A&input=IkhlbGxvLCB3b3JsZCEi)

```
¬hU ÆÔÃÕÆÔ     :Implicit input of string U
¬              :Split
 hU            :Replace first element with U
    Æ          :Modify last element
     Ô         :  U reversed
      Ã        :End modify
       Õ       :Transpose
        ÆÔ     :As above
               :Implicit output joined with newlines

```