x86 machine code (37 bytes)
Hexdump:
6800B807BF8007BE8200B40EAC3C0D741338D8740A720481EF400181C7A000AB86C3EBE8C3
Run in MS-DOS with 50 line console, the input is taken from the command line.
E.g.
wave.com 1234567890qwertyuiopasdfghjklzxcvbnm
Download binary here
Update: Shaved off three bytes thanks to jrandomhacker
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…