/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
public class Main
{
public static void main(String[] args) {
String strTest = "Das ist mein kleiner Test!";
String[] arrSplit = strTest.split(" ");
int maxLen = 0;
for (String i : arrSplit){
if(i.length()>maxLen){
maxLen = i.length();
}
}
for(int i=0; i<maxLen; i++){
String s = "";
for(String j : arrSplit){
if(j.length()>i){
s += j.charAt(i)+" ";
}
else{
s += " ";
}
}
System.out.println(s);
}
}
}