Scanner scanner = new Scanner(System.in);
String input = scanner.nextLine();
int sizeOfInput = input.length();
for (int i = 0; i < sizeOfInput; i++) {
int endIndex = i+1;
String dup = input.substring(i, endIndex);
System.out.print(dup + dup + dup);
}
Scanner scanner = new Scanner(System.in);
System.out.println("Введите слово\n");
String word = scanner.nextLine();
String[] splittedWord = word.split("");
for (String character : splittedWord) {
System.out.print(character.repeat(3));
}