//Benjamin Edwards
// 3/13/2020
//Int5 5/5
//Enloe
//Potter
//Contest 3
#include 
#include 
#include 
#include 
using namespace std;
int arr2 [4][4]={0};
char hexcreator (string four)
{
    if(four=="1111") return'F';
	else if(four=="1110") return 'E';
	else if(four=="1101") return 'D';
	else if(four=="1100") return 'C';
	else if(four=="1011") return 'B';
	else if(four=="1010") return 'A';
	else if(four=="1001") return '9';
	else if(four=="1000") return '8';
	else if(four=="0111") return '7';
	else if(four=="0110") return '6';
	else if(four=="0101") return '5';
	else if(four=="0100") return '4';
	else if(four=="0011") return '3';
	else if(four=="0010") return '2';
	else if(four=="0001") return '1';
	else if(four=="0000") return '0';
}
void filler (string exp)
{
    int space=1;
    int arr [4][4]={0};
    if (exp[0]=='~')
    {
        if (exp[1]=='A')              ///Not A
            for (int x=0; x<4; x++)
            {
                arr[x][2]=1;
                arr[x][3]=1;
            }
        if (exp[1]=='B')           ///Not B
            for (int x=0; x<4; x++)
            {
                arr[2][x]=1;
                arr[3][x]=1;
            }
        if (exp[1]=='C')           ///Not C
            for (int x=0; x<4; x++)
            {
                arr[x][0]=1;
                arr[x][3]=1;
            }
        if (exp[1]=='D')           ///Not D
            for (int x=0; x<4; x++)
            {
                arr[0][x]=1;
                arr[3][x]=1;
            }
        space+=1;
    }
    if (exp[0]=='A')   ///A
        for (int x=0; x<4; x++)
            {
                arr[x][1]=1;
                arr[x][0]=1;
            }
    if (exp[0]=='B')   ///B
        for (int x=0; x<4; x++)
        {
            arr[0][x]=1;
            arr[1][x]=1;
        }
    if (exp[0]=='C')   ///C
        for (int x=0; x<4; x++)
        {
            arr[x][1]=1;
            arr[x][2]=1;
        }
    if (exp[0]=='D')    ///D
        for (int x=0; x<4; x++)
            {
                arr[1][x]=1;
                arr[2][x]=1;
            }
    for (int j=space; j bool_ean)
{
    for (int i=0; i vec_var;
			getline(infile, boolean);
			string x ="";
			for (int i=0; i