public class LCMethod01 {

    public static void main(String[] args){

        // These are the constants for the algorithm.
        int M = (int)(Math.pow(2,31) - 1) ;
        int A = (int)(Math.pow(7,5)) ;
        int C = 0 ;

        // The number of number that we will generate.
        int npts = Integer.parseInt(args[0]) ;

        int state = 1 ;

        for (int i = 0 ; i < npts ; i++){
            state = Math.floorMod(A * state , M) ;
            System.out.println(state) ;
        }

    }

}
