import java.util.*;
import java.lang.*;
import java.io.*;
class Main {
    public static void main(String[] args) {
    Scanner teclado = new Scanner(System.in);
     int M = 0, N = 0, todos = 0;
     double promedio;
     M = teclado.nextInt();
     N = teclado.nextInt();
     
     int vecN[] = new int[M];
     int vecK[] = new int[N];
      
        for (int i = 0; i < M ; i++ ){
            for (int h = 0 ; h < N ; h++){
                vecN[i] = teclado.nextInt();
               // System.out.print(vecN[i]+ " ");
                System.out.print(vecN[0] + " ");
                
                
               // for (int f = 0 ; f == 1; f++){
                    //System.out.print(vecN[f]+ " ");
               // }
               
            }
          
        }
         
    }
}

Embed on website

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