import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   } main {
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] x={1,2,3,4,5}; x {1,2,3,4,5} 1 2 3 4 5 int[] inx=new int[5]; inx new int[5] 5 for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      } int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
         inx[i]=sc.nextInt();
      } {
         inx[i]=sc.nextInt();
      } inx[i]=sc.nextInt() inx[i] inx i sc.nextInt() sc.nextInt sc for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      } int j=0; int j=0; j 0 j<5 j 5 j++ j++ j {
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      } {
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      } if(inx[j]==0){
            System.out.println(x[j]);
         } inx[j]==0 inx[j] inx j 0 {
            System.out.println(x[j]);
         } System.out.println(x[j]) System.out.println System.out System System.out x[j] x j String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int[] x={1,2,3,4,5};
      int[] inx=new int[5];
      for(int i=0;i<5;i++){
         inx[i]=sc.nextInt();
      }
      for(int j=0;j<5;j++){
         if(inx[j]==0){
            System.out.println(x[j]);
         }
      }
   }
}
