// THIS SOURCE CODE IS NOT COMPILABLE. IT'S OK.

#include <cstdio>

template <class T, int l> struct Set
{
  enum { value = (((int *)T::res)[l] = l) };
};

template <int l, int r, class T> struct For { enum { value = For<l, (l + r) / 2, T>::value + For<(l + r) / 2 + 1, r, T>::value } ; };

template <int l, class T> struct For<l, l, T> { enum { value = Set<T, l>::value } ; };

template <int n> struct Calc
{
  static const int res[n];
  static const int get( int i );
  enum { value = For<0, n - 1, Calc<n> >::value };
};

template <int n> const int Calc<n>::get( int i ) { return res[i]; }
template <int n> const int Calc<n>::res[n];

int main()
{
  const int M = 100;
  Calc<M>::value; // DO NOT DELETE THIS
  for (int i = 0; i < M; i++)
    printf("%d ", Calc<M>::get(i));
  return 0;
}