package com.husweijishi.suanfa;
import java.util.Scanner;
public class ZiFuChuanFenGe {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner = new Scanner(System.in);
String str = "";
String str1 = "";
while (scanner.hasNext()) {
str = scanner.nextLine();
str1 = scanner.nextLine();
if (str.length()%8 == 0 ) {
IsEightMutiple(str);
}else if (str.length() < 8) {
LengthIsLessThanEight(str);
}else if (str.length() > 8 && str.length()%8 != 0) {
moreThanEight(str);
}
if (str1.length()%8 == 0) {
IsEightMutiple(str1);
}else if (str1.length() < 8) {
LengthIsLessThanEight(str1);
}else if (str1.length() > 8 && str1.length()%8 != 0) {
moreThanEight(str1);
}
}
}
/**
* 字符串长度大于8时处理
* @param str
*/
public static void moreThanEight(String str) {
int len = str.length();
int time = len % 8;
IsEightMutiple(str.substring(0, str.length()-time));
LengthIsLessThanEight(str.substring(str.length()-time));
}
/**
* 字符串长度小于8时处理
* @param str
*/
public static void LengthIsLessThanEight(String str) {
int left = 8 - str.length();
for(int i=0;i<left;i++){
str +="0";
}
System.out.println(str);
}
/**
* 字符串长度等于8时处理
* @param str
*/
public static void IsEightMutiple(String str){
for(int i=0;i<str.length();i+=8){
System.out.println(str.substring(i, i+8));
}
}
}