//============================================================================
// Name        : Dwite_round2_2.cpp
// Author      : Marko Zhen
// Version     :
// Copyright   : (c) 2009 Marko Zhen
//============================================================================

#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main() {
	ifstream myFile("DATA3.txt");
	ofstream outPut;
	outPut.open("OUT3.txt");
	string str;
	string list[15];
	list[0]="0000";
	list[1]="0001";
	list[2]="0010";
	list[3]="0011";
	list[4]="0100";
	list[5]="0101";
	list[6]="0110";
	list[7]="0111";
	list[8]="1000";
	list[9]="1001";
	list[10]="1010";
	list[11]="1011";
	list[12]="1100";
	list[13]="1110";
	list[14]="1111";
	string searchStr;
	size_t found;

	for (int y = 0; y < 5; y++){
		myFile >> searchStr;
		for (int x = 0; x<15; x++){
			str = list[x];
			found=str.find(searchStr);
			if (found==string::npos){
				cout << str << endl;
			}
		}
	}
	return 0;
}

