/*
with the following input:
a 10101010111000110
b 10110001010101010
s 01100100010010101
r 10100010001000111

the output will be:
 a: __    __    __    __    ________          _____
      |__|  |__|  |__|  |__|        |________|     |___

 b: __    _____          __    __    __    __    __
      |__|     |________|  |__|  |__|  |__|  |__|  |___

 s:    _____       __          __       __    __    ___
    __|     |_____|  |________|  |_____|  |__|  |__|

 r: __    __          __          __          _________
      |__|  |________|  |________|  |________|

*/

#include <stdio.h>
#include <string.h>

#include <iostream>
#include <vector>
#include <string>

using namespace std;

extern int SIZE_COLUMN;

//FILE *Fin=fopen("input.txt","r");
FILE *Fout=stdout;//fopen("output.txt","w");

int PrintDiag(vector< vector<bool> > &data, vector<string> &names){
	int i;
	//char str[100];
	for(unsigned short j=0;j<names.size();j++)
	{
		#define str data[j]
		fprintf(Fout," %-*s   ",SIZE_COLUMN,names[j].c_str());
		//fscanf(Fin,"%s\n",str);
		int len=data[j].size();
		for (i=0; i<len; i++)
			if (str[i]==true)
			{
				fprintf(Fout,"__");
				if (i!=len-1 && str[i]!=str[i+1]) fprintf(Fout," "); else fprintf(Fout,"_");
			}
			else fprintf(Fout,"   ");
		fprintf(Fout,"\n");
		fprintf(Fout," %-*s   ",SIZE_COLUMN,"");
		for (i=0; i<len; i++)
			if (str[i]==false)
			{
				fprintf(Fout,"__");
				if (i!=len-1 && str[i]!=str[i+1]) fprintf(Fout,"|"); else fprintf(Fout,"_");
			}
			else
			{
				fprintf(Fout,"  ");
				if (i!=len-1 && str[i]!=str[i+1]) fprintf(Fout,"|"); else fprintf(Fout," ");
			}
		fprintf(Fout,"\n\n");
		#undef str
	}
	return 0;
}
