## Brainfuck, 183 bytes

 ++++++++++[-[<<+>>-]+<<]>,[<[-]-[>-<-----]>++[-[>>+<<-]>>]>+++[<<],>,]<[,>>---[>
 >]<<+++[<<]]>->>->>>>->>>>>>->[[>>]>,<<+[++[>+++++++++++<-]<+]>>[++.>-.>]+++++++
 +++.,>[[>]>]<<[.[<]<]<]

Formatted:

 ++++++++++
 [
 -[<<+>>-]
 +<<
 ]
 >,
 [
 <[-]
 -[>-<-----]
 >++
 [
 -[>>+<<-]
 >>
 ]
 >+++[<<]
 ,>,
 ]
 <
 [
 ,>>---[>>]
 <<+++[<<]
 ]
 >->>->>>>->>>>>>->
 [
 [>>]
 >,<
 <+
 [
 ++[>+++++++++++<-]
 <+
 ]
 >>[++.>-.>]
 ++++++++++.,
 >[[>]>]
 <<[.[<]<]
 <
 ]

Expects input without a trailing newline.

[Try it online.](http://brainfuck.tryitonline.net/#code=KysrKysrKysrK1stWzw8Kz4-LV0rPDxdPixbPFstXS1bPi08LS0tLS1dPisrWy1bPj4rPDwtXT4-XT4rKytbPDxdLD4sXTxbLD4-LS0tWz4-XTw8KysrWzw8XV0-LT4-LT4-Pj4tPj4-Pj4-LT5bWz4-XT4sPDwrWysrWz4rKysrKysrKysrKzwtXTwrXT4-WysrLj4tLj5dKysrKysrKysrKy4sPltbPl0-XTw8Wy5bPF08XTxd&input=MyA1IDcgOSAxMA)