..

Integer.parseInt(scanner.nextLine())
Size: a a a
..
Integer.parseInt(scanner.nextLine())
..
AK
Integer.parseInt(scanner.nextLine())
..
String s = "12";
int count = Integer.parseInt(s); // 12
AK
AK
AK
AK
AK
AK
С(
N🌌
а
MR
ch
V
AK
M
А
String[] matches = Pattern.compile("your regex here")
.matcher("string to search from here")
.results()
.map(MatchResult::group)
.toArray(String[]::new);
M
String[] matches = Pattern.compile("your regex here")
.matcher("string to search from here")
.results()
.map(MatchResult::group)
.toArray(String[]::new);