import java.io.*;

public class S5
{
    public static void main (String[] args) throws IOException
    {
	BufferedReader input = new BufferedReader (new FileReader ("DATA5.txt"));
	PrintWriter output = new PrintWriter (new FileWriter ("OUT5.txt"));
	int counter = 0;
	while (counter < 5)
	{
	    int val = 0;
	    try
	    {
		val = Integer.parseInt (input.readLine ());

		output.println ((int) (Math.random () * (val - 1) + 1));

		counter++;
	    }
	    catch (Exception e)
	    {
	    }
	}
	output.close ();
    }
}



