Z80 or 8080 Assembly, 21 bytes machine code
Assume a memory mapped I/O device:
Z80 8080
3A xx xx ld a, (input) lda input ; get input character
11 0A 20 ld de, 200ah lxi d, 200ah ; space & newline
21 yy yy ld hl, output lxi h, output ; get output address
77 ld (hl), a mov m, a ; output character * 3
77 ld (hl), a mov m, a
77 ld (hl), a mov m, a
73 ld (hl), e mov m, e ; output newline
77 ld (hl), a mov m, a ; output character
72 ld (hl), d mov m, d ; output space
77 ld (hl), a mov m, a ; output character
73 ld (hl), e mov m, e ; output newline
77 ld (hl), a mov m, a ; output character * 3
77 ld (hl), a mov m, a
77 ld (hl), a mov m, a
76 halt hlt ; or C9 ret
No interpreter needed!
Hexdump:
0000: 3A 00 FF 11 0A 20 21 01 FF 77 77 77 73 77 72 77
0010: 73 77 77 77 76
where the input address is at FF00h and the output address is mapped at FF01h. The actual addresses will depend on the actual hardware. Of course this assumes the I/O is memory mapped. If it is I/O mapped, it would take several extra bytes because Z80 & 8080 I/O instructions are two bytes each. This also assumes the output device interprets 0Ah as a newline and doesn't require a CR (0Dh) which would add an extra 4 bytes to the program.