Life: Created or Evolved? Given the state of a square Game of Life grid, determine whether it could have evolved from any previous state, or could only have been created. That is, identify whether the state is a "Garden of Eden" state.

Input

A square grid of states, with 1 indicating "alive" and 0 indicating "dead". You may choose any two distinguishable symbols instead of 0 and 1 if you wish.

The side length of the grid will not be zero, but may be any natural number 1 &lt;= N &lt;= 20.

Any or all of the cells outside the input grid may be alive at this generation, and any or all of them may have been alive in the previous generation. The universe to be considered is infinite, so there are no boundary conditions. The edges of the input are not the edges of the universe. Specifically, the grid does not wrap.

The input may be in the form of a row delimited string, or a single string. If you wish, you may take the side length or the area of the grid as an additional input (before or after the grid).

Acceptable input formats:

010,101,010

010101010

010
101
010
3 010101010


Output

"Created" if there is no possible previous state (including states larger than the input grid) that would lead to the input state on the next generation.

"Evolved" if there exists at least one possible previous state (including states larger than the input grid) that would lead to the input state on the next generation.

You may use any two distinguishable strings or numbers instead of "Created" and "Evolved" if you wish.

Note that the possible previous state need not be distinct from the input. If a state has itself as the next generation, then it should be considered evolved.

Test cases

010
101
010 Evolved

0101110100
0010101001
1011100110
0101111101
1001001111
1111001001
1011111010
0110011101
1001010100
0010111010 Created


The created test case is taken from Achim Flammenkamp's Game of Life Page.

Note

Thanks to trichoplax for writing this challenge and I adopted it from here
Java- 1254 bytes- a very poor solution
import java.util.Arrays;
public class z{
static boolean u=1&gt;0,v=0&lt;1;
public static void main(String[] a){
int y=a.length,x=a[0].length();Boolean[][] l=new Boolean[x][y];for(int i=0;i&lt;a.length;i++){l[i]=m(a[i]);}
Boolean[] n=new Boolean[x*y];for(int i=0;i&lt;n.length;i++){n[i]=v;}
while(n.length==x*y){Boolean[][] o=new Boolean[x][y];for(int i=0; i&lt;n.length;i++){o[i%x][i/x]=n[i];}
n=p(n);o=q(o,x,y);int r=0;for(int i=0;i&lt;x*y;i++){if(o[i%x][i/x]&amp;&amp;l[i%x][i/x])r++;}
if(r==x*y){System.out.println(&quot;evolved&quot;);return;}}System.out.println(&quot;created&quot;);}
public static Boolean[][] q(Boolean[][] o,int bx,int by){Boolean[][] s=new Boolean[bx][by];for(int x=0; x&lt;bx; x++){for(int y=0;y&lt;by;y++){
int t=0;for(int tx=-1;tx&lt;2;tx++){for(int ty=-1;ty&lt;2;ty++){if(ty+y&lt;0||ty+y&gt;by-1||tx+x&lt;0||tx+x&gt;bx-1)continue;if(o[tx+x][ty+y]){t++;}}}
if(t&gt;1&amp;&amp;t&lt;4){s[x][y]=u;}else{s[x][y]=v;}}}return s;}
public static Boolean[] p(Boolean[] b){boolean w=u;Boolean[] x=new Boolean[b.length];for(int i=0;i&lt;b.length;i++){if(w&amp;&amp;b[i]){x[i]=u;w=u;}else if(b[i]||w){x[i]=u;w=v;}else{x[i]=v;w=v;}
}if(w){x=Arrays.copyOf(x,x.length+1);x[x.length]=u;}return x;}
public static Boolean[] m(String s){Boolean[] x=new Boolean[s.length()];for(int i=0;i&lt;s.length();i++){x[i]=s.charAt(i)=='1';}return x;}}

It takes input via command line.
What it does
No fancy tricks here, simply a brute force solution. It goes through every possible beginning board of size X,Y and iterates it once thru the Game of Life algorithm and checks it against the input board. This takes a VERY long time, as each board of size x by y has 2^(x*y) possible combinations. It took almost 10 minutes to run a 4x5 board. Stupidly silly for something that is simpler than it is.
If it is possible that it was an evolved board, it prints &quot;evolved.&quot;, and if it couldn't have been evolved, it prints &quot;created.&quot;.