import std.algorithm,
       std.string,
       std.range,
       std.array,
       std.stdio,
       std.conv;

struct Stack(T) {
  T[] stack;

  @property T pop() {
    T t = stack[$ - 1];
    stack.length--;
    return t;
  }
  
  @property size_t length() {
    return stack.length;
  }

  @property void push(T value) {
    stack ~= value;
  }

  @property bool empty() {
    return stack.empty;
  }

  @property T front() {
    return pop;
  }

  @property void popFront() {}

  @property void popAll() {
    foreach (_; this) {}
  }
}

void main() {
  ulong n = readln.chomp.to!ulong;
  ulong[] a = readln.chomp.split.to!(ulong[]);

  ulong[] odds,
          evens;

  Stack!ulong sodds,
              sevens;

  foreach (idx, elem; a) {
    if (idx % 2 == 0) {
      if (n % 2) {
        sevens.push(elem);
      } else {
        evens ~= elem;
      }
    } else {
      if (n % 2) {
        odds ~= elem;
      } else {
        sodds.push(elem);
      }
    }
  }


  if (n % 2 != 0) {
    foreach (elem; sevens) { writef("%d ", elem); }
    foreach (elem; odds)   { writef("%d ", elem); }
  } else {
    foreach (elem; sodds)  { writef("%d ", elem); }
    foreach (elem; evens) { writef("%d ", elem); }
  }
  writeln;
}
