invertList function

Invert a 2-level list