import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
String num1 = reader.readLine();
int rows = Integer.parseInt(num1);
String num2 = reader.readLine();
int columns = Integer.parseInt(num2);
int i;
int j;
for (i = 1; i < columns; i++) {
for (j = 0; j < rows; j++) {
System.out.print("8");
}
System.out.println("8");
}
}
}
package com.codegym.task.task04.task0436;
/*
Drawing a rectangle
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
String num1 = reader.readLine();
int rows = Integer.parseInt(num1);
String num2 = reader.readLine();
int columns = Integer.parseInt(num2);
int i;
int j;
for (i = 1; i < columns; i++) {
for (j = 0; j < rows; j++) {
System.out.print("8");
}
System.out.println("8");
}
}
}