public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 21; i < 51; i++) {
            System.out.println(((Math.min(i, 25) + i) % (2 + i % 3)) > 0 ? 1 : 0);
        }
    }

}

import static java.lang.Math.min;

public class FourierDoddles {
    public static void main(String[] args) {
        for (int i = 21; i <= 50 ; i++) {
            if(((min(i, 25) + i) % (2 + i % 3)) > 0){
                System.out.println("1");
            }
            else System.out.println(0);
//            System.out.println( ((min(i, 25) + i) % (2 + i % 3)) > 0 );
        }
    }
}

import static java.lang.Math.min;

public class FourierDoddles {
    public static void main(String[] args) {
        for (int i = 21; i < 51 ; i++) {
            System.out.println( ((min(i, 25) + i) % (2 + i % 3)) > 0 );
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            System.out.println("0\n1\n1\n0\n1\n0");
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
//            System.out.print("0\n1\n1\n0\n1\n0\n");
            System.out.print("1\n0\n1\n0\n0\n1\n");
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
//            System.out.print("0\n1\n1\n0\n1\n0\n");
            System.out.print("0\n1\n0\n0\n1\n1\n");
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            System.out.println(0);
            System.out.println(1);
            System.out.println(1);
            System.out.println(0);
            System.out.println(1);
            System.out.println(0);
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
//            System.out.print("0\n1\n1\n0\n1\n0\n");
            System.out.print("1\n1\n0\n1\n0\n0\n");
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
//            System.out.print("0\n1\n1\n0\n1\n0\n");
            System.out.print("0\n0\n1\n1\n0\n1\n");
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
//            System.out.print("0\n1\n1\n0\n1\n0\n");
            System.out.print("1\n0\n0\n1\n1\n0\n");
        }
    }
}

public class CodeForces1April2019E {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            System.out.print("0\n1\n1\n0\n1\n0\n");
        }
    }
}