int main() {
  {
    unsigned long long n = 1;
    for (int i = 0; i < 30; i++) {
      
      
      
      printf(, __builtin_popcountll(n));
      n *= 3;
    }
    printf();
  }

  int od[30];
  int ne = 0, no = 0;
  printf();
  for (int n = 0; ne+no < 60; n++) {
    if ((__builtin_popcount(n) & 1) == 0) {
      if (ne < 30) {
	printf(, n);
	ne++;
      }
    } else {
      if (no < 30) {
	od[no++] = n;
      }
    }
  }
  printf();
  printf();
  for (int i = 0; i < 30; i++) {
    printf(, od[i]);
  }
  printf();

  return 0;
}