During the age of typewriters some newspaper editors inserted a couple, seemingly gibberish code at the bottom of each page, which the readers were able to decode and type in with their typewriters. The result was a funny ASCII art (an image created by using characters only). Your task is to decode a character sequence and get the corresponding ASCII art by using the codetable below.
Every code is created by using the following units: n(char): repeating the single (char) n number of times. For example 5L -> LLLLL. You may suppose that n is a positive integer. sp: single space bS: backslash - \ sQ: single quote - ' nl: new line character Note: there are no integers before the nl notation, thus it always mean a single new line character. However the sp, bS, sQ characters can be repeated multiple times, thus a number can appear before them.
The input is a single line which contains the units of the code separated by a single space character.
The output is the (maybe multi-line) drawing corresponding to the given code.
|University of Debrecen; Faculty of Informatics; v. 03/01/2019|