package oSWExpertAcademy;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
//최대수 구하기
public class D1_04 {
public static void main(String[]args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int count = Integer.parseInt(br.readLine());
for(int i=1; i<=count; i++) {
String[] nums = br.readLine().split(" ");
int max = 0;
for(int j=0; j<10; j++) {
if(Integer.parseInt(nums[j])>max) {
max = Integer.parseInt(nums[j]);
}
}
System.out.println("#"+i+" "+max);
}
} catch (NumberFormatException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
댓글