import static java.lang.System.*;
import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		Map<Integer,Integer> map = new HashMap<>();
		for (int i=2; i<=30; i++) {
			map.put(i*(i-1)/2, i);
		}
		
		Set<Long> set = new HashSet<>();
		for (int i=1; i<=28; i++) {
			set.add((long)Math.pow(2,i));
		}
		
		
		
		List<Integer> ans = new ArrayList<>();

		long n = sc.nextLong();
		if (n == 0) out.println(1);
		if (map.containsKey((int)n)) {
			for (int i=0; i<map.get((int)n); i++) {
				ans.add(1);
			}
			printList(ans);
		}
		else {
			for (Map.Entry<Integer,Integer> e: map.entrySet()) {
				int k = e.getKey();
				long d = n/k;
				if (set.contains(d)) {
					
					for (int i=0; i<map.get(k); i++) {
						ans.add(1);
					}
					while (d%2 == 0) {
						d /= 2;
						ans.add(0);
					}
					printList(ans);
					
					break;
				}
			}
		}
	}

	static void printList(List<Integer> list) {
		for (int i=0; i<list.size(); i++) {
			out.print((i==0?"":" ")+list.get(i));
		}
	}

	static boolean is2n(long l) {
		while (l%2 == 0) {
			l /= 2;
		}
		if (l == 1) return true;
		return false;
	}
}