import java.util.Scanner;
import java.io.File;
import java.io.IOException;
public class BitStringsClient
{
public static void main(String[] args) throws IOException
{
//communicating with the data
Scanner inFile = new Scanner("NOT 1100111");
//declare variables
String firststr, secondstr;
String newstr;
//process data
while(inFile.hasNext())
{
firststr = inFile.next();
if(firststr.equals("NOT"));
{
secondstr = inFile.nextLine();
//for loop to convert bits to their opposite
for(int index = 0; index < secondstr.length(); index++)
{
newstr = secondstr.substring(index, (index + 1));
System.out.print(newstr);
}
}
//else
/*if(firststr.equals("AND"));
{
secondstr = inFile.nextLine();
//for loop to multiply strings
for(int index = 0; index < firststr.length(); index++)
{
}
}
//else
if(firststr.equals("OR"));
{
secondstr = inFile.nextLine();
//for loop to add strings
for(int index = 0; index < firststr.length(); index++)
{
}
}*/
}
}
}