import java.util.Scanner;
import java.util.*;

  class Main{
  public static void main(String[] args){
      Scanner teclado = new Scanner(System.in);
      int vec[] = new int[1];
      int dato = teclado.nextInt();
      for
      
      
      
      
      String numero = teclado.nextLine();
      
      for(int i=0; i < numero.length(); i++){ 
          System.out.println(numero.substring(i, i+1));
          if (i!=numero.length()-1)
          System.out.print(" ");
          }
          
          
         
  }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: