JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Arrays;
import java.util.Scanner ;
public class Program
{
public static void main(String[] args) {
Scanner input= new Scanner(System .in);
String MyName=input.nextLine();
int number_of_agent=input.nextInt();
String[] other_customary=(input.nextLine()).split(" ");
int turn=1;
Arrays.sort(other_customary);
for(int f=0;f<4;f++){
System .out .println(other_customary[f]);
}
/* for(int x=0;x<4;x++){
if( MyName.compareTo(other_customary[x])==-1){
turn+=x;
break;
}
}
if(MyName.compareTo(other_customary[3])==1){
turn=5;
}
int devide=turn/number_of_agent;
int modulus=turn%number_of_agent;
if(modulus==0){
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run