My answer is correct. Still i have error and can not pass last requirement.. Help me please what mistake i make
package com.codegym.task.task05.task0532;
import java.io.*;
import java.util.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
Scanner sc = new Scanner(System.in);
int temp = 0; int num = 0;
for(int j=0; j<6; j++)
{
num = sc.nextInt();
if(num>temp)
temp = num;
System.out.println(num);
System.out.println(temp);
}
//System.out.println(temp);
}
}