import java.util.*;

public class Solution {

    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        String MESSAGE = in.nextLine();
        String[] first = MESSAGE.split("");
        String[] final1 = new String[first.length*7];
        int cnt=0;
        for(int i=0;i<first.length;i++){
            byte[] bytes = first[i].getBytes();
            StringBuilder binary = new StringBuilder();
            for (byte b : bytes)
            {
            	int val = b;
            	for (int j = 0; j < 8;j++)
            	{
            		binary.append((val & 128) == 0 ? 0 : 1);
            		val <<= 1;
            	}
            	binary.append(' ');
            }
            String test= binary.toString();
            String[] parts = test.split("");
            for(int k=0;k<7;k++){
            	final1[cnt+k]=parts[k+1];
            }
        cnt+=7;
        }
        boolean isOne = false;
        for(int i=0;i<final1.length;i++){
        	if(i==0){
        		if(final1[i].equals("1")){
        			System.out.print("0 0");
        			isOne = true;
        		}
        		else{
        			System.out.print("00 0");
        			isOne = false;
        		}
        	}
        	else{
        		if(final1[i].equals("1")){
        			if(isOne){
        				System.out.print("0");
        			}
        			else{
        				isOne = true;
        				System.out.print(" 0 0");
        			}
        		}
        		else{
        			if(isOne){
        				isOne = false;
        				System.out.print(" 00 0");
        			}
        			else{
        				System.out.print("0");
        			}
        		}
        	}
        }
    }
}

@@ -181,22 +181,20 @@
     
-String%5B%5D fi
+char%5B%5D cha
 rs
-t
  = M
@@ -200,24 +200,28 @@
 MESSAGE.
-split(%22%22
+toCharArray(
 );%0A     
@@ -233,65 +233,17 @@
 ring
-%5B%5D final1 = new String%5Bfirst.length*7%5D;%0A        int cnt=0
+ res = %22%22
 ;%0A  
@@ -255,32 +255,38 @@
  for
+ 
 (int i
-=0;i%3Cfi
+ = 0; i %3C cha
 rs
-t
 .length;
 i++)
@@ -273,36 +273,38 @@
  %3C chars.length;
+ 
 i++)
+ 
 %7B%0A            by
@@ -305,145 +305,89 @@
     
-byte%5B%5D bytes = first%5Bi%5D.getBytes();%0A            StringBuilder binary = new StringBuilder();%0A            for (byte b : bytes)%0A            
+String temp = Integer.toBinaryString(chars%5Bi%5D);%0A            if(temp.length() %3C 7)
 %7B%0A  
@@ -401,19 +401,25 @@
    %09
-int val = b
+String temp1 = %22%22
 ;%0A  
@@ -436,379 +436,153 @@
 %09for
- 
 (int j
- = 0; j %3C 8;j++)%0A            %09%7B%0A            %09%09binary.append((val & 128) == 0 ? 0 : 1);%0A            %09%09val %3C%3C= 1;%0A            %09%7D%0A            %09binary.append(' ');%0A            %7D%0A            String test= binary.toString();%0A            String%5B%5D parts = test.split(%22%22);%0A            for(int k=0;k%3C7;k++)%7B%0A            %09final1%5Bcnt+k%5D=parts%5Bk+1%5D;%0A            %7D%0A        cnt+=7
+=temp.length();j%3C7;j++)%7B%0A            %09%09temp1 += %220%22;%0A            %09%7D%0A            %09temp = temp1 + temp;%0A            %7D%0A            res += temp
 ;%0A  
@@ -646,21 +646,20 @@
 0;i%3C
-final1
+res
 .length
+()
 ;i++
@@ -689,33 +689,45 @@
        %09%09if(
-final1%5Bi%5D
+res.substring(i, i+1)
 .equals(%221%22)
@@ -936,17 +936,29 @@
 %09if(
-final1%5Bi%5D
+res.substring(i, i+1)
 .equ

Update Solution.java