interpretation is the problem.
package com.codegym.task.task07.task0720;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Shuffled just in time
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(reader.readLine());
int m = Integer.parseInt(reader.readLine());
ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < n; i++) {
//write your code here
String s1 = reader.readLine();
list.add(s1);
}
for (int j = 0; j < m; j++) {
String s2 = reader.readLine();
list.add(n,s2);
}
for (int x = 0; x < list.size(); x++) {
System.out.println(list.get(x));
}
}
}