import java.util.*;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNextLine()) { // 注意 while 处理多个 case
String s = in.nextLine();
if (s.length() < 8) {
System.out.println(fillWithZero(s, 8 - s.length()));
} else {
int sliceCount = s.length() / 8;
int lastCount = s.length() % 8;
for (int i = 0; i < sliceCount; i++) {
System.out.println(s.substring(i * 8, (i + 1) * 8));
}
if (lastCount != 0) {
System.out.println(fillWithZero(s.substring(sliceCount * 8, s.length()), 8 - lastCount));
}
}
}
}
private static String fillWithZero(String s, int len) {
char[] chars = new char[len];
Arrays.fill(chars, '0');
return s + new String(chars);
}
}