CJam, 1919 17 bytes
"a""b"'a'b{_@_p\+_@_n\+}ri*;pri*;;
explanation
"a": putPush character literal "a" ononto the stack.
"b": putPush character literal "b" ononto the stack.
{_@_p\+}
{: Block begin.
_: duplicate top element on the stack
@: rotate top 3 elements on the stack
_: duplicate top element on the stack
pn: print string representation and newline
\: swap top 2 elements on the stack
+: add, concat
}: Block end.
r: read token (whitespace-separated)
i: convert to integer
*: multiply, join, repeat, fold (reduce)
;: pop and discard
p;: print string representationpop and newlinediscard