public class test {
public static void main(String[] args) throws Exception {
String test = "0123456";
puts("%s length %d", test, test.length());
for (int i=1; i <= test.length(); i++)
puts("prefix [%d, %d] -> %s", 1, i, test.substring(0, i));
}
public static void puts(String s){ System.out.println(s); }
public static void puts(String format, Object... args){ puts(String.format(format, args)); }
}