A higher resolution is required to access the IDE
- 205
Statement
Goal
CGFunge is a 2-dimensional, positional programming language. This means that execution of a CGFunge program follows a designated pattern on a grid of ASCII characters. Each command in the language is a single character. The most basic commands involve flow control:'
'
'
'
'
'
Execution always starts on the first character of the first line and proceeds to the right. Spaces are ignored. So, for example, the following are equivalent:
11+E
vE<
1 +
>1^
SE S+1<
The execution of the program entirely revolves around a stack consisting only of integers in the range [
The following commands perform other basic stack manipulation tasks:
'
'
'
The quotation mark character ('
The following commands perform stack-based logical flow control:
'
'
Output is performed with the following commands:
'
'
Input
Line 1: An integer N indicating the number of lines in the program
Next N lines: One line per program input
Next N lines: One line per program input
Output
The output of the properly interpreted program
Constraints
1 ≤ N ≤ 10
Example
Input
1 2419+*+IE
Output
42
A higher resolution is required to access the IDE