import java.io.*;

// The "S5" class.
public class S5
{
    public static void main (String[] args) throws Exception
    {
	PrintWriter output = new PrintWriter (new FileWriter ("OUT5.txt"));

	for (int i = 0 ; i < 5 ; i++)
	{
	    output.println ("" + (int) (Math.random () * 5));
	}
	output.close ();
    } // main method
} // S5 class

